Syntax
DataSheetLang specs are written in YAML. A spec file contains:
- A required
specheader - Optional
presets - One or more entity sections (
items,equipment,itemStrings)
If you want “what fields exist”, see Entities.
Spec structure
Section titled “Spec structure”Minimal spec:
spec: version: "1.0"Typical spec:
spec: version: "1.0"
presets: items: { } equipment: { } itemStrings: { }
items: create: [ ] update: [ ] delete: [ ]Required
Section titled “Required”spec.version— currently"1.0"
Optional
Section titled “Optional”presetsitems,equipment,itemStrings
Operations
Section titled “Operations”Create
Section titled “Create”items: create: - id: 99001 name: "training_sword" level: 1Update
Section titled “Update”items: update: - id: 99001 preset: some_preset # optional changes: level: 10 buyPrice: 250Delete
Section titled “Delete”items: delete: - 99001 - 99002Preset references (overview)
Section titled “Preset references (overview)”Presets are defined under presets.<entity> and referenced with preset:.
- Presets can
extends:another preset (single inheritance) - Presets merge via null-coalescing (
child ?? parent) - Lists replace by default
Full details: Presets
Inline equipment block
Section titled “Inline equipment block”Items can include an equipment: block which expands into related equipment changes.
Common pattern:
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."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
- preset resolution succeeds (no cycles, depth limits)
- values fit expected types / ranges
When validation fails, you’ll get an error code.