New Railtype Label Scheme
Moderator: Graphics Moderators
Re: New Railtype Label Scheme
It's a Wiki, can you not add it yourself?
He's like, some kind of OpenTTD developer.
Re: New Railtype Label Scheme
You need to make an account to edit but account creation for the tt-wiki had been completely disabled.peter1138 wrote:It's a Wiki, can you not add it yourself?
Re: New Railtype Label Scheme
I created grf with 600mm narrow gauge stock and appropriate tracks (NG60 narrow gauge and NG6R dual gauge), but after reading this thread, I'm afraid, that my names didn't comply with railtype naming scheme.
Is it a issue, or I can leave it as it is?
Is it a issue, or I can leave it as it is?
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Re: New Railtype Label Scheme
It probably isn't an issue because 600mm is quite obscure. Not many people will be developing for that gauge. The biggest problem is probably that they're not on this list, so if people eventually do decide to make 600mm gauge trains they can make it compatible with your set.McZapkie wrote:I created grf with 600mm narrow gauge stock and appropriate tracks (NG60 narrow gauge and NG6R dual gauge), but after reading this thread, I'm afraid, that my names didn't comply with railtype naming scheme.
Is it a issue, or I can leave it as it is?
Re: New Railtype Label Scheme
Well, these 600mm track are relatively cheap in comparison with "regular" narrow gauge from nutrack or Japan set, thus different name is justified to keep them separated.
Another question:
I want to provide different electric traction catenary, how I should name tracks for 3kV DC, 16kV AC and 25 kV AC?
Another question:
I want to provide different electric traction catenary, how I should name tracks for 3kV DC, 16kV AC and 25 kV AC?
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Re: New Railtype Label Scheme
https://newgrf-specs.tt-wiki.net/wiki/S ... .2A.2AX.5DMcZapkie wrote:Well, these 600mm track are relatively cheap in comparison with "regular" narrow gauge from nutrack or Japan set, thus different name is justified to keep them separated.
Another question:
I want to provide different electric traction catenary, how I should name tracks for 3kV DC, 16kV AC and 25 kV AC?
At the bottom here it says:
XXXA 25kV AC
XXXa 15kV AC, while not exactly 16kV AC, it's approximately the same
XXXD Generic DC / 3kV DC
Hope this helped.
Re: New Railtype Label Scheme
Well, the idea of the unified railtype scheme was to allow "compehensive" train and track sets to have a common interface, so you can better mix and match them, instead of vendor-locking "X's train sets only go with X's trackset, and are incompatible with Y's trackset"McZapkie wrote:Well, these 600mm track are relatively cheap in comparison with "regular" narrow gauge from nutrack or Japan set, thus different name is justified to keep them separated.
but for niche systems like these, you get less benefit from trying to fit it into the scheme. however, i would also advise you to put the vehicles for this kind of niche track into a separate train set, and not mix it with your regular gauge train set
- George
- Tycoon
- Posts: 4363
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: New Railtype Label Scheme
Hello.
I'm trying to split xUSSR set into train set and rail set and it seams I have trouble in understanding
https://newgrf-specs.tt-wiki.net/wiki/S ... ype_Scheme
I can't understand the reason to remove original cargo label, while I can specify all the possible alternatives in the alternative_railtype_list ? What am I missing?
Also I can't understand, what is the correct list for alternatives?
I've attached the grf and the NML file, could you please have a look and tell, what should I fix (if required)?
Here goes Electrified rails AC 15kV for the example
Here viewtopic.php?p=1235007#p1235007 I've wrote down the intentions
I'm trying to split xUSSR set into train set and rail set and it seams I have trouble in understanding
https://newgrf-specs.tt-wiki.net/wiki/S ... ype_Scheme
I can't understand the reason to remove original cargo label, while I can specify all the possible alternatives in the alternative_railtype_list ? What am I missing?
Also I can't understand, what is the correct list for alternatives?
I've attached the grf and the NML file, could you please have a look and tell, what should I fix (if required)?
Here goes Electrified rails AC 15kV for the example
Code: Select all
// Electrified rails AC 15kV
item (FEAT_RAILTYPES, er15ac2) {
property {
label: "ERa2";
introduction_date: date(1952, 1, 1);
name: string(STR_NAME_ER15AC2);
toolbar_caption: string(STR_ER15AC2_TOOLBAR);
menu_text: string(STR_ER15AC2_MENU);
build_window_caption: string(STR_ER15AC1_BUILD_CAPTION);
autoreplace_text: string(STR_ER15AC1_AUTOREPLACE);
new_engine_text: string(STR_ER15AC1_NEW_ENGINE);
compatible_railtype_list: [all_broad_rails()];
powered_railtype_list: [all_15AC_broad_rails()];
railtype_flags: bitmask(RAILTYPE_FLAG_CATENARY);
curve_speed_multiplier: 1;
station_graphics: RAILTYPE_STATION_NORMAL;
construction_cost: 230;
maintenance_cost: 7;
speed_limit: 87.5 mph; //140 km/h;
acceleration_model: ACC_MODEL_RAIL;
map_colour: map_color_15ac + 4;
sort_order: 0x19;
alternative_railtype_list: ["ELRL", "BDAa", "SDAa", "BDAA", "SDAA",
"BDBa", "SDBa", "BDBA", "SDBA",
"BDCa", "SDCa", "BDCA", "SDCA",
"BDDa", "SDDa", "BDDA", "SDDA",
"BDEa", "SDEa", "BDEA", "SDEA", "RAIL"];
}
graphics {
gui: rail2_gui;
track_overlay: get_rail2_track_overlay;
underlay: get_rail2_underlay;
tunnels: get_rail2_tunnels;
bridge_surfaces: get_rail2_bridge_surfaces;
level_crossings: get_rail2_level_crossings;
fences: fences_none;
depots: rail1_depots;
catenary_wire: er15ac_catenary_wire;
catenary_pylons: er15ac_catenary_pylons;
}
}
- Attachments
-
- railtrack.pnml
- (45.3 KiB) Downloaded 164 times
Last edited by George on 13 Aug 2020 18:59, edited 1 time in total.
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: New Railtype Label Scheme
It is not possible to delete the default tracktypes (RAIL, ELRL, MONO and MGLV), but you can override other properties of it. For example, in the Dutch Trackset I override ELRL to be some generic slow yard-track, but trains that are defined to be for ELRL can run on all tracks in the set as it defines both the 1500VDC and HSL tracks as compatible and powered.
Basically, the alternative_railtype_list is mainly used for other train sets. It specifies the list of labels which also would apply to your track if not otherwise provided. If I take the Dutch Trackset and Dutch Trainset, I have the 1500VDC which has as main label SADD, but as alternatives "SAAD","SABD","SACD","SADD","SAED". In the Duch Trainset, trains that can only run on 1500VDC tracks use tracktype DC_B, which is defined in the railtypetable as [SABd, SABD, SABE, ELRL]. As you can see, SADD is not in the list, but SABD is in the railtypetable and is an alternative for my SADD-track and is thus used as such. Would no track set be loaded (or not one with the matching labels) the Dutch Trainset falls back to use ELRL as tracktype for all trains (except metros).
I hope this helps a bit.
Basically, the alternative_railtype_list is mainly used for other train sets. It specifies the list of labels which also would apply to your track if not otherwise provided. If I take the Dutch Trackset and Dutch Trainset, I have the 1500VDC which has as main label SADD, but as alternatives "SAAD","SABD","SACD","SADD","SAED". In the Duch Trainset, trains that can only run on 1500VDC tracks use tracktype DC_B, which is defined in the railtypetable as [SABd, SABD, SABE, ELRL]. As you can see, SADD is not in the list, but SABD is in the railtypetable and is an alternative for my SADD-track and is thus used as such. Would no track set be loaded (or not one with the matching labels) the Dutch Trainset falls back to use ELRL as tracktype for all trains (except metros).
I hope this helps a bit.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
- George
- Tycoon
- Posts: 4363
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: New Railtype Label Scheme
Sorry, still confused, let's try to have a closer lookTransportman wrote: ↑12 Aug 2020 16:19 It is not possible to delete the default tracktypes (RAIL, ELRL, MONO and MGLV), but you can override other properties of it. For example, in the Dutch Trackset I override ELRL to be some generic slow yard-track, but trains that are defined to be for ELRL can run on all tracks in the set as it defines both the 1500VDC and HSL tracks as compatible and powered.
Basically, the alternative_railtype_list is mainly used for other train sets. It specifies the list of labels which also would apply to your track if not otherwise provided. If I take the Dutch Trackset and Dutch Trainset, I have the 1500VDC which has as main label SADD, but as alternatives "SAAD","SABD","SACD","SADD","SAED". In the Duch Trainset, trains that can only run on 1500VDC tracks use tracktype DC_B, which is defined in the railtypetable as [SABd, SABD, SABE, ELRL]. As you can see, SADD is not in the list, but SABD is in the railtypetable and is an alternative for my SADD-track and is thus used as such. Would no track set be loaded (or not one with the matching labels) the Dutch Trainset falls back to use ELRL as tracktype for all trains (except metros).
1) do you mean, that alternative_railtype_list should be defined for TRAIN SET only? If so, how can I specify the following behavior by default? I should specify them as normal guage?
2) can RAIL, ELRL, MONO and MGLV be hidden by setting railtype_flags to hidden?
3) Where **X* axle load class should be used?
4) The set provides ***D for 3kV and ***d for 1.5kV. How to make dutch trains understand, that they should use ***d rails and not ***D rails?
5) Where should I put old names (RLA2 ect.)? In the rails set or in the train set?
6) powered_railtype_list should be specified in the train or rail set?
let we figure out the props for rail set first
For example, what should I specify instead for a 15kV with speed limit D?
item (FEAT_RAILTYPES, er15ac2) {
property {
label: "ERa2";
alternative_railtype_list: ["BDAa", "SDAa", "BDAA", "SDAA", "BDBa", "SDBa", "BDBA", "SDBA", "BDCa", "SDCa", "BDCA", "SDCA", "BDDa", "SDDa", "BDDA", "SDDA", "BDEa", "SDEa", "BDEA", "SDEA", "ELRL", "RAIL"];
}
- George
- Tycoon
- Posts: 4363
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: New Railtype Label Scheme
I've tried
and get
nmlc ERROR: nmlc: An internal error has occurred:
nmlc-version: 0.5.0
Error: (TypeError) "expected string or bytes-like object".
Command: ['nmlc', '--grf=xussr-addon.grf', '-c', '--nfo=xussr-addon.nfo', '--nml=xussr-addon_optimized.nml', '-M', '--MF=xussr-addon_dep.txt', 'xussr-addon.nml'] Location: File "nml\expression\__init__.py", line 47, in identifier_to_print
when I comment code inside table, problem disappears. What am I doing wroong?
Update:
Changed to NMLC 0.5.2, that fixed the problem
I've made a new version and new question is - why do dutch trains for DC1500V use broad rails, while other trains do not. What should I change?
Code: Select all
/// railtypetable
railtypetable {
RAIL_1435: [SAAN, SABN, SACN, SADN, SAEN, RLA0, RLA1, RLA2, RLA3, RAIL],
...
EL4S_1435: [SAAE, SABE, SACE, SADE, SAEE, EL4S, ELRL, RAIL]
}
nmlc ERROR: nmlc: An internal error has occurred:
nmlc-version: 0.5.0
Error: (TypeError) "expected string or bytes-like object".
Command: ['nmlc', '--grf=xussr-addon.grf', '-c', '--nfo=xussr-addon.nfo', '--nml=xussr-addon_optimized.nml', '-M', '--MF=xussr-addon_dep.txt', 'xussr-addon.nml'] Location: File "nml\expression\__init__.py", line 47, in identifier_to_print
when I comment code inside table, problem disappears. What am I doing wroong?
Update:
Changed to NMLC 0.5.2, that fixed the problem
I've made a new version and new question is - why do dutch trains for DC1500V use broad rails, while other trains do not. What should I change?
- Attachments
-
- railtrack.pnml
- (44.64 KiB) Downloaded 142 times
-
- xussr-rails.grf
- (200.02 KiB) Downloaded 153 times
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: New Railtype Label Scheme
I think that is because other trainsets have their trains defined as ELRL, which your code does not provide and thus is provided by the game itself, while the Dutch Trains uses SABD for the 1500V DC tracks, which you do provide.
The default tracks provided by the game are a bit special, you need to explicitly override them, having ELRL only as an alternative railtype for tracks in your code does not do anything.
[Edit]I missed your earlier reply, I'll try to answer all questions with a general explanation how tracktypes work between train sets and track sets. I'll start with the train sets.
Train sets have 2 things related to tracktypes in a trainset:
This tells OpenTTD that for a train with track_type DC_B, it wants a track with label SABd. Is no trackset providing SABd, it will want a track with label SABD and so on. The last entry, ELRL, is the default electric track always available in OpenTTD, so even if no trackset is loaded or providing any of the requested labels, this vehicle will become available because of that.
Metros use metro_B as track_type, which is defined in the railtypetable as:
Now there is no OpenTTD default label in the list, so if no trackset is loaded or providing the requested label, the vehicle will not become available as there is no track to run it on.
Now for tracksets, there are two properties related to the above:
Little note, I do not know what the order of preference is for OpenTTD, if it would prefer an exact match later in the trainset railtypetable over a match with the alternative_railtype_list for an earlier entry.
Then there are 2 properties related to compatibility and being powered:
For the default tracks, MONO and MGLV have both lists empty, while RAIL and ELRL have the following:
RAIL: compatible_railtype_list:ELRL - powered_railtype_list: ELRL
ELRL: compatible_railtype_list:RAIL - powered_railtype_list: empty
Some of the other questions in your post:
-No, you cannot disable the default railtypes, you should override them to something sensible. In the Dutch Trackset, I used RAIL as the normal unelectrified track, and ELRL as some slow yard rail that is compatible with everything.
-The Dutch Trainset should already use the SABd, but it might give some unexpected results because of one of the _railtype_lists not being defined correctly
-Old names should be as part of the alternative_railtype_list in the trackset
The default tracks provided by the game are a bit special, you need to explicitly override them, having ELRL only as an alternative railtype for tracks in your code does not do anything.
[Edit]I missed your earlier reply, I'll try to answer all questions with a general explanation how tracktypes work between train sets and track sets. I'll start with the train sets.
Train sets have 2 things related to tracktypes in a trainset:
- The railtypetable
- The track_type property on a vehicle that points to an entry in the railtypetable
Code: Select all
DC_B: [SABd, SABD, SABE, ELRL]
Metros use metro_B as track_type, which is defined in the railtypetable as:
Code: Select all
metro_B: [SAB3, MTRO, "3RDR"],
Now for tracksets, there are two properties related to the above:
- The label
- The alternative_railtype_list
Little note, I do not know what the order of preference is for OpenTTD, if it would prefer an exact match later in the trainset railtypetable over a match with the alternative_railtype_list for an earlier entry.
Then there are 2 properties related to compatibility and being powered:
- The compatible_railtype_list
- The powered_railtype_list
For the default tracks, MONO and MGLV have both lists empty, while RAIL and ELRL have the following:
RAIL: compatible_railtype_list:ELRL - powered_railtype_list: ELRL
ELRL: compatible_railtype_list:RAIL - powered_railtype_list: empty
Some of the other questions in your post:
-No, you cannot disable the default railtypes, you should override them to something sensible. In the Dutch Trackset, I used RAIL as the normal unelectrified track, and ELRL as some slow yard rail that is compatible with everything.
-The Dutch Trainset should already use the SABd, but it might give some unexpected results because of one of the _railtype_lists not being defined correctly
-Old names should be as part of the alternative_railtype_list in the trackset
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
- George
- Tycoon
- Posts: 4363
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: New Railtype Label Scheme
It looks like a mistake in the schema, because allows using high speed railways by some small old steam locomotives. Axle load limits would not help, because they can be low for the small steamer.[*X**] Speed limit class
Always use class A for every vehicle.
What was intended by this rule?
- George
- Tycoon
- Posts: 4363
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: New Railtype Label Scheme
I can't understand, something does not match.
Dutch trains set defines TGV train as
railtype table defines
xussr rails set defines ERD1 rails as
and TGV is available in ERD1 depot. WHY????
Dutch trains set defines TGV train as
Code: Select all
track_type: dual_B;
Code: Select all
dual_B: [SABE, SABA, ELRL],
Code: Select all
alternative_railtype_list: [
"BBAD", "BBBD", "BBCD", "BBDD", "BBED",
"BAAD", "BABD", "BACD", "BADD", "BAED",
"SBAD", "SBBD", "SBCD", "SBDD", "SBED",
"SAAD", "SABD", "SACD", "SADD", "SAED"];
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: New Railtype Label Scheme
The idea is that a track with speed limit A is always available (the lowest speed). Higher speed tracks are then defined as compatible and powered in the list of *A**. It is a player responsibility to not run old steam locomotives on fancy high speed tracks. You could prohibit running slow steamers on high speed track by not defining those high speed tracks as compatible in *A** but do define *A** as compatible in the high speed tracks and then define your high speed trains on *B**, but that might break with other trainsets.George wrote: ↑16 Aug 2020 07:23It looks like a mistake in the schema, because allows using high speed railways by some small old steam locomotives. Axle load limits would not help, because they can be low for the small steamer.[*X**] Speed limit class
Always use class A for every vehicle.
What was intended by this rule?
I think that is because ERD1 is in a powered_railtype_list of a track that has SABE or SABA as label or in its alternative_railtype_list.George wrote: ↑16 Aug 2020 08:29 I can't understand, something does not match.
Dutch trains set defines TGV train asrailtype table definesCode: Select all
track_type: dual_B;
xussr rails set defines ERD1 rails asCode: Select all
dual_B: [SABE, SABA, ELRL],
and TGV is available in ERD1 depot. WHY????Code: Select all
alternative_railtype_list: [ "BBAD", "BBBD", "BBCD", "BBDD", "BBED", "BAAD", "BABD", "BACD", "BADD", "BAED", "SBAD", "SBBD", "SBCD", "SBDD", "SBED", "SAAD", "SABD", "SACD", "SADD", "SAED"];
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: New Railtype Label Scheme
There seems to be some confusion about the purpose of the alternate labels and the interaction with powered/compatible railtypes. In the realm of the standardized label scheme, have a railtype e.g. provide alternate labels for both broad and standard gauge doesn't make sense.
Let's break this up into a simplified step by step process (all info here taken from https://newgrf-specs.tt-wiki.net/wiki/S ... ype_Scheme, no warranty included).
Part 1: Track set
A) Which tracks?
Start with a list of track types your set should provide. For sake of this example, let's say we want:
B) Assigning track labels
For each track, we have to select a railtype label that is used to define and code the railtype in the track NewGRF. For this, we refer to the wiki page of the standardized scheme.
The four letters of the label are assigned specific meanings in the scheme. These are - from left to right - track type/gauge, speed limit, axle load, and energy source.
The speed limit component needs some more info: The scheme assumes that tracks with different speed limits are cross-compatible, e.g. low speed vehicles can drive on high speed tracks and vice versa. If you want a set design where e.g. a TGV can drive only on high-speed tracks, you need to select one of the other label components to differentiate this! The speed limit is also the component to use for eye-candy things and some special behaviour (in conjunction with a train set): E.g. if you have trains that drive on normal rails but can optionally also engage to a rack rail, you'd assign rails with rack to one speed letter (normally R), which the train set can then query to maybe have a higher TE on rack sections.
Let's assign labels to our six types (I'll put some notes after each label):
C) Defining the tracks
Now you can start writing your railtype NewGRF. Define railtype with the above physical labels and whatever graphics/props/etc you want. I'm not going to write about that except for compatible/powered and alternate label props. Railtype that you want to have a speed limit (ELRL/SAAA and SBAA here) get one.
Powered/compatible first, alternate after that:
Now we come to the alternate labels. First some general rules to comply with the standardised scheme (these rules are a convention within the scheme, not by OpenTTD):
Summary: Each rail vehicle has its defined railtype. Select the best matching type according to the standardized scheme. Depending on the intentions of your set design, strategically add fallbacks to the railtype table.
A) Selecting the best track type
Build the primary railtype label by selecting each label component: track type/gauge, speed limit, axle load, and energy source.
B) Selecting fallback track types
Depending on your set design ideas, you'll probably want to add some fallback types to make your train NewGRF playable even if not used with the exact matching track NewGRF.
Too long, didn't read. Refer to the wiki page. All values are just for example and not good set design. Not tested or coded, might be full of mistakes and holes.
Let's break this up into a simplified step by step process (all info here taken from https://newgrf-specs.tt-wiki.net/wiki/S ... ype_Scheme, no warranty included).
Part 1: Track set
A) Which tracks?
Start with a list of track types your set should provide. For sake of this example, let's say we want:
- Standard gauge, no specific speed or axle load
- Standard gauge with AC overhead electrification, normal speed, no specific axle load
- Standard gauge with AC overhead electrification, high speed, no specific axle load
- Broad gauge, low axle load
- Broad gauge, high axle load
- Dual gauge track, standard + broad, low speed only, all axle loads
B) Assigning track labels
For each track, we have to select a railtype label that is used to define and code the railtype in the track NewGRF. For this, we refer to the wiki page of the standardized scheme.
The four letters of the label are assigned specific meanings in the scheme. These are - from left to right - track type/gauge, speed limit, axle load, and energy source.
The speed limit component needs some more info: The scheme assumes that tracks with different speed limits are cross-compatible, e.g. low speed vehicles can drive on high speed tracks and vice versa. If you want a set design where e.g. a TGV can drive only on high-speed tracks, you need to select one of the other label components to differentiate this! The speed limit is also the component to use for eye-candy things and some special behaviour (in conjunction with a train set): E.g. if you have trains that drive on normal rails but can optionally also engage to a rack rail, you'd assign rails with rack to one speed letter (normally R), which the train set can then query to maybe have a higher TE on rack sections.
Let's assign labels to our six types (I'll put some notes after each label):
- SAAN - if there's no specific speed or axle load, always start with A
- SAAA - A is for AC overhead electrification; E would be any overhead electrification, we'll come back to this later!
- SBAA - Higher speeds just use the next letter (B). The letters have no fixed defined speed.
- BAAN - Standard axle load classes are are from A to E. In this case, we define "low" axle load to be A-C and "high" to be D-E.
- BADN - (see above)
- DAAN - D is for broad + standard
- RAIL
- ELRL
- SBAA
- BAAN
- BADN
- DAAN
C) Defining the tracks
Now you can start writing your railtype NewGRF. Define railtype with the above physical labels and whatever graphics/props/etc you want. I'm not going to write about that except for compatible/powered and alternate label props. Railtype that you want to have a speed limit (ELRL/SAAA and SBAA here) get one.
Powered/compatible first, alternate after that:
- RAIL - Vehicles should also be able to drive and have power on electrified and dual gauge track. Thus powered and compatible: ELRL, SBAA, DAAN
- ELRL - Vehicles should be powered on all electrified types: SBAA; vehicles should be compatible but unpowered on other tracks on the same gauge: RAIL, DAAN
- SBAA - Technically not needed, as no vehicle should ever have this type, but if you want to be safe: ELRL / RAIL, DAAN
- BAAN - Vehicles should be compatible and powered on higher axle loads and dual gauge track, powered/compatible: BADN, DAAN
- BADN - Vehicle should run on dual gauge track but not on lower axle load, powered/compatible: DAAN
- DAAN - Either nothing, or to cheese a bit for variable gauge vehicles: powered/compatible: RAIL, ELRL, BAAN, BADN
Now we come to the alternate labels. First some general rules to comply with the standardised scheme (these rules are a convention within the scheme, not by OpenTTD):
- For each combination of track type/gauge and energy source, you must provide all axle load classes from A to E, either as a real railtype or an alternate label.
- Speed class A must always be defined for each track type/gauge, energy source, and axle load.
- If you use one the the specialised energy source letters (see wiki for a table), provide alternates for a matching generic letter
- If you substituted one of the scheme labels by one of the built-in labels (RAIL/ELRL/...), list the original label as an alternate
- If there are any legacy railtype labels you want to support (e.g. for backwards compatibility with older NewGRF releases), add them as alternate, too
- RAIL - SAAN, SABN, SACN, SADN, SAEN (rules a, b, d)
- ELRL - SAAA, SABA, SACA, SADA, SAEA, SAAE, SABE, SACE, SADE, SAEE (rules a, b, c, d, with E chosen for generic overhead electrification)
- SBAA - (none, vehicles should never use speed letter B)
- BAAN - BABN, BACN (rules a, b, with axle loads D/E provided by the next track type)
- BADN - BAEN (rules a, b, with axle loads A-C provided by the previous track type)
- DAAN - DABN, DACN, DADN, DAEN (rules a, b)
Summary: Each rail vehicle has its defined railtype. Select the best matching type according to the standardized scheme. Depending on the intentions of your set design, strategically add fallbacks to the railtype table.
A) Selecting the best track type
Build the primary railtype label by selecting each label component: track type/gauge, speed limit, axle load, and energy source.
- Select the track type according to the list, for our example either S or B (and maybe D for e.g. variable gauge wagons).
- Always and only use A for the speed limit letter.
- Select an axle load, using the full range from A to E for your vehicles.
- Select an appropriate energy source. Whether you use only the generic energy source letters or the more specialised letters depends on your set design.
- Light steam/diesel vehicles on standard gauge: SABN
- Heavy steam/diesel vehicles on standard gauge: SADN
- Normal AC overhead vehicles on standard gauge: SACA (we use the more specialised A for energy source as we maybe want to add some DC vehicles later)
- Light shunters on broad gauge: BAAN
- Medium vehicles on broad gauge: BACN
- Heavy vehicles on broad gauge: BAEN
- Variable gauge wagons: DACN (we pretend they are all quite heavy and have a higher axle load)
B) Selecting fallback track types
Depending on your set design ideas, you'll probably want to add some fallback types to make your train NewGRF playable even if not used with the exact matching track NewGRF.
- Track type: Depends. If, for example, you want broad gauge vehicles to be available to the player even if no track set with broad gauge is loaded, add a fallback to the equivalent standard gauge label. Probably more relevant if you e.g. have narrow and narrower gauge (N and n), to map the narrower gauge to generic narrow gauge. Simply letting vehicles be unavailable by not defining a fallback is also a valid artistic choice.
- Speed letter: As you shouldn't have used anything except A, no fallbacks needed.
- Axle load: Track NewGRFs that don't provide A-E do not conform to the standardized scheme, and thus no fallbacks needed for non-broken sets.
- Energy source: Depends again. Providing or not providing a fallback is an artistic choice. It is recommended to provide a fallback from specialized energy sources (like AC and DC overhead) to the generic energy source, but not required.
- Old/legacy track types: If you want to support old track NewGRFs with different labels, these can be added to the fallback as well.
- No or non-standardized scheme track NewGRF: Provide fallbacks to RAIL/ELRL if you want your train set to work without a loaded track NewGRF. Please note that fallbacks to RAIL/ELRL will generally mean that all of your vehicles can be build in some depot type that you can't control if using a non-standardized scheme track NewGRF. If you don't provide these fallbacks, expect bug reports from people who can't read.
- t_SABN: [SABN, OLD1, RAIL]
- t_SADN: [SADN, OLD1, RAIL]
- t_SACA: [SACA, SACE, OLD2, ELRL]
- t_BAAN: [BAAN, SAAN, OLD3, RAIL]
- t_BACN: [BACN, SACN, OLD3, RAIL]
- t_BAEN: [BAEN, SAEN, OLD3, RAIL]
- t_DACN: [DACN, BACN, SACN, RAIL] (could have left out the BACN depending on the intention)
Too long, didn't read. Refer to the wiki page. All values are just for example and not good set design. Not tested or coded, might be full of mistakes and holes.
- George
- Tycoon
- Posts: 4363
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: New Railtype Label Scheme
Hello
Thank you for detailed reply.
May be I'm understanding the intentions wrong, but at least checking xUSSR trains, xUSSR rails, Dutch trains, Dutch tracks in different combinations work quit good. Would be nice to check with some other sets through.
I did something different, but I can't understand, why should it be wrong.
Part 1: Track set
A) Which tracks?
A list of Broad gauges with 6 speeds limits (from 60 to unlim), no axle limits.
Electrification 1500V DC 3000V DC 15kV AC 25kV AC
2 combo rails (with tracks) and 4 combo rails (without tracks)
B) Assigning track labels
I used old labels like ERA1 and I can't understand what is wrong in it, because schema-based labels can be used in alternatives list.
"RLA0", "RLA1", "RLA2", "RLA3" - not electrified
"ERA1", "ERA2", "ERA3", "ERA4" - electrified 25kV AC
"ERa0", "ERa1", "ERa2", "ERa3", "ERa4" - electrified 15kV AC
"ERD1", "ERD2", "ERD3" - electrified 3kV DC
"ERd0", "ERd1", "ERd2", "ERd3" - electrified 1.5kV DC
"ER2D", "ER2S" - several electrifications with tracks
"ER2s", "ER3a", "ER3D", "ER4S" - several electrifications without tracks
Also I can't understand why ELRL and RAIL should be overridden. I didn't do it, and when I load xUSSR rails + Dutch trains I do not get them in the menu
C) Defining the tracks
Compatible - all rails in the set
Powered
RLA* - all
25 kV AC - "ERA1", "ERA2", "ERA3", "ERA4", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
15 kV AC - "ERa0", "ERa1", "ERa2", "ERa3", "ERa4", "ER3a", "ER4S"
3 kV DC - "ERD1", "ERD2", "ERD3", "ER2D", "ER2S", "ER3D", "ER4S"
1.5 kV DC - "ERd0", "ERd1", "ERd2", "ERd3", "ER2D", "ER2s", "ER3a", "ER3D", "ER4S"
dDC (1.5 kV DC + 3 kV DC) - "ERD1", "ERD2", "ERD3", "ERd0", "ERd1", "ERd2", "ERd3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
ACDC (3 kV DC + 25 kV AC) - "ERA1", "ERA2", "ERA3", "ERA4", "ERD1", "ERD2", "ERD3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
ACdDC (1.5 kV DC + 3 kV DC + 25 kV AC) - "ERA1", "ERA2", "ERA3", "ERA4", "ERd0", "ERd1", "ERd2", "ERd3", "ERD1", "ERD2", "ERD3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
AC15DC (1.5 kV DC + 25 kV AC) - "ERA1", "ERA2", "ERA3", "ERA4", "ERd0", "ERd1", "ERd2", "ERd3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
aACdDC (all 4) - "ERa0", "ERa1", "ERa2", "ERa3", "ERa4", "ERA1", "ERA2", "ERA3", "ERA4", "ERd0", "ERd1", "ERd2", "ERd3", "ERD1", "ERD2", "ERD3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
aAC15DC (1.5 kV DC + 15 kV AC + 25 kV AC) - "ERa0", "ERa1", "ERa2", "ERa3", "ERa4", "ERA1", "ERA2", "ERA3", "ERA4", "ERd0", "ERd1", "ERd2", "ERd3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
alternate labels
For example ERa1 has
alternative_railtype_list: ["BBAa", "BBBa", "BBCa", "BBDa", "BBEa",
"BAAa", "BABa", "BACa", "BADa", "BAEa",
"BBAA", "BBBA", "BBCA", "BBDA", "BBEA",
"BAAA", "BABA", "BACA", "BADA", "BAEA",
"SBAa", "SBBa", "SBCa", "SBDa", "SBEa",
"SAAa", "SABa", "SACa", "SADa", "SAEa",
"SBAA", "SBBA", "SBCA", "SBDA", "SBEA",
"SAAA", "SABA", "SACA", "SADA", "SAEA"];
Impotent note. then searching among alternative names, OTTD picks up the first rail that has the label. Because of that there is no profit to specify the alternative label twice (for two different railways)
What do we see here?
- no ELRL or RAIL as alternatives
- both Broad and standard
- both low and high voltage
for combos no alternatives are provided.
So
rule a - almost done, except combos
rule b - almost done, except combos
rule c - ignored
rule d - unused
rule e - unused
What do we get with Dutch trains?
Steamers and Diesels - anywhere
1500V DC - on the 1500V rails
Duals - on the the 1500V and 25kV rails
As intended.
I broke almost half of rules, but it still works.
What are the other sets that use AC and DC to check with?
Thank you for detailed reply.
May be I'm understanding the intentions wrong, but at least checking xUSSR trains, xUSSR rails, Dutch trains, Dutch tracks in different combinations work quit good. Would be nice to check with some other sets through.
I did something different, but I can't understand, why should it be wrong.
Part 1: Track set
A) Which tracks?
A list of Broad gauges with 6 speeds limits (from 60 to unlim), no axle limits.
Electrification 1500V DC 3000V DC 15kV AC 25kV AC
2 combo rails (with tracks) and 4 combo rails (without tracks)
B) Assigning track labels
I used old labels like ERA1 and I can't understand what is wrong in it, because schema-based labels can be used in alternatives list.
"RLA0", "RLA1", "RLA2", "RLA3" - not electrified
"ERA1", "ERA2", "ERA3", "ERA4" - electrified 25kV AC
"ERa0", "ERa1", "ERa2", "ERa3", "ERa4" - electrified 15kV AC
"ERD1", "ERD2", "ERD3" - electrified 3kV DC
"ERd0", "ERd1", "ERd2", "ERd3" - electrified 1.5kV DC
"ER2D", "ER2S" - several electrifications with tracks
"ER2s", "ER3a", "ER3D", "ER4S" - several electrifications without tracks
Also I can't understand why ELRL and RAIL should be overridden. I didn't do it, and when I load xUSSR rails + Dutch trains I do not get them in the menu
C) Defining the tracks
Compatible - all rails in the set
Powered
RLA* - all
25 kV AC - "ERA1", "ERA2", "ERA3", "ERA4", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
15 kV AC - "ERa0", "ERa1", "ERa2", "ERa3", "ERa4", "ER3a", "ER4S"
3 kV DC - "ERD1", "ERD2", "ERD3", "ER2D", "ER2S", "ER3D", "ER4S"
1.5 kV DC - "ERd0", "ERd1", "ERd2", "ERd3", "ER2D", "ER2s", "ER3a", "ER3D", "ER4S"
dDC (1.5 kV DC + 3 kV DC) - "ERD1", "ERD2", "ERD3", "ERd0", "ERd1", "ERd2", "ERd3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
ACDC (3 kV DC + 25 kV AC) - "ERA1", "ERA2", "ERA3", "ERA4", "ERD1", "ERD2", "ERD3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
ACdDC (1.5 kV DC + 3 kV DC + 25 kV AC) - "ERA1", "ERA2", "ERA3", "ERA4", "ERd0", "ERd1", "ERd2", "ERd3", "ERD1", "ERD2", "ERD3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
AC15DC (1.5 kV DC + 25 kV AC) - "ERA1", "ERA2", "ERA3", "ERA4", "ERd0", "ERd1", "ERd2", "ERd3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
aACdDC (all 4) - "ERa0", "ERa1", "ERa2", "ERa3", "ERa4", "ERA1", "ERA2", "ERA3", "ERA4", "ERd0", "ERd1", "ERd2", "ERd3", "ERD1", "ERD2", "ERD3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
aAC15DC (1.5 kV DC + 15 kV AC + 25 kV AC) - "ERa0", "ERa1", "ERa2", "ERa3", "ERa4", "ERA1", "ERA2", "ERA3", "ERA4", "ERd0", "ERd1", "ERd2", "ERd3", "ER2D", "ER2S", "ER2s", "ER3a", "ER3D", "ER4S"
alternate labels
For example ERa1 has
alternative_railtype_list: ["BBAa", "BBBa", "BBCa", "BBDa", "BBEa",
"BAAa", "BABa", "BACa", "BADa", "BAEa",
"BBAA", "BBBA", "BBCA", "BBDA", "BBEA",
"BAAA", "BABA", "BACA", "BADA", "BAEA",
"SBAa", "SBBa", "SBCa", "SBDa", "SBEa",
"SAAa", "SABa", "SACa", "SADa", "SAEa",
"SBAA", "SBBA", "SBCA", "SBDA", "SBEA",
"SAAA", "SABA", "SACA", "SADA", "SAEA"];
Impotent note. then searching among alternative names, OTTD picks up the first rail that has the label. Because of that there is no profit to specify the alternative label twice (for two different railways)
What do we see here?
- no ELRL or RAIL as alternatives
- both Broad and standard
- both low and high voltage
for combos no alternatives are provided.
So
rule a - almost done, except combos
rule b - almost done, except combos
rule c - ignored
rule d - unused
rule e - unused
What do we get with Dutch trains?
Steamers and Diesels - anywhere
1500V DC - on the 1500V rails
Duals - on the the 1500V and 25kV rails
As intended.
I broke almost half of rules, but it still works.
What are the other sets that use AC and DC to check with?
-
- Tycoon
- Posts: 2781
- Joined: 22 Feb 2011 18:34
Re: New Railtype Label Scheme
I think nothing is wrong with that, as you can always give the schema-based labels as alternatives.
The ELRL and RAIL are provided by the base game, which is why you need to override those explicitly. What might happen in the combination xUSSR rails+Dutch trains, is that the Dutch trains are all matched to tracks in the xUSSR set, resulting in the default RAIL and ELRL not being available in the menu as there are no vehicles for it. But when using a trainset that uses the default labels, you will not see the xUSSR tracks as there are then no vehicles for it.Also I can't understand why ELRL and RAIL should be overridden. I didn't do it, and when I load xUSSR rails + Dutch trains I do not get them in the menu
This would also apply over different track sets, where NewGRF load order also comes into play, but any label always has priority over the alternative_railtype_list.Impotent note. then searching among alternative names, OTTD picks up the first rail that has the label. Because of that there is no profit to specify the alternative label twice (for two different railways)
It seems to work because of the reasons I explain earlier in this post, but I think things break down with trainsets that do nothing with railtypes and just use about the default labels.What do we get with Dutch trains?
Steamers and Diesels - anywhere
1500V DC - on the 1500V rails
Duals - on the the 1500V and 25kV rails
As intended.
I broke almost half of rules, but it still works.
I'm not aware of any.What are the other sets that use AC and DC to check with?
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
- George
- Tycoon
- Posts: 4363
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Re: New Railtype Label Scheme
In case Dutch trains set is the only set that uses both AC and DC, it is very hard to be sure ![Sad :(](./images/smilies/icon_sad.gif)
Is there any track set that uses AC + DC except Dutch tracks?
![Sad :(](./images/smilies/icon_sad.gif)
Is there any track set that uses AC + DC except Dutch tracks?
-
- Traffic Manager
- Posts: 174
- Joined: 07 Sep 2020 15:12
- Location: Usually near some interesting rail systems. :P
New Railtype Label Scheme: labeling trouble
Hi all,
I have run into problem, while choosing labels for my developed tracks. They will include narrow gauge tracks and narrow gauge rack railway tracks, both normal and eletrified. IRL there are some trains, which are able to run on both types, so I want to support that. But some trains can run only on one of them (either normal, or rack tracks). So I thougth about adding special alternative label for train developers to make said trains. But, in wiki page, there are lot of options about, how to label tracks, but there is no option for case, I want to make... Should I use custom label, or will somebody of you introduce a new label for it? IMHO best option would be: NRHN and NRHE, while making use of, in this track set, unused axle weigth slot.
Thanks, MLG
I have run into problem, while choosing labels for my developed tracks. They will include narrow gauge tracks and narrow gauge rack railway tracks, both normal and eletrified. IRL there are some trains, which are able to run on both types, so I want to support that. But some trains can run only on one of them (either normal, or rack tracks). So I thougth about adding special alternative label for train developers to make said trains. But, in wiki page, there are lot of options about, how to label tracks, but there is no option for case, I want to make... Should I use custom label, or will somebody of you introduce a new label for it? IMHO best option would be: NRHN and NRHE, while making use of, in this track set, unused axle weigth slot.
Thanks, MLG
Are you an eye candy player? Check out Invisible engine set! viewtopic.php?f=67&t=88934
You can write to me in English, or Czech. Můžete mi psát česky nebo anglicky.
Formerly known as MLG.
You can write to me in English, or Czech. Můžete mi psát česky nebo anglicky.
Formerly known as MLG.
Who is online
Users browsing this forum: No registered users and 19 guests