Other Options
Options not covered elsewhere.
Option Applicability
Section titled “Option Applicability”| Option | Supported Types |
|---|---|
discard |
- not supported in tree-structured data - all Basic Types but l10n- switch |
pubtype |
explicit and implicit object types |
presence |
tree-structured data |
stripDir, replaceExt |
path |
crude |
ref, backref, backref-n |
e |
bitflags |
Option List
Section titled “Option List”| Option | Description | |
|---|---|---|
discard |
Drop a field from the output but still validate it | View |
pubtype |
Give an object a named, public type during code generation | View |
presence |
Control what happens when a tree field is absent | View |
stripDir, replaceExt |
Transform path values during data export |
View |
crude |
Generate a reference field as a plain integer or string | View |
e |
Assign an enum item to a bitflag column | View |
discard
Section titled “discard”The discard option drops a field from the output.
discard → equivalent to discard=truediscard=trueThe field still goes through all validation steps, from its type’s built-in checks to options.
See Option Applicability for the types this option supports.
pubtype
Section titled “pubtype”The pubtype option gives an object a named, public type during code generation.
pubtype=MyTypeNameIt does not name the field it is set on. Instead, Archmage walks up the type tree from that field to the first enclosing object — whether explicit (such as >>object) or implicit (such as elements of **[], or objects formed by Dotted Names) — and uses that object as the target for pubtype. So pubtype=MobAttrs set on mob.hp names the implicit mob object, not the hp field.
When two fields give their enclosing objects the same pubtype, those objects must have the same structure; a mismatch causes an error. This allows identically structured objects to share a single type definition, whether they reside in the same file or in different files.
presence
Section titled “presence”The presence option controls what happens when a field is absent from the tree-structured data.
presence=<implicit|optional|required>| Value | Behavior |
|---|---|
implicit |
Fill an absent field with its default export value or zero value |
optional |
Allow the field to be absent, with no filling |
required |
Report an error when the field is absent |
The default value is implicit. The --presence CLI flag overrides this default.
A presence setting propagates to every child node in the subtree. A setting on a parent node governs all descendants unless a lower level overrides it.
stripDir, replaceExt
Section titled “stripDir, replaceExt”These options transform path values during data export: strip directory segments or replace the file extension.
See stripDir and replaceExt for full documentation.
The crude option generates a reference field as a plain integer or string instead of a rich reference that links to the target config entry at runtime. It applies to ref, backref, and backref-n.
crude → equivalent to crude=truecrude=trueThe e option assigns a specific enum item to a bitflag column.