Skip to content

Options

Options hold settings for filtering, validation, export behavior, and code generation.

Category Description
Filtering Options Give each run of a subcommand (enum, export, struct) its own view of the input data View
Validation Options Verify field values against configured constraints during data export to prevent invalid data View
Other Options Cover options outside the filtering and validation groups View

Options can be defined in:

Each option follows the form:

name=value

The equals sign (=) separates the name from the value.

Option names are case-insensitive.

DescPlayer nameLevel
Namenamelevel
Typestringint
OptionsmaxLen=20interval=[1,100]
1Alice10
2Bob55

If a value contains && or other delimiter characters, it must be quoted:

regexp=`^\d+&&\w+$`
whitelist="abc,xyz",foo,bar

There are two ways to specify multiple options for a field:

  1. Single cell: Separate options with &&. Line breaks between options are allowed for readability but do not act as delimiters.
  2. Additional cells: Add more Options rows (regular table) or Options columns (property sheet). Each cell holds only one option.
DescPlayer nameScore
Namenamescore
Typestringint
OptionsminLen=2 && maxLen=20interval=[0,9999] && nonzero && tags=demo
1Alice100
2Bob250

When an option applies to many fields, entering the full name=value pair in every cell is tedious. A dedicated option solves this — in regular tables, label a superheader row as $>xyz, where xyz is the option name, and each cell in that row requires only the option value.

In property sheets, the same mechanism applies but uses columns instead of rows.

DescNameHPServer noteTitle
NamenamehpserverNotetitle
Typestringintstringstring
Optionsinterval=[0,100)
$>xflagsc,sc,ss
1Warrior500tankGuardian
2Mage300dpsArcane Architect

A target modifier is a prefix on the option name. It selects the type-hierarchy layer the option applies to.

Modifier Target Layer
(none) Auto-resolved (see below)
!! Basic Type
>> Compact Type
~~ Multi-Column Type
** Subtable Type

Auto-resolved (no modifier): Archmage determines which layers — Basic Type, Compact Type, or Multi-Column Type — are compatible with the option. If exactly one match is found, the option applies there. If multiple layers match, Archmage asks you to add a modifier to specify the intended layer. Auto-resolution does not reach the Subtable Type layer — use ** to target it explicitly (e.g., **minLen=3).

A layer is targetable only if it contains exactly one candidate. For example, a compact tuple’s sub-fields all belong to the Basic Type layer and therefore constitute multiple candidates. Even with !!, an option cannot be applied to those sub-fields.

DescCategoriesRewardsSkills
Namecategoriesrewardsskills
Type>>[]string>>[]string[]string
Options!!minLen=1>>maxLen=5~~maxLen=3
1epicsword|shield|bowslashthrustguard
2common|dailypotionbash

Each column of a multi-column type may carry identical or different options. Archmage collects them from all columns, deduplicates, and applies each option to its target.

For minmax, vector, tuple, and bitflags, their child-level options are the exception — Archmage resolves them per column instead. For example, the min and max columns of a minmax type can have different validation options.

DescLevel range
NamelvlRange
Typeminmax|int
Optionsinterval=[1,20]interval=[50,100]
1550
21070

Options appear as the options {...} field inside a Meta Node. Keys define option names; values define their settings, written in the format’s natural key-value syntax.

demo: 1357-88-99
demo__meta__:
type: string
options:
regexp: \d{4}-\d{2}-\d{2}
tags: demo

Target modifiers (!!, >>, ~~, **) are not supported here. Each meta node binds to a specific data node, so there is no type-hierarchy ambiguity to resolve.