Skip to content

Tree-Backed Regular Table

Archmage recognizes a tree-structured data file as a tree-backed regular table whenever its structure satisfies the following criteria:

  • The root is a tree map (automatically inferred, or explicitly declared).
  • Each map key is an integer (even if represented as a string) or a string.
  • Each map value is a tree object.
# Tree-Backed Regular Table
1:
name: Arthur
power: 100
2:
name: Merlin
power: 80

Like standard regular tables, a tree-backed regular table:

In a tree-backed regular table, each key in the root map serves as a config ID, and its corresponding value serves as a config entry.

When root map keys are integers, they must be > 0.

1:
name: Arthur Pendragon
anchor: arthur
anchor__meta__:
type: anchor
2:
name: Merlin Ambrosius
anchor: merlin

Passive types require no manual input. Their data nodes must be either omitted or set to null.

1:
name: Arthur
signatureWeapon__meta__:
type: backref@item
skills: null # can be omitted
skills__meta__:
type: backref-n@skill
origin__meta__:
type: origin
2:
name: Merlin