Skip to content

Column header

Leon Starr edited this page Jul 30, 2026 · 1 revision

The line below the class name is the column header. It names the attributes being populated and fixes the order in which values appear in every row of the block.

Cabin
Shaft | Travel direction | Current floor
--
{ [S1] [.up]   [3]  } > PICKUP DROPOFF
{ [S2] [.down] [PH] } > PICKUP DROPOFF
--

The grammar is:

class_attrs = col_name (' | ' col_name)* EOL
col_name = ref_list / icaps_name / '_state'

The separator

Columns are separated by ' | ', matched as a literal, so that is exactly one space, a pipe, and exactly one space. Shaft|Travel direction will not parse and neither will a pipe padded out with extra spaces. Only the values in the rows beneath can be padded for alignment.

Attribute columns

The ordinary case is an icaps_name naming an attribute of the class, as spelled in the xcm class model file. The convention for attributes is that only the first word is capitalized, hence Travel direction and Average cabin speed, but the grammar accepts an uppercase letter starting any word.

Reference columns

A column may instead name the relationship it formalizes, as R1>Bank does here:

Shaft
ID | In service | R1>Bank
--
{ [S1] [true] @L }
--

This is the ref_list alternative, and it changes what you write in that position in each row — an @alias pointing at an instance declared elsewhere in the file instead of a literal value. References covers when to reach for this and how it interacts with Aliases.

Order is what matters

The header is positional. The first value in a row belongs to the first column, and so on. Nothing else ties a value to its attribute, which is why a reference column is kept inline among the attribute columns in the parser result rather than being split off into a separate list — pulling references out would break the alignment between header and row.

You are free to order the columns however you like, and the file is easiest to read when the identifying attributes come first.

The _state column

The grammar admits a literal _state as a third kind of column name. The parser gives it no special treatment: it comes back as the plain string _state in the header and the value beneath it comes back as an ordinary value, indistinguishable from an attribute. Initial states in current scenario files are written after the closing brace of a row instead, which is the form the parser reports separately and the form documented under Initial states.

Clone this wiki locally