Behavior Types
Behavior types act as functional directives that guide the processing pipeline for data export and code generation.
Fields of most Behavior Types are omitted from exported data and do not participate in code generation, except for:
switchis treated asstring.anchoris treated asstringwhen the--emit-anchorsCLI flag is set.
Type Availability
Section titled “Type Availability”| Category | Regular Table | Property Sheet | Tree-Structured Data |
|---|---|---|---|
| Behavior Types | ✓ | △ | △ |
△: placeholder is supported in property sheets and tree-structured data; anchor is supported in tree-backed regular tables.
Type List
Section titled “Type List”| Type | Description | |
|---|---|---|
anchor |
Allows using names instead of integer IDs for cross-table references | View |
assert |
Validates a boolean; raises an error if it fails | View |
condition |
Determines whether to export a config entry; supports expressions and rich matching rules (e.g., cflags=james, v1.2.3) |
View |
switch |
Multi-branch selector in conjunction with the Case header to determine active fields |
View |
placeholder |
Prevents structurally empty objects from being removed | View |
anchor
Section titled “anchor”An anchor supplies a human-readable name for an integer config ID within a regular table or a tree-backed regular table, allowing a ref value to use names rather than numbers.
Given a regular table weapon with IDs 101, 102, 103, and an anchor column holding values sword, shield, bow, then in another table’s ref@weapon column you can enter either 101 or sword — they resolve to the same config entry.
See Cross-Table References for more information.
Default Export Value
Section titled “Default Export Value”anchor → no default export valueanchor=/ → zero value (""), which allows the cell to stay blankSee Default Export Value for more information.
Rules on Values
Section titled “Rules on Values”| Rule | Reason |
|---|---|
Cannot contain | |
The pipe character is the compact type separator |
| Cannot be a pure number | Decimal, hexadecimal, and floating-point strings are rejected to avoid ambiguity with numeric IDs |
| Must be unique | Duplicates are rejected; the comparison is case-insensitive |
| Matching is case-insensitive | FireBall matches fireball |
Data Export
Section titled “Data Export”By default, anchor fields are omitted from exported data and do not participate in code generation.
The --emit-anchors CLI flag overrides this, when specified, treating them as string fields in both cases.
assert
Section titled “assert”The assert type validates a value during data export. It expects a boolean — typically produced by an Excel formula.
| Desc | - | - | - |
| Name | name | hp | hpCheck |
| Type | string | int | assert |
| 1 | Arthur | 100 | True |
| 2 | Merlin | 80 | True |
| Subtable Desc | Skills | |||
| Subtable Name | skills | |||
| Subtable Type | **[] | |||
| Desc | - | - | - | - |
| Name | name | skill | damage | check |
| Type | string | string | int | assert |
| 1 | Arthur | slash | 5 | True |
| thrust | 8 | True | ||
If a value is false, Archmage reports an error and the export fails.
Default Export Value
Section titled “Default Export Value”assert → no default export valueassert=/ → trueassert=1 → trueassert=false → falseSee Default Export Value for more information.
condition
Section titled “condition”Determines whether to export a config entry.
Each regular table may contain zero, one, or multiple condition fields.
A condition value consists of one or more boolean expressions and matching rules, combined arbitrarily with &&.
falseenv@BETA_TESTv1.2.3 && cflags=dev,TomDuring data export, a config entry is skipped if any of its condition values evaluate to false.
| Desc | - | - | - |
| Name | cond | name | damage |
| Type | condition=/ | string | int |
| 1 | v1.2.0 | Fireball | 120 |
| 2 | IceBlast | 90 |
For usage of conditions within tree-structured data, see Conditional Export.
Value Syntax
Section titled “Value Syntax”The condition type supports the following expressions and matching rules:
| Form | Description | |
|---|---|---|
true / false / 1 / 0 |
Literal boolean | |
↷ |
Shorthand for false |
|
env@VAR |
Reads the environment variable VAR as a boolean |
View |
xflags=c,s |
Is true when they satisfy the --xflags CLI flag |
View |
tags=gameplay |
Is true when they satisfy the --tags CLI flag and do not satisfy --tags-xx. |
View |
cflags=dev,Tom |
Is true when they satisfy the --cflags CLI flag |
View |
minver=1.2.3 |
Is true when --semver is at least this version |
View |
v1, v1.2, v1.2.3, v2030.6.1 |
Shorthand for the above minver (must start with v) |
View |
A condition value is true only when all expressions and matching rules joined by && are true. E.g., v1.2.3 && cflags=Tom requires both --semver >= 1.2.3 and Tom satisfying --cflags.
Default Export Value
Section titled “Default Export Value”condition → no default export valuecondition=/ → trueSee Default Export Value for more information.
switch
Section titled “switch”For each config entry, a switch value holds a case label that determines which fields in that entry are active — only fields belonging to the matched case are allowed to have values; fields belonging to other cases must stay blank.
| Case | magic | melee | magic | ||
| Desc | - | - | - | - |
| Name | name | style | range | damage |
| Type | string | switch | int | int |
| 1 | Warrior | melee | 5 | |
| 2 | Mage | magic | 12 | 3 |
Default Export Value
Section titled “Default Export Value”switch → no default export valueswitch=/ → empty string ""switch=melee → "melee"See Default Export Value for more information.
Data Export
Section titled “Data Export”switch values are exported as strings, just like regular data fields.
placeholder
Section titled “placeholder”A placeholder field prevents structurally empty objects from being removed. It produces no output in data export or code generation.
| Subtable Desc | Rewards | |
| Subtable Name | rewards | |
| Subtable Type | **[] | |
| Desc | - | - |
| Name | extra.keep | keep |
| Type | placeholder | placeholder |
| 1 | ||
| # |
Default Export Value
Section titled “Default Export Value”placeholder → no default export valueplaceholder=/ → accepted but has no effectSee Default Export Value for more information.