Skip to content

Subtable Types

Subtable types define embedded subtables within a regular table. For each config entry, a subtable spans multiple rows and columns, where each row maps to a single object (for **[], **[N]) or a key-object pair (for **map).

Category Regular Table Property Sheet Tree-Structured Data
Subtable Types
Type Description
**[] Subtable array View
**[N] Fixed-size subtable array View
**map Subtable map View

Before configuring subtables, add the following rows to Superheader:

Label Description
Subtable Description A human-readable description with no functional effect on data export or code generation. Use - when no description is needed. Can be abbreviated as Subtable Desc.
Subtable Name The subtable’s identifier, used in exported data and generated code; changing it affects all downstream output.
Subtable Type The subtable’s data type and its default export value, e.g., **[]=/.
  • Columns forming a subtable share a common subtable name.
  • Fields of subtable objects must be of Basic Types, Compact Types, Multi-Column Types, or specific Behavior Types (assert, placeholder).
  • Fields of subtable objects are defined in the regular Description, Type and Name rows below the subtable definition. They may define their own default export values.

For each config entry:

  • A subtable may span multiple rows; non-subtable fields use only the first row, and remaining rows must stay blank.
  • Separate subtables are independent and do not interact.

For each config entry, a subtable of the subtable array type (**[]) embeds a variable-length array of objects. It spans multiple rows and columns. All columns involved share a common subtable name.

Subtable DescHero skills
Subtable Nameskills
Subtable Type**[]object
DescHero nameSkill nameSkill damage
Namenamenamedamage
Typestringstringint
1Arthurslash5
thrust8
2Lancelotguard3
**[] → equivalent to **[]object
**[]object

For each config entry, a subtable occupies a block of cells. Each row in the block maps to a single object. The block may contain any number of rows.

**[] → no default export value
**[]=/ → null
**[]={} → empty array []

See Default Export Value for more information.

On data export, Archmage emits an array of objects.

For each config entry, a subtable of the fixed-size subtable array type (**[N]) embeds a fixed-size array of objects. It spans multiple rows and columns. All columns involved share a common subtable name.

Subtable DescElemental resist
Subtable Nameresist
Subtable Type**[2]=/
DescMonsterElementValue
Namenameelementvalue
Typestringstringint
1Dragonfire80
ice30
5Slime
#
**[N] → equivalent to **[N]object
**[N]object

For each config entry, a subtable occupies a block of cells. Each row in the block maps to a single object. The block must contain exactly N rows.

**[N] → no default export value
**[N]=/ → null
**[N]={} → array of N elements, each being null
**[N]={}{} → array of N zero-valued objects

The default export value also determines how Archmage handles a blank row. With / or {}, the result is null; with {}{}, it is a zero-valued object.

See Default Export Value for more information.

On data export, Archmage emits an array of N objects.

For each config entry, a subtable of the subtable map type (**map) embeds an object map. It spans multiple rows and columns. All columns involved share a common subtable name.

Subtable DescLoot table
Subtable Nameloot
Subtable Type**map={}
DescChestItemCountChance
Namename$$valuechance
Typestringstringintfloat
2Gold chestgold1000.8
gem50.2
3Empty chest
**map

Every subtable map requires a key column. As with object fields, the map key is defined in the regular Description, Type and Name rows below the subtable definition.

The $$ token in the Name row identifies the map key. Its type must be string, an integer type, or an enum type. It cannot have options or a default export value.

For each config entry, a subtable occupies a block of cells. Each row in the block forms a key-object pair: the $$ column supplies the key, and the remaining columns form the object. The block may contain any number of rows.

**map → no default export value
**map=/ → null
**map={} → empty map {}
**map={}{} → empty map {}

The default export value also determines how Archmage handles a blank value row. With / or {}, the result is null; with {}{}, it is a zero-valued object.

See Default Export Value for more information.

On data export, Archmage emits an object map.