Skip to content

CCompensationData

VersionStatus
v92Full
v90-
v86-

CCompensation_{zone}.xml defines class compensation data: NPC drop rewards with class-specific branching, allowing different loot tables for different character classes.


Entity: cCompensations Operations: create, update, delete, upsert File Organization: Zone-partitioned (one file per huntingZoneId)


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.3

Creates 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: true

Creates a compensation with shared loot that applies to all classes.

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.0

Creates a compensation with both class-specific and shared drops.

spec:
version: "1.0"
cCompensations:
update:
- huntingZoneId: 9001
npcTemplateId: 3001
changes:
npcName: "UpdatedClassBoss"
classBranches:
- className: "warrior"
itemBags:
- probability: 0.75

Updates an existing class compensation entry.

spec:
version: "1.0"
cCompensations:
delete:
- huntingZoneId: 9001
npcTemplateId: 3001

Removes the class compensation entry.

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.2

Creates or replaces the class compensation entry.

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.3

Removing 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.


PropertyTypeSinceRequiredDescription
huntingZoneIdintv92YesHunting zone ID (file partition key)
npcTemplateIdintv92YesUnique NPC template ID (primary key)
npcNamestringv92YesInternal NPC name
classBrancheslistv92NoList of class-specific loot branches
itemBagslistv92NoList of shared item bags (all classes)
PropertyTypeSinceRequiredDescription
classNamestringv92YesCharacter class identifier
itemBagslistv92NoList of item bags for this class

Note: ItemBags in CCompensation are simpler than I/E compensations, using only probability for identification.

PropertyTypeSinceRequiredDescription
probabilitydecimalv92YesDrop probability (0.0 to 1.0), also serves as identifier
distributionstringv92NoDistribution mode: auto (calculate probabilities) or manual (default, require explicit probabilities)
itemslistv92NoList of items in this bag
PropertyTypeSinceRequiredDescription
templateIdintv92YesItem template ID
namestringv92YesDisplay name for the item
minintv92NoMinimum drop quantity. Defaults to 1
maxintv92NoMaximum drop quantity. Defaults to 1
probabilitydecimalv92NoIndividual item drop probability. Required unless parent bag has distribution: auto
isPublicbooleanv92NoWhether drop is announced publicly

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

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.


  • Composite Key: CCompensation uses huntingZoneId + npcTemplateId as composite key.

  • Dual Branching Paths: CCompensation supports both classBranches (class-specific) and itemBags (shared). Both can be used simultaneously.

  • ItemBag Identification: Unlike I/E compensations, CCompensation’s ItemBags use probability as identifier rather than a separate id field.

  • Class Name Matching: The className must 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 itemBags drop for all classes. Items in classBranches only 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 classBranches or itemBags, the entire collection is replaced. Include all class branches, bags, and items you want to preserve in your update operation.

  • Default Min/Max: When min or max is omitted from items, they default to 1. Only specify when different values are needed.

  • Auto-Distribution: Use distribution: auto on 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.