Passive Types
Passive types require no manual input; their values are derived from references or context.
Type Availability
Section titled “Type Availability”| Category | Regular Table | Property Sheet | Tree-Structured Data |
|---|---|---|---|
| Passive Types | ✓ | ⁕ |
⁕: Passive types are supported in tree-backed regular tables.
Type List
Section titled “Type List”| 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 |
backref
Section titled “backref”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 | - | - |
| Name | name | ownedItem |
| Type | string | backref@item |
| 1 | Arthur | |
| 2 | Merlin |
Type Definition Syntax
Section titled “Type Definition Syntax”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.
Default Export Value
Section titled “Default Export Value”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.
Preferred Reference
Section titled “Preferred Reference”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.
Option crude
Section titled “Option crude”This option applies only to reference types. When crude=true, Archmage generates a field as a plain integer or string instead of XRef.
Related Types
Section titled “Related Types”backref-n
Section titled “backref-n”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 | - | - |
| Name | name | items |
| Type | string | backref-n@item |
| 1 | Arthur | |
| 2 | Merlin |
Type Definition Syntax
Section titled “Type Definition Syntax”backref-n@<source>See backref for a detailed explanation.
Modifiers
Section titled “Modifiers”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 |
Default Export Value
Section titled “Default Export Value”backref-n@item → zero value (null)backref-n@item=/ → zero value (null)backref-n@item={} → an empty arrayThe 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.
Preferred Reference
Section titled “Preferred Reference”Any number of referrers is allowed, yet ref@++ still applies: marked fields in the source table exclude unmarked ones from the array.
Option crude
Section titled “Option crude”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.
Related Types
Section titled “Related Types”origin
Section titled “origin”The origin type indicates the source of a config entry.
| Desc | - |
| Name | src |
| Type | origin |
| 1 | |
| 2 |
Default Export Value
Section titled “Default Export Value”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.
Typical Use Case
Section titled “Typical Use Case”A virtual table consists of multiple partitions. The origin type can indicate which partition each config entry belongs to.