Syntax
DataSheetLang specs are written in YAML. A spec file contains:
- A required
specheader - One or more entity sections (
items,equipment,itemStrings)
If you want “what fields exist”, see Schemas.
Spec structure
Section titled “Spec structure”Minimal spec:
spec: version: "1.0"Typical spec:
spec: version: "1.0"
items: create: [ ] update: [ ] updateWhere: [ ] delete: [ ] upsert: [ ]Required
Section titled “Required”spec.version— currently"1.0"
Optional
Section titled “Optional”variables— named constants for substitution. See Variablesdefinitions— reusable YAML structures. See Definitionsimports— module dependencies. See Import Systemitems,equipment,itemStrings,quests,cCompensations, etc.
Operations
Section titled “Operations”DataSheetLang supports five operations:
| Operation | Purpose |
|---|---|
create | Add new entities |
update | Modify existing entities by ID |
updateWhere | Bulk modify entities matching filters |
delete | Remove entities by ID |
upsert | Create or update (idempotent) |
Operations execute in order: create → updateWhere → update → delete
For detailed documentation and examples, see Operations.
For filter syntax used in updateWhere, see Filters.
Inline equipment block
Section titled “Inline equipment block”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
Inline strings block
Section titled “Inline strings block”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 list expansion
Section titled “ID list expansion”ID fields can accept arrays to generate multiple entries from a single template:
cCompensations: upsert: - huntingZoneId: 9001 npcTemplateId: [3001, 3002, 3003] $extends: commonLootThis expands into three entries with different npcTemplateId values.
Full details: ID List Expansion
Data types and YAML style
Section titled “Data types and YAML style”- 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
Validation
Section titled “Validation”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.