Standardized Railtype Scheme

From GRFSpecs
Jump to navigationJump to search

This railtype label scheme aims to bring order to the uncontrollable growth of railtype labels. It groups the rail types into what matters from a technical perspective. The scheme provides a standardized way of defining railtype labels, based on track gauge and type, speed class, allowable axle weight and electrification type. Train sets that follow the scheme will be compatible with a large selection of track sets that also follow the scheme. That 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.


The Label Scheme

A railtype label consists of four characters. In this scheme, each position has a different purpose:

  1. Track gauge and type class (e.g. standard gauge rail, narrow gauge rail, monorail)
  2. Speed limit class
  3. Axle load class (maximum allowed axle weight for this track)
  4. Energy source type class

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


Track gauge and type class [X***]

The first position in the railtype label defines track gauge and/or track type class. The following classes are currently defined:

Track type/gauge
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 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
A no speed limits

 OR 

Speed limit class
A low speed
B high speed

 OR 

Speed limit class
A low speed
B medium speed
C high speed

 etc. 

A track set may also use the speed limit class for eyecandy purposes, for instance when providing an urban track type with concrete gound tiles. The following eyecandy classes have been defined so far:

Eyecandy class
A-H reserved for speed limits
U urban
R rack rail


Axle load class [**X*]

The third position defines the axle weight limit. Heavy trains cannot run on tracks with a low axle weight limit; these trains need more expensive tracks with a heigher weight limit. A track set does not have to provide a dedicated track type for each axle weight limit. A train set should set the 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.

The naming scheme followed here is derived from the European Standard EN 15528. Note that the limits in the table below are not set in stone. If for your train set it makes more sense to deviate slightly from it, then you may do so. Example: you have engines with axle loads 15 t, 17 t, 18 t and 21 t. According to EN 15528 you would get classes A, B and D, but for gameplay reasons it may be more interesting to put the 18 t engines in class C.

Axle load limit
A 16 t
B 18 t
C 20 t
D 22.5 t
E 25 t
F 27.5 t
G 30 t

A track set that does not provide a dedicated track for each axle load class, must make sure to map all undefined axle load classes to a real railtype using property 1D (NFO) or alternative_railtype_list (NML). This way a train set can rely on all labels for all axle load classes being available. Example: if you only want to provide 20 t and 30 t axle load classes for standard gauge unelectrified with no speed limits, you map SAAN + SABN to SACN and SADN + SAEN to SAGN.

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 anyways. 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, NAFN, NAGN in property 1D (NFO) or alternative_railtype_list (NML).

If you want a axle load class lower than 16 t, you may use lowercase letter a for that, or a and b if you want to split it even further (b is a lower limit than a, so for increasing axle load limits: b < a < A < B < C etc.). Be advised that your train set may not assume the existance of any other class than listed above, so when using lowercase class letters make sure to program your railtype table such that trains with such a class will fall back to class A if the lowercase class is not defined. If you make a track set with very low axle load limits, be aware that not all train sets will define trains for these tracks. In general: only do this in case of a train set with a matching track set.


Energy source type class [***X]

The last position defines the energy source type class. This 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 classes Vehicle set fallback
4 4th rail electrification 3
Z 3rd rail and catenary electrification 3 or E
D DC catenary electrification E
d low voltage DC catenary electrification (only when D also used in set) E
A AC catenary electrification E
a low voltage AC catenary electrification (only when A also used in set) E
C two phase catenary electrification E
T three phase catenary electrification E


Standard labels: RAIL, ELRL, MONO, MGLV

It's 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's 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, there of course is no need to define those. 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 property 1D (NFO) or alternative_railtype_list (NML).

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 the above for track sets.

[X***] Track gauge and type class
  • Define at least one track type for every track gauge/type class you want in your set.
  • If you only provide tracks for one gauge/type, consider leaving some free railtypes so a player can load an additional set for some other type.
[*X**] Speed limit class
  • Make sure class A is always available, either directly or via an alternate label.
  • Use only class A if you don't want speed limits;
  • With speed limits, A is the lowest speed limit. Continue with B, C, etc. for increasing speed limits;
  • The speed class can also be used to implement additional eye-candy track types, use letters higher in the alphabet for this.
[**X*] Axle load class
  • Always define all classes A through G for every track type class / electrification combination, either:
  • Extend the predefined classes only if you also provide a train set that makes use of these.
[***X] Energy source type class
  • If your set only uses specialized classes, always map the generic classes to the closest matching specialized type via property 1D.
Standard labels [RAIL, ELRL, MONO, MGLV]
  • Always define the standard labels when possible, instead of what would be the equivalent of the standard label in this scheme.
  • Map the equivalent labels from this scheme to the standard labels using property 1D (NFO) or alternative_railtype_list (NML).

Or, put differently, for each gauge/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 train sets.


[X***] Track gauge and type class
  • Use the track type class that matches the vehicle;
  • Define a fallback type via the railtype table in case you want the vehicle to be available on a different track if no matching track set is loaded.
[*X**] Speed limit class
  • Always use class A for every vehicle.
[**X*] Axle load class
  • Use all classes A through G according to the maximum axle weight of the vehicle.
  • Extend the predefined classes only if you also provide a track set that makes use of these;
    • When extending the predefined classes A through G, define a fallback type via the railtype table in case you want the vehicle to be available if no matching track set is loaded.
[***X] Energy source type class
  • Use the energy source type class that matches the vehicle;
  • When using specialized classes, define a fallback type via the railtype table in case you want the vehicle to be available if no matching track set is loaded.
Standard labels [RAIL, ELRL, MONO, MGLV]
  • Define a fallback type to the standard labels via the railtype table in case you want the vehicle to be available on the standard tracks if no matching track set is loaded.


In case you're not convinced by this scheme

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 your track set, 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.

Still not convinced? Feel free to use railtype labels of your own, but know that you will likely come to regret that at some point in the future.