Standardized Railtype Scheme

From GRFSpecs
Jump to navigationJump to search

This railtype label scheme aims to bring order to the uncontrolled 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.

It is the explicit intent of this scheme to decouple track sets from vehicle sets to facilitate easy mixing. 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.


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. 

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 the 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 set it is used to give rack rail engines a higher speed and TE than normal rail engines when 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 gauge/type.

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

Description Type Used by
A-H speed limits reserved
R rack rail, that allows this vehicle to not slow down going uphill special French Set Rails
S subterranean eyecandy Metro Track Set
U urban eyecandy Metro Track Set

Rack rail needs a bit greater of a explanation, idealy it would be coded in a way where both Pure rack and Rack-and-adhesion systems are supported. This can be achieved by making regular tracks powered on rackrail without the opposite being true. This means vehicles defined for NRAN can't go on NAAN (like a pure rack system) but NAAN vehicles can go on NRAN (like a rack-and-adhesion system). Currently French Set Rails implements compatiblility both ways which makes pure rack systems impossible.

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. 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 gauge/type and trains in the set.


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, even if you don't care about it for your trainset. Split all vehicles of a certain track gauge/type into five groups of similar axle weight. 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 gauge/types if your train set has those.


A track set does not have to provide a dedicated track type for each axle weight limit. 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 2 axle load classes for standard gauge unelectrified with no speed limits, you can map SAAN + SABN to SACN and SADN to SAEN if the cost difference between the two railtypes is high, or SAAN to SABN and SACN + SADN to SAEN if the cost difference is low.

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


If you need more than five axle load class, 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 existance of any other class than A through E, so when the range make sure to program your railtype table such that trains with such a class 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. In general: 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: b < a < A < B < C etc.


Note that the 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 the 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 use the class letters directly.

If a guideline is needed for updating a set to use axle loads in a train set where they don't yet exist, the following might serve as a basic "generic" guideline...

Indefinite Generic First usage
c Horse-drawn Wagonway 1 metric tonne (1000kg) per axle 1594
b Iron Plateway 1 metric tonne (1000kg) per axle 1799
a Prototype Rails 5 metric tonnes (5000kg) per axle; Because reserved by examples 1820
A Very Low (2012 OG Default) 10 metric tonnes (10000kg) per axle 1828
B Low (2024 "New" Default) 20 metric tonnes (20000kg) per axle 1968
C Medium 30 metric tonnes (30000kg) per axle ~1978
D High 40 metric tonnes (40000kg) per axle 1988
E Very High 50 metric tonnes (50000kg) per axle 2008
F Future-proofing No limit per axle (update in 2030 or so?) ~2028

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
Z 3rd rail and catenary electrification 3 or E
4 4th rail electrification 3
Y 4th rail and catenary electrification 4 or E
T three phase AC electrification E
 
D DC catenary electrification E
d low voltage DC catenary electrification (only when D also used in set) First A then E
A AC catenary electrification E
a low voltage AC catenary electrification (only when A also used in set) First A then E

If you want multi-voltage/current vehicles in your set (i.e. a train that can run on both AC and DC current), you have to define a dedicated railtype for those vehicles. Without the railtype, it's 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 one 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 type a dedicated railtype is needed. If you want all possible combinations, then you 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:

  • E: generic catenary-powered electric engines. "universal" [4-system] if any of D/d/A/a are defined.
  • A: generic AC catenary electric engines. 25kV only if a also defined. Vehicle sets should use E as fallback, if defining an engine for A;
  • a: 15kV AC catenary electric engines. Only defined if A also defined. Vehicle sets should use A and E as fallback, if defining an engine for a;
  • D: generic DC catenary electric engines. 3kV if d also defined. Vehicle sets should use E as fallback, if defining an engine for D;
  • d: 1.5kV DC catenary electric engines. Only defined if D also defined. Vehicle sets should use D and E as fallback, if defining an engine for d.

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


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 E 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.
    • Specialized subtypes like "n" might not always be available. If you want those vehicles to be still available then, fall back the the generic class (e.g. "N").
[*X**] Speed limit class
  • Always use class A for every vehicle.
[**X*] Axle load class
  • Use all classes A through E 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 E, 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.


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.

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 64 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.


Forum topic

If you want to discuss the standardized railtype scheme or have any questions about it, you can visit the forum topic.

"Innsbruck 2022 Convention" for partial compliance

This is really esoteric, but eh. It was the product of long discussion / debate / argument / reasoning between grf authors.

1. The Standardized Railtype Scheme is a useful tool for providing reliable compatibility between train grfs and railtype grfs.

2. The axle load class in the scheme presents a number of issues for compliance.

2.1. Over 10 years since the scheme was standardised, not many train grfs implement multiple axle load classes as required by the scheme. Known examples that do comply include Dutch Train Set, French Narrow Gauge Trains, and Finnish Trains.

2.2. Elements of the axle load rules have proven hard to interpret. For example:

  • is it compliant to use fewer than 5 classes in a train grf? There is a lack of consensus on this.
  • axle load is only one of many factors that govern whether a vehicle is compatible with a route, for example loading gauge, minimum curve, signalling types etc

2.3. Meanwhile multiple existing train grfs use class A for the axle load for all trains (except where relying on default railtypes such as RAIL and ELRL).

3. The Innsbruck 2022 Convention uses class A for axle load for all trains in a train grf (except where relying on default railtypes such as RAIL and ELRL).

This is not fully compliant with the Standardized Railtype Scheme and does not claim to be.

However train grfs using the Innsbruck 2022 Convention are broadly compatible with railtype grfs using the Standardized Railtype Scheme.

Obligatory XKCD link about 'standards': https://xkcd.com/927/

Known issues

Known problems are that trains using only class 'A' may limit the ability of railtype grf authors to achieve their design goals for separating railtypes by axle load. But on reflection, it can be seen that a train grf might not be able to provide a broad enough range of vehicles to cover at least 5 axle load classes.

3.1. The Innsbruck 2022 Convention is not appropriate for train grf authors who wish to provide more than one axle load class.

3.2. The Innsbruck 2022 Convention treats the meaning of class A as undefined, ignored or compatible with most restricted railtype for axle load.

Axle load class A cannot be safely interpreted as universal because from the perspective of a railtype grf A is most restricted railtype, where universal is better represented as least restricted railtype. Depending how many axle load classes are in use by the railtype grf, this could be class B, C, D, E etc. To illustrate this issue, take the following scenario

  • railtype grf defines axle loads A to E. In this case the railtype grf author intends that A is compatible with the smallest range of vehicles, E is compatible with the largest range of vehicles, and B, C and D are compatible with some intermediate ranges of vehicles
  • but the vehicle grf author has defined all vehicles to be axle load A in an attempt to express this vehicle is universal. The result in the game is that an identical range of vehicles will be compatible with railtypes A to E.

This is clearly not the intended outcome of the railtype author. But nor is it clear within the spec that the vehicle author has particularly done anything wrong.

It would be possible to use railtype availability testing to adjust the vehicle property 05 (track_type) to fit the highest defined axle load (E in this example case), but this is not insignificant work, and it's unlikely to be widely adopted by vehicle grf authors. Nor would this solution achieve universal as all vehicles in vehicle grf then would be incompatible with types A through D.

3.3. When the Innsbruck 2022 Convention is used, this does not prevent a train grf being extended in some future release to achieve full compliance with Standardized Railtype Scheme. That choice remains with train grf authors.

3.4. If 2012 could be revisited, providing an optional _ axle load class in the Standardized Railtype Scheme for undefined would have been preferable, but as of 2022, A is already widely used for this purpose, and time travel is not known to be possible.

Extended multivoltage support addition

These are extensions to the energy source type class currently supported by SETS and xUSSR Rails which allow trainsets to code trains which are limited to a certain selection of voltages. As stated in the energy source type class section this might not be of use for all sets, as such it is optional but still recommended for trainsets for ideal functionality with tracksets which support the extended labels.

Specialized energy type classes Vehicle set fallback
* Equivilent to A, a, D and d E
 
' Equivilent to A, a and D E
^ Equivilent to A, a and d E
_ Equivilent to A, D and d E
, Equivilent to a, D and d E
 
$ Equivilent to A and a First A then E
= Equivilent to D and d First D then E
) Equivilent to A and D E
( Equivilent to A and d E
] Equivilent to a and D E
[ Equivilent to a and d E

Possible additions

Track type/gauge
_ Universal "cheat" rail; ALWAYS add "_A_-" and "_A_N" to EVERY alternative_railtype_list (NML) (as well as the equivalent electrified/pneumatic railtype that is powered on your electrified/pneumatic railtype to support it if you are making a new railtype set, older sets can be covered by fix or patch grfs) and "_A_t" to EVERY powered_railtype_list (NML)
0 (A number zero, not a letter "Oh") No track, eyecandy-use only
U "Ukrainian monorail" or Şaropoí̈zd (Шаропоїзд), a u-shaped concrete "monorail trench" from 1920's Soviet Union; see the Yarmanchuk Express for graphics
1 Early Monorail; See here and here
G Gyrail; Gyro monorail/Gyroscopic monorail/Gyro-stabilized monorail for description and IRL example, and here (archived) for good fictional examples
m Minimum gauge rail; 15 in (381 mm), 400 mm (15+3⁄4 in), 16 in (406 mm), 18 in (457 mm), 19 in (483 mm), 500 mm (19+3⁄4 in) or 20 in (508 mm)
n 600mm "Decauville" or "Feldsbahn", formerly labelled "NG60" before standardization; the most common narrow gauge track type in OpenTTD other than metre gauge, 600mm gauge is thus ideal for taking up the "n" gauge, though this is an ultimately optional distinction
7 750mm, Bosnian gauge (760 mm), and 762mm; all start with 7 and are close in size
3 Swedish 3 foot (891 mm), 900mm, 3 foot (914 mm) and Italian Metre (950mm) gauges
R Metre gauge; potentially compatible with base tramtype "RABN", most early tramways were metre gauge
4 4 foot gauge (1219 mm), and possibly 4'6" in. (1372 mm) if standardization is needed for 1372mm
s Scotch gauge (1372 mm)
S Standard gauge; already implemented in original standardized railtype scheme, but could include near-standard (1432 mm) as well as existing true standard (1435 mm) and is also potentially compatible with the SABN tramtype
X Omni-gauge rail (for at-grade multi-gauge crossings and stations); ultrabroad/secondary broad/primary broad/standard/primary narrow/secondary narrow gauge
x Multi-gauge rail (for at-grade multi-gauge crossings and stations); secondary broad/primary broad/standard/primary narrow/secondary narrow
+ Quad-gauge (Four-gauge) rail (for at-grade multi-gauge crossings and stations); secondary broad/primary broad/standard/primary narrow
- Four-gauge rail (for at-grade multi-gauge crossings and stations); primary broad/standard/primary narrow/secondary narrow
b Broad gauge rail - As broad gauge is a rare tracktype, it may still be feasible to cement B and b as broad gauges of two differing sizes, but the rarity among gauges in the real world would need to match; Italian (1445 mm) and Dresden (1450 mm) gauges may be better grouped here
t Leipzig trams (1458 mm) and Greater Toronto Area streetcars (1495 mm)
5 1520mm and 5 foot (1524 mm) gauges
V Pennsylvanian (1581 mm and 1588 mm) and Australian "Victorian" (1600 mm) gauges
6 6 foot (1829 mm) broad gauge
g Brunel's Great Western Railway gauge (2140 mm)
B Biggest Broad gauge rail - As broad gauge is a rare tracktype, and the variation in common real life track types too wide, it may be desirable to cement B and b as broad gauges of two differing sizes; With no real life examples that match the usage frequency of "B", the gauge might best draw inspiration from the infamous Breitspurbahn (3000 mm) and the never-built vehicles designed for it, or from the Brighton & Rottingdean Seashore Electric Railway (18 ft/5,486 mm)
L Maglevs that have a u-shaped track
T Maglevs that have a monorail track
F Flightrail; A system capable of high speeds and steep hill grades that uses a pneumatic pipe for propulsion (see "P" under energy sources), and wheels pointed inwards at a 45-degree angle

It might be preferred to instead use/keep "B" for "all (current) broad gauges" (mostly Victorian gauge) instead using lowercase "b" for Brunel/GWR broad gauge. This wouldn't be to different from narrow gauge since the lesser used ones are lowercase and fallback to the uppercase ones.

Electrification Fallback Notes
1 Unspecified monorail electrification MONO (the whole label)
S Maglevs that use a synchronous linear motor N/A
I Maglevs that use a linear induction motor MGLV (the whole label)
V Vactrains/Hyperloop t, then I, then MGLV (the whole label)
t "Universal custom tunnel" (for electrified sub-surface rail tunnels) c, then p, then 7, then U (mandatory)
- Universal energy type (not meant to replace "***N"; use for vehicles such as driving cabs which cannot move under their own power regardless, if desired) N/A (Be sure to put "***E" in the alternative_railtype_list (NML) of a "***-" label) (Do not give a fallback or use for railtypes, this is for unpowered "locomotives" only!)
5 750v DC Outer 3rd Rail ("MTRO" or "SA_3") and 630v DC Inner 3rd/4th Rail; a total of 5 rails (2 for wheels, 3 for electricity), plausible in the London Underground network 3 or 4
U 750v DC Outer 3rd Rail ("MTRO" or "SA_3"), 630v DC Inner 3rd/4th Rail and universal catenary (SAEE); a total of 5 rails (2 for wheels, 3 for electricity) if only one gauge, plausible in the London Underground network and an "ultimate" dual rail electrification without being a cheat (make it expensive or toggle-able?) as SAEU or as XAEU (universal dual rail electrified tracks) E
7 750v DC Outer 3rd Rail ("MTRO" or "SA_3"), 630v DC Inner 3rd/4th Rail, Three-phase AC (SA_T) 3rd/4th rail & catenary, and universal catenary (SA_E); a total of 7 rails (2 for wheels, 5 for electricity) if only one gauge, a truly universal dual rail electrification without being impossible (make it VERY expensive or toggle-able so it isn't cheat-y?) as SAE7, XAE7 or even as XRE7 (combination of ALL two-rail track gauges with universally-compatible electrification including an outer 3rd rail and a paired set of inner 3rd/4th rails, and a rack rail in the exact center; improbable, but not physically impossible) U
P Pneumatic tube with physical piston slit, or closed pneumatic tube with magnetic piston (i.e. that used by Flightrail) N/A
p Pneumatic and universal electrical power P or 7 (Be sure to put "***_" and ***P" in the alternative_railtype_list (NML) of a "***p" label) XREp is a combination of ALL two-rail track gauges with improbably high axle load with universally-compatible electrification including an outer 3rd rail and a paired set of inner 3rd/4th rails, and a rack rail in the exact center; improbable, but not physically impossible)
c Cheat electrification type; use solely for the "_R_c" and "_R_t" railtype labels specifically (runs everything if coded properly), the latter ("_R_t") is for tunnels, while the former ("_R_c") is for "cheat rail upgrade" newgrfs p, then 7, then U, then E, then N, then "SA_-" (the whole label)