Brace Flags
Brace flags are the name suffix in curly braces (e.g., {en}, {cn,fr}) used to define field variants. They are designed for mutually exclusive config sets with only minor differences.
Applicable to: field names, section names, and subtable names in spreadsheets; field names in tree-structured data.
Field Variant Activation
Section titled “Field Variant Activation”A field variant is active only when its brace flags explicitly satisfy the --brace-flags CLI flag.
--brace-flagsnot set |
--brace-flagsmatch (e.g. en) |
--brace-flagsmismatch (e.g. cn) |
|
|---|---|---|---|
No brace flags (e.g. foo) |
active | active | active |
foo{en} |
inactive | active | inactive |
foo{++en} |
inactive | active | inactive |
An active variant overrides the corresponding unflagged field when present. For example, an active name{en} replaces the base name.
During data export and code generation, Archmage strips {...} from field names. For example, name{en} becomes name.
Examples
Section titled “Examples”| Desc | Pet | Default Gacha Rate | EN Gacha Rate | CN Gacha Rate |
| Name | pet | rate | rate{en} | rate{cn} |
| Type | string | float | float | float |
| 1001 | Dragon | 0.015 | 0.02 | 0.01 |
| 1002 | Phoenix | 0.06 | 0.08 | 0.05 |
{ "1001": { "pet": "Dragon", "rate": 0.015 }, "1002": { "pet": "Phoenix", "rate": 0.06 }}{ "1001": { "pet": "Dragon", "rate": 0.02 }, "1002": { "pet": "Phoenix", "rate": 0.08 }}{ "1001": { "pet": "Dragon", "rate": 0.01 }, "1002": { "pet": "Phoenix", "rate": 0.05 }}