The m4nfo User manual and Technical Report

Standardized Railtype Scheme

The "Standardized Railtype Scheme" builds on work done by Snail and mb in their Alpine Vehicle Set project, and work done by other members on tt-forums. It has been discussed and worked out in several topics on tt-forums since then. This text is a minor adaptation of a final report written by FooBar (Jasper Vries), see discussion thread on tt-forums.

The aim of this scheme is to bring order to an uncontrolled growth of railtype labels, by grouping rail types into what matters from a technical perspective. The scheme provides a standardized way of defining railtype labels, based on track type (e.g. gauge), speed class, allowable axle weight, and electrification type.

It is the explicit intent of this scheme to decouple track sets from vehicle sets to facilitate easy mixing. In this way, the player can select a track set of choice to go with a train set of choice. It allows the player to play with or without axle load classes, or with or without speed limit classes, simply by loading a track set that does or does not provide these features. In some cases it will also be possible to combine niche track sets, for instance a standard gauge track set with a narrow gauge and a metro track set.

Content

The Label Scheme

A railtype label consists of four characters with each position serving a different purpose:

In the next sections, each of the four categories will be explained.

Track type class [X---]

The first character position in the railtype label defines the track type class. Following classes are currently defined:

Track type
 S Standard gauge rail
 B Broad gauge rail
 N Narrow gauge rail
 n Secondary narrow gauge rail (e.g. when providing both metre and cape gauge, always use N in case of just one type of narrow gauge)
 D Dual gauge rail, standard+broad gauge
 d Dual gauge rail, standard+narrow gauge
 M Monorail
 L Magnetic Levitation

Speed limit class [-X--]

The second character position in the railtype label defines the speed limit class. These classes do not map to a fixed numeric value, but are used to define an internal speed limit order for the track set. This means that if your track set has two different speed limits for track types that are otherwise identical, you'll use letters A and B here. In case of three different speed limits, use A, B and C. In case your track set does not employ speed limits, always use A. Train sets do not care about the speed limit, and will always set the lowest speed class, i.e. A.

This gives for instance the following options:

 Speed limit class  Speed limit class  Speed limit class
 A no speed limits  A low speed  A low speed
OR  B high speed  B medium speed
  OR  C high speed
    etc

The speed limit class may also be used for some advanced features of the label scheme, like specialized track types and eyecandy purposes. Be careful not to break compatibility with other sets when using the speed limit class for these purposes.

An example of a special use is rack rail. In the French NG set it is used to compensate rack rail vehicles' usually small speed and TE, in comparison to adhesion rail engines, when being used on rack rail. When defining trains with a special speed limit class, always allow a fallback to speed limit class A via the railtype table.

An example of eyecandy use are urban tracks. These are a variation of regular tracks, but with concrete ground tiles to better match the urban environment. Train sets must not define vehicles for eyecandy classes. If you think you have special vehicles that should only run on the eyecandy class, it is not eyecandy but a separate track type.

The following special and eyecandy classes have been defined so far:

 Description TypeUsed by
 A - H speed limitsreserved
 R rack railspecialFrench NG set
 S subterraneaneye candyMetro track set
 U urban

Axle load class [--X-]

The third character position defines the axle weight limit. Since heavy trains cannot run on tracks with a low axle weight limit, these trains need more expensive tracks with a heigher weight limit. In the Standardized Railtype Scheme, there are five axle load classes A through E. A is for the lowest axle load limit, E for the highest. The exact axle load attached to each class is relative to the track type and trains in the set.

A train set should set appropriate axle weight for each train via the railtype label, as to make the set work with track sets that do provide tracks with different weight limits, even if you don't care about it for your trainset. Split all vehicles of a certain track type into five groups of similar axle weights. The group with the lowest axle weights will get class A, the second lowest class B, etc., up to the group with the highest axle weights which will get class E. Do the same for the other track types if your train set has those.

If you don't want to provide any axle load classes in your track set, it doesn't really matter what axle load class you choose for the track, as you'll be mapping all other classes to this track anyway. But the lowest or highest class are the obvious choice. Example: if your track set only provides narrow gauge unelectrified track with no speed limits and no axle load limits, you may use NAAN for the track label, and provide NABN, NACN, NADN, NAEN by function alternate_list().

If you need more than five axle load classes, you may use lowercase letters for very low axle loads, and continue the uppercase letters for very high axle loads. Be advised that your train set may not assume the existence of any other class than A through E, so when expanding the range make sure to program your railtype table in such a way that trains with those classes will fall back to class A or E. If you make a track set with an extended range, be aware that not all train sets will define trains for these tracks. So, only do this in case of a train set with a matching track set.

For the lowercase letters, b is lower than a, so for increasing axle load limits, ranking is b < a < A < B < C etc.

Note that axle load classes never map to a specific weight in tonnes. For that reason it does not make sense to add a numeric value for axle load to the name of a track type or in the extended purchase info of a train. Instead, use the relative expressions 'very low', 'low', 'medium', 'high' and 'very high' or, better, use the class letters directly.

Energy source type class [---X]

The last character position defines the energy source type class. This one is split in generic energy source types like overhead wires and third rail, and specialized types like alternating and direct current.

A track set that only uses specialized types, should map the generic types to the most suitable specialized type in the set.

A vehicle set that uses specialized types should define a generic type as fallback, via the railtype table. If such a fallback is omitted, please note that certain vehicles may be unavailable depending on track set loaded.

 Generic energy type classes
 N no electrification
 E overhead wires/catenary electrification
 3 3rd rail electrification

 Specialized energy type classesVehicle set fallback
 Z 3rd rail and catenary electrification3 or E
 4 4th rail electrification3
 Y 4th rail and catenary electrification4 or E
 T three phase AC electrificationE
 D DC catenary electrificationE
 d low voltage DC catenary electrification (only when D also used in set)E
 A AC catenary electrificationE
 a low voltage AC catenary electrification (only when A also used in set)E

If you want multi-voltage/current vehicles in your set (i.e. a train that can run on both AC and DC), you'll have to define a dedicated railtype for those vehicles. Without the railtype, it'll not possible to define vehicles with this property. If you only have vehicles that can run on either one type of voltage/current or on all types of voltage/current (e.g. a 2-system if you only have A and D tracks, or a 4-system in case of all A, a, D and d), then use the generic class E for vehicles that should be able to run on all different voltage/currents. Also the track set needs to have at least one railtype with class E defined.

Note that if you want more than one type of multi-voltage/current, you'll quickly get a combinatory explosion of railtype labels, so plan carefully or do not attempt it. For every different multi-voltage/current vehicle types a dedicated railtype is needed. If you want all possible combinations, then you'd need to define an additional 8 classes. It is not recommended to make your train/track set this complicated.

Example approach for a 4-system set, with trains that can run on either one or all systems:

For a 2-system set, you can simply drop a and d.

Standard labels: RAIL, ELRL, MONO, MGLV

It is not possible to undefine the standard railtypes RAIL, ELRL, MONO and MGLV. The game will always add those if there are vehicles defined for these track types. As a result, for a track set it is best not to ignore those standard labels, but rather work with them and define them in the set. If your track set does not have monorail or maglev tracks, then of course there is no need to define them. But if your track set defines anything that resembles unelectrified or electrified rail, you should use the RAIL and ELRL labels. Matching labels from the above scheme will then be defined in function alternate_list().

As vehicles from NewGRFs that do not use explicit railtypes will end up on these standard railtypes, you should use RAIL instead of whatever type could be regarded as the most commonly used unelectrified type, ELRL instead of the most commonly used electrified type, and so on. The label according to this scheme is then set as an alternate.

Summary for track sets

This section summarizes above information for coding track sets.

[X---] Track type class

[-X--] Speed limit class

[--X-] Axle load class

[---X] Energy source type class

Standard labels [RAIL, ELRL, MONO, MGLV]

Or, put differently, for each track type, select one or more energy source types. For each type/energy combination provide all axle load classes for the speed class A, either as a real type or as an alternate of another type. Provide more types with a different speed letter if you want to provide several different speeds or other eye-candy tracks.

Summary for train sets

This section summarizes the above for coding train sets.

[X---] Track type class

[-X--] Speed limit class

[--X-] Axle load class

[---X] Energy source type class

Standard labels [RAIL, ELRL, MONO, MGLV]

Be as specific as you want when selecting the railtype, it is the job of the track set to select a playable, reduced subset out of all possible type combinations.

Conclusion

Adopting this scheme gives the player freedom to use any track set in combination with any train set that follow the scheme.

This means that you can make your train set compatible with track sets that provide axle load classes, and track sets that provide speed limits, and at the same time with track sets that provide none of this. This way, the player can decide to play with or without axle load classes, or with or without speed limits, simply by loading a track set that does or does not provide these features.

And for the track set authors, it means that you can make it as simple or as complicated as you want (within the 16 track type limit), while not having to worry about compatibility with train sets.