Skip to content

Syntax

DataSheetLang specs are written in YAML. A spec file contains:

  • A required spec header
  • One or more entity sections (items, equipment, itemStrings)

If you want “what fields exist”, see Schemas.

Minimal spec:

spec:
version: "1.0"

Typical spec:

spec:
version: "1.0"
items:
create: [ ]
update: [ ]
updateWhere: [ ]
delete: [ ]
upsert: [ ]
  • spec.version — currently "1.0"
  • variables — named constants for substitution. See Variables
  • definitions — reusable YAML structures. See Definitions
  • imports — module dependencies. See Import System
  • items, equipment, itemStrings, quests, cCompensations, etc.

DataSheetLang supports five operations:

OperationPurpose
createAdd new entities
updateModify existing entities by ID
updateWhereBulk modify entities matching filters
deleteRemove entities by ID
upsertCreate or update (idempotent)

Operations execute in order: createupdateWhereupdatedelete

For detailed documentation and examples, see Operations.

For filter syntax used in updateWhere, see Filters.

Items can include an equipment: block which expands into related equipment changes.

items:
create:
- id: 99001
name: "iron_sword"
level: 60
equipment:
computed: true
compute:
formula: "standard"

Full details: Equipment computation

Items can include a strings: block to define display name / tooltip.

items:
create:
- id: 99001
name: "iron_sword"
strings:
name: "Iron Sword"
toolTip: "A basic training weapon."

ID fields can accept arrays to generate multiple entries from a single template:

cCompensations:
upsert:
- huntingZoneId: 9001
npcTemplateId: [3001, 3002, 3003]
$extends: commonLoot

This expands into three entries with different npcTemplateId values.

Full details: ID List Expansion

  • YAML supports inline lists ([a, b]) and multi-line lists
  • Strings can be quoted or unquoted (quotes recommended for safety)
  • Numbers should be written as numbers (no quotes) unless explicitly required

Specs are validated before applying:

  • required fields present
  • supported entity sections and operations
  • values fit expected types / ranges

When validation fails, you’ll get an error code. See Error Codes.