Skip to content

Multi-Column Types

Multi-column types span multiple columns to form a single logical field. Each column holds one element; Archmage aggregates them — whether adjacent or not — into a single value using a defined column layout, blank region handling, and export encoding.

Category Regular Table Property Sheet Tree-Structured Data
Multi-Column Types
Type Description
[]T Multi-column array View
[N]T Fixed-size multi-column array View
map[K]V Multi-column map View
minmax Multi-column minmax View
wtpool Multi-column weighted pool View
vector Multi-column vector View
tuple Multi-column tuple View
bitflags Multi-column bitflags View
  • Columns forming a single logical field share a common name.
  • Each column holds one element; nested types must be Basic Types or Compact Types.
  • Two default export value shorthands are supported: / exports null; {} exports an empty container or a zero-valued object.

A multi-column array spreads a variable-length array across multiple columns sharing a common field name.

DescUnlock levelsBonus items
Namelevelsbonuses
Type[]int[]string={}
11030swordshield
21030potion
[]T

T can be any Basic or Compact Type.

[]int
[]string
[]>>vector|2|float32

Each column contributes one element. []T accepts any number of columns.

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

See Default Export Value for more information.

A multi-column array of fixed length — exactly N elements.

DescDrop weightsStat bonuses
Nameweightsbonuses
Type[3]float[2]int={}
10.30.590.1153
21.00.00.0
[N]T

T can be any Basic or Compact Type.

[3]float
[2]int
[4]duration

Each column contributes one element. Exactly N columns are required.

[3]int → no default export value
[3]int=/ → null
[3]int={} → [0, 0, 0]

See Default Export Value for more information.

A multi-column map spreads key-value pairs across multiple columns sharing a common field name.

DescQuest rewardsQuest penalties
Namerewardspenalties
Typemap[string]intmap[enum@attribute]int32={}
1gold100exp50hp30
2gem5
map[K]V

K must be string, an integer type, or an enum type; V can be any Basic or Compact Type.

map[string]int
map[int]float
map[enum@attribute]int8
map[string]>>vector|2|int

K cannot have any options.

Columns alternate between keys and values by position: the 1st column is a key, the 2nd its value, the 3rd a key, and so on. Therefore, a map must occupy an even number of columns.

map[string]int → no default export value
map[string]int=/ → null
map[string]int={} → empty map {}

See Default Export Value for more information.

Allowed only for maps whose value type is bool.

keyOnly → equivalent to keyOnly=true
keyOnly=true

When enabled:

  • Each column holds a key, so the map no longer needs an even number of columns.
  • Omitted map values are coerced to true.

This semantically “turns” a map into a set — yet still it exports as a map.

DescUnlocked skills
Nameskill-set
Typemap[string]bool
OptionskeyOnly
1fireballhealdash
2fireball

A multi-column minmax occupies two columns sharing a common field name to represent a min–max pair.

DescHP rangeDamage range
NamehpRangedmgRange
Typeminmax|intminmax|int={}
11020515
255
minmax|T

T must be an integer type, a floating-point type, or duration.

minmax|int
minmax|float32
minmax|int64
minmax|duration

Exactly two columns are required: the first holds min, the second holds max.

minmax|int → no default export value
minmax|int=/ → {min: 0, max: 0}
minmax|int={} → {min: 0, max: 0}

See Default Export Value for more information.

On data export, a minmax becomes an object with min and max fields.

A multi-column weighted pool spreads a sequence of item-weight pairs across multiple columns sharing a common field name.

DescDrop poolReward pool
NamedropPoolrewardPool
Typewtpool|stringwtpool|>>object|Id int|Qty int={}
1gold50gem10Id:101|Qty:25
2nothing100
wtpool|T

T is the item type. It can be any Basic Type except for l10n, or a >>object.

Weights are int32 values; the data type is fixed and never needs to be specified.

wtpool|string
wtpool|int
wtpool|>>object|Id int|Qty int

Columns alternate between items and weights by position: the 1st column is an item, the 2nd its weight, the 3rd an item, and so on. Therefore, a weighted pool must occupy an even number of columns.

wtpool|int → no default export value
wtpool|int=/ → null
wtpool|int={} → empty pool {items: [], weights: []}

See Default Export Value for more information.

On data export, a weighted pool becomes an object with two parallel arrays, items and weights. Each weight corresponds to the item at the same index.

A multi-column vector spreads a geometric vector across multiple columns sharing a common field name.

DescSpawn positionFacing direction
Nameposdir
Typevector|3|intvector|2|float32={}
11020301.00.0
2050
vector|Dim|T

Dim must be 2, 3, or 4; T must be an integer or a floating-point type.

vector|2|int
vector|3|float32
vector|4|int32

Columns map to the x, y, z, w coordinates in order. Exactly Dim columns are required.

vector|3|float → no default export value
vector|3|float=/ → {x: 0, y: 0, z: 0}
vector|3|float={} → {x: 0, y: 0, z: 0}

See Default Export Value for more information.

On data export, a vector becomes an object with x and y fields, extended with z and w according to Dim.

A multi-column tuple spreads a positional struct across multiple columns sharing a common field name.

DescLoot entryDrop meta
Nameentrymeta
Typetuple|int|string|booltuple|string|bool=/
1100warriortrueraretrue
2101magefalse
tuple|T0|T1|T2|...

All field types (T0, T1, …) must be Basic Types.

tuple|int|string|bool
tuple|datetime|duration

Columns bind to fields strictly by position. The column count must equal the field count.

tuple|int|string|bool → no default export value
tuple|int|string|bool=/ → null
tuple|int|string|bool={} → {item0: 0, item1: "", item2: false}

See Default Export Value for more information.

On data export, Archmage represents tuples as objects. Keys follow the pattern item0, item1, item2, and so on.

A multi-column bitflags expands a bitflag enum across multiple columns sharing a common field name.

DescQuest flagsDifficulty flags
NameflagsdiffFlags
Typebitflags@QuestSchedbitflags@DiffType=/
Optionse=Dailye=Weeklye=Evente=Harde=Expert
1111
2TrueTrue
bitflags@<enumType>

<enumType> must be a bitflag enum.

bitflags@QuestSched

Each column represents a single bitflag and must have an e option with a unique value binding it to an enum item. Input values follow the bool semantics (1/0, True/False, T/F). A True input sets the associated enum item’s bit to 1.

This is a bitflags-only option. Its value must be the name or shorthand of an enum item belonging to <enumType>.

bitflags@QuestSched → 0
bitflags@QuestSched=/ → 0

If the default export value is omitted, Archmage treats it as /, meaning explicit specification is unnecessary.

See Default Export Value for more information.

On data export, Archmage combines all flag bits into a single integer.

Enum types must be defined in external definition files before they can be used. Pass these files via the --enum-files CLI flag:

Terminal window
archmage export --enum-files "idl/*.enum.yaml" ...
archmage struct --enum-files "idl/*.enum.yaml" ...

For how to define enum types, see Enum Definition.