$DEF, $DEFINE, $DEFINE_MACRO
Defines a macro.
Macros can be a vehicle, a part of a train or even an entire train. They are useful when there is something that must be used or performed multiple times. Macros can also be nested within other macros. For example:
The same macro name can be "recycled" - that is, defined more than once in the Timetable File. However, the macros are read in reverse order from the end to the beginning (from the last macro defined to the first macro defined).
All of the macro definitions will be stored into memory first, and the movements will be evaluated after that. For example:
is a useless double definition: Though it would appear that the second macro redefines the term GS, in fact, after defining all of the macros,
The reason for the redefinition is to extend the meaning of a macro - or a simple vehicle name. Its intended position should be after an
If the following definition is inside an included file:
and you write after the
then the name GS will be a choice from all three freight car types.
In the case of nested macros, the individual macros will be read from the position of the expanded macro backwards. This strategy allows one to redefine a macro or a picture name many times. The intended usage for this feature is to append modifiers to the pictures (if this wasn't done in the Stock List) or to change the behaviour of some vehicles.
Macros can call other macros, but the macros being called must appear before the macro(s) which call them. For example:
In this example, the macro defined as
The Configuration Window
Configuration Window Menu Bar
Stock List Menu Bar
Graphic Testpad Menu Bar
Timetable Syntax and Semanics
The timetable header
Sections, Groups, Lines, Scenes
Stock List File