Skip to content

Passive Types

Passive types require no manual input; their values are derived from references or context.

Category Regular Table Property Sheet Tree-Structured Data
Passive Types

: Passive types are supported in tree-backed regular tables.

Type Description
backref A single back-reference to the source config entry View
backref-n An array of back-references to the source config entries View
origin The source of a config entry View

The backref@<source> type creates a back-reference for each config entry to the referrer (if any) in the source regular table, forming a bidirectional relationship.

Desc--
NamenameownedItem
Typestringbackref@item
1Arthur
2Merlin
backref@<source>

The <source> after @ specifies the regular table in which the referrers reside:

Source type Source syntax
Excel file (no index table in it) File name
Worksheet (with index table in that file) Worksheet name, or fileName::sheetName
Tree-structured data file File name
Virtual table Virtual table name

These are the common notations; see Referent Syntax for the complete syntax.

backref@item → zero value (0 or "")
backref@item=/ → zero value (0 or "")

The default export value takes effect only when a config entry is not referenced. If omitted, Archmage treats it as /, meaning explicit specification is unnecessary.

See Default Export Value for more information.

A backref binds only one referring config entry from the source table. When multiple ref values reach the same entry, ref@++ determines which of them are eligible for the back-reference.

This option applies only to reference types. When crude=true, Archmage generates a field as a plain integer or string instead of XRef.

The backref-n@<source> type creates an array of back-references for each config entry to the referrers (if any) in the source regular table, forming a set of bidirectional relationships.

Desc--
Namenameitems
Typestringbackref-n@item
1Arthur
2Merlin
backref-n@<source>

See backref for a detailed explanation.

Append modifiers to type definition to control the export behavior:

Type string Behavior
backref-n@<source> No modification
backref-n@<source>|sort Sort the config IDs
backref-n@<source>|compact Remove adjacent duplicates
backref-n@<source>|sort|compact Sort, then remove adjacent duplicates
backref-n@item → zero value (null)
backref-n@item=/ → zero value (null)
backref-n@item={} → an empty array

The default export value takes effect only when a config entry is not referenced. If omitted, Archmage treats it as /, meaning explicit specification is unnecessary.

See Default Export Value for more information.

Any number of referrers is allowed, yet ref@++ still applies: marked fields in the source table exclude unmarked ones from the array.

This option applies only to reference types. When crude=true, Archmage generates a field as an array of plain integers or strings instead of XRef objects.

The origin type indicates the source of a config entry.

Desc-
Namesrc
Typeorigin
1
2
origin → source info: fileName[::sheetName]
origin=/ → source info: fileName[::sheetName]
origin=demo → a custom string ("demo")

If the default export value is omitted, Archmage treats it as /, meaning explicit specification is unnecessary.

See Default Export Value for more information.

A virtual table consists of multiple partitions. The origin type can indicate which partition each config entry belongs to.