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.
Type Availability
Section titled “Type Availability”| Category | Regular Table | Property Sheet | Tree-Structured Data |
|---|---|---|---|
| Multi-Column Types | ✓ |
Type List
Section titled “Type List”| 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 |
Common Rules
Section titled “Common Rules”- 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:
/exportsnull;{}exports an empty container or a zero-valued object.
See Also
Section titled “See Also”A multi-column array spreads a variable-length array across multiple columns sharing a common field name.
| Desc | Unlock levels | Bonus items | |||
| Name | levels | bonuses | |||
| Type | []int | []string={} | |||
| 1 | 10 | 30 | sword | shield | |
| 2 | 10 | 30 | potion | ||
{ "1": { "levels": [10, 30], "bonuses": ["sword", "shield"] }, "2": { "levels": [10, 30], "bonuses": ["potion"] }}Type Definition Syntax
Section titled “Type Definition Syntax”[]TT can be any Basic or Compact Type.
[]int[]string[]>>vector|2|float32Column Layout
Section titled “Column Layout”Each column contributes one element. []T accepts any number of columns.
Default Export Value
Section titled “Default Export Value”[]int → no default export value[]int=/ → null[]int={} → empty array []See Default Export Value for more information.
Related Types
Section titled “Related Types”A multi-column array of fixed length — exactly N elements.
| Desc | Drop weights | Stat bonuses | |||
| Name | weights | bonuses | |||
| Type | [3]float | [2]int={} | |||
| 1 | 0.3 | 0.59 | 0.11 | 5 | 3 |
| 2 | 1.0 | 0.0 | 0.0 | ||
Type Definition Syntax
Section titled “Type Definition Syntax”[N]TT can be any Basic or Compact Type.
[3]float[2]int[4]durationColumn Layout
Section titled “Column Layout”Each column contributes one element. Exactly N columns are required.
Default Export Value
Section titled “Default Export Value”[3]int → no default export value[3]int=/ → null[3]int={} → [0, 0, 0]See Default Export Value for more information.
Related Types
Section titled “Related Types”map[K]V
Section titled “map[K]V”A multi-column map spreads key-value pairs across multiple columns sharing a common field name.
| Desc | Quest rewards | Quest penalties | ||||
| Name | rewards | penalties | ||||
| Type | map[string]int | map[enum@attribute]int32={} | ||||
| 1 | gold | 100 | exp | 50 | hp | 30 |
| 2 | gem | 5 | ||||
Type Definition Syntax
Section titled “Type Definition Syntax”map[K]VK must be string, an integer type, or an enum type; V can be any Basic or Compact Type.
map[string]intmap[int]floatmap[enum@attribute]int8map[string]>>vector|2|intK cannot have any options.
Column Layout
Section titled “Column Layout”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.
Default Export Value
Section titled “Default Export Value”map[string]int → no default export valuemap[string]int=/ → nullmap[string]int={} → empty map {}See Default Export Value for more information.
Option keyOnly
Section titled “Option keyOnly”Allowed only for maps whose value type is bool.
keyOnly → equivalent to keyOnly=truekeyOnly=trueWhen 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.
| Desc | Unlocked skills | ||
| Name | skill-set | ||
| Type | map[string]bool | ||
| Options | keyOnly | ||
| 1 | fireball | heal | dash |
| 2 | fireball | ||
{ "1": { "skill-set": { "fireball": true, "heal": true, "dash": true } }, "2": { "skill-set": { "fireball": true } }}Related Types
Section titled “Related Types”minmax
Section titled “minmax”A multi-column minmax occupies two columns sharing a common field name to represent a min–max pair.
| Desc | HP range | Damage range | ||
| Name | hpRange | dmgRange | ||
| Type | minmax|int | minmax|int={} | ||
| 1 | 10 | 20 | 5 | 15 |
| 2 | 5 | 5 | ||
Type Definition Syntax
Section titled “Type Definition Syntax”minmax|TT must be an integer type, a floating-point type, or duration.
minmax|intminmax|float32minmax|int64minmax|durationColumn Layout
Section titled “Column Layout”Exactly two columns are required: the first holds min, the second holds max.
Default Export Value
Section titled “Default Export Value”minmax|int → no default export valueminmax|int=/ → {min: 0, max: 0}minmax|int={} → {min: 0, max: 0}See Default Export Value for more information.
Export Format
Section titled “Export Format”On data export, a minmax becomes an object with min and max fields.
Related Types
Section titled “Related Types”wtpool
Section titled “wtpool”A multi-column weighted pool spreads a sequence of item-weight pairs across multiple columns sharing a common field name.
| Desc | Drop pool | Reward pool | ||||
| Name | dropPool | rewardPool | ||||
| Type | wtpool|string | wtpool|>>object|Id int|Qty int={} | ||||
| 1 | gold | 50 | gem | 10 | Id:101|Qty:2 | 5 |
| 2 | nothing | 100 | ||||
Type Definition Syntax
Section titled “Type Definition Syntax”wtpool|TT 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|stringwtpool|intwtpool|>>object|Id int|Qty intColumn Layout
Section titled “Column Layout”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.
Default Export Value
Section titled “Default Export Value”wtpool|int → no default export valuewtpool|int=/ → nullwtpool|int={} → empty pool {items: [], weights: []}See Default Export Value for more information.
Export Format
Section titled “Export Format”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.
Related Types
Section titled “Related Types”vector
Section titled “vector”A multi-column vector spreads a geometric vector across multiple columns sharing a common field name.
| Desc | Spawn position | Facing direction | |||
| Name | pos | dir | |||
| Type | vector|3|int | vector|2|float32={} | |||
| 1 | 10 | 20 | 30 | 1.0 | 0.0 |
| 2 | 0 | 5 | 0 | ||
Type Definition Syntax
Section titled “Type Definition Syntax”vector|Dim|TDim must be 2, 3, or 4; T must be an integer or a floating-point type.
vector|2|intvector|3|float32vector|4|int32Column Layout
Section titled “Column Layout”Columns map to the x, y, z, w coordinates in order.
Exactly Dim columns are required.
Default Export Value
Section titled “Default Export Value”vector|3|float → no default export valuevector|3|float=/ → {x: 0, y: 0, z: 0}vector|3|float={} → {x: 0, y: 0, z: 0}See Default Export Value for more information.
Export Format
Section titled “Export Format”On data export, a vector becomes an object with x and y fields, extended with z and w according to Dim.
Related Types
Section titled “Related Types”A multi-column tuple spreads a positional struct across multiple columns sharing a common field name.
| Desc | Loot entry | Drop meta | |||
| Name | entry | meta | |||
| Type | tuple|int|string|bool | tuple|string|bool=/ | |||
| 1 | 100 | warrior | true | rare | true |
| 2 | 101 | mage | false | ||
Type Definition Syntax
Section titled “Type Definition Syntax”tuple|T0|T1|T2|...All field types (T0, T1, …) must be Basic Types.
tuple|int|string|booltuple|datetime|durationColumn Layout
Section titled “Column Layout”Columns bind to fields strictly by position. The column count must equal the field count.
Default Export Value
Section titled “Default Export Value”tuple|int|string|bool → no default export valuetuple|int|string|bool=/ → nulltuple|int|string|bool={} → {item0: 0, item1: "", item2: false}See Default Export Value for more information.
Export Format
Section titled “Export Format”On data export, Archmage represents tuples as objects. Keys follow the pattern item0, item1, item2, and so on.
Related Types
Section titled “Related Types”bitflags
Section titled “bitflags”A multi-column bitflags expands a bitflag enum across multiple columns sharing a common field name.
| Desc | Quest flags | Difficulty flags | |||
| Name | flags | diffFlags | |||
| Type | bitflags@QuestSched | bitflags@DiffType=/ | |||
| Options | e=Daily | e=Weekly | e=Event | e=Hard | e=Expert |
| 1 | 1 | 1 | 1 | ||
| 2 | True | True | |||
Type Definition Syntax
Section titled “Type Definition Syntax”bitflags@<enumType><enumType> must be a bitflag enum.
bitflags@QuestSchedColumn Layout
Section titled “Column Layout”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.
Option e
Section titled “Option e”This is a bitflags-only option.
Its value must be the name or shorthand of an enum item belonging to <enumType>.
Default Export Value
Section titled “Default Export Value”bitflags@QuestSched → 0bitflags@QuestSched=/ → 0If the default export value is omitted, Archmage treats it as /, meaning explicit specification is unnecessary.
See Default Export Value for more information.
Export Format
Section titled “Export Format”On data export, Archmage combines all flag bits into a single integer.
Providing Enum Sources
Section titled “Providing Enum Sources”Enum types must be defined in external definition files before they can be used. Pass these files via the --enum-files CLI flag:
archmage export --enum-files "idl/*.enum.yaml" ...archmage struct --enum-files "idl/*.enum.yaml" ...For how to define enum types, see Enum Definition.