[NML] Railtype list and Labels

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

[NML] Railtype list and Labels

Post by Quast65 »

Hi all!

I am fiddeling around a bit with railtypes and I have some questions regarding Railtype Lists and Labels.

First of all, I would like to check if something I have done is correct:
- I have 4 railtypes: RTU1 (unelectrified), RTU2 (unelectrified), RTE1 (electrified), RTE2 (electrified).
- I gave RTU1 label RAIL (as its the first unelectrified railtype and I want it to replace the vanilla unelectrified rail), I can buy all unelectrified trains there.
- I gave RTE1 label ELRL (as its the first electrified railtype and I want it to replace the vanilla electrified rail), I can buy all electrified AND unelectrified trains there.
- RTU2 has label RTU2 and RTE2 has label RTE2

- I have given RTU1

Code: Select all

powered_railtype_list: ["RTU2", "RTE2"];
That way I can now purchase all unelectrified trains in RTU2 and RTE2.

- I have given RTE1

Code: Select all

powered_railtype_list: ["RTE2"];
That way I can now also purchase all electrified trains in RTE2.

- All unelectrified trains, no matter in what railtype-depot that they have been bought, can run on all tracks (unelectric and electric)
- All electrified trains, that can only be bought in electrified depots, can only run on the two electrified tracks.

This is what I wanted, is this the correct way to do that?


If so, what exactly does the compatible_railtype_list do?
Is this for example if I design an unelectrified train that can only be built in RTU2, but I do want it to be able to run on the other 3 tracks?

And what exactly does the alternative_railtype_list do?
I have read the Wiki, but I dont really understand the descriptions… :oops:
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: [NML] Railtype list and Labels

Post by Eddi »

Quast65 wrote:If so, what exactly does the compatible_railtype_list do?
"compatible" railtype is if you want the vehicle do be dragged along like a wagon, e.g. by having both a diesel and an electric engine in the same train.
And what exactly does the alternative_railtype_list do?
you can for example use RTU1 as "alternative label" for RAIL, so you can consistently use RTU1 and RTU2 in your GRF, and not bother with the default RAIL label anymore
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: [NML] Railtype list and Labels

Post by Quast65 »

Eddi wrote:"compatible" railtype is if you want the vehicle do be dragged along like a wagon, e.g. by having both a diesel and an electric engine in the same train.
But cant this already be done without compatible_railtype?
At least if that train is built in an electrified depot, if that train than goes from electrified to unelectrified track it keeps moving (because of the diesel engine).
Is compatible_railtype than needed to allow electrified trains to show up in the buy-menu of an unelectrified depot? And then thus only usable as wagons on unelectrified tracks?
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: [NML] Railtype list and Labels

Post by Eddi »

no, if you do not set "compatible" on the railtype, a a train with both electric engine and diesel engine cannot go on unelectrified track

think of "compatible" as "there is nothing physically preventing the train to go on the track (like gauge difference), but it won't have power"
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: [NML] Railtype list and Labels

Post by Quast65 »

Eddi wrote:no, if you do not set "compatible" on the railtype, a a train with both electric engine and diesel engine cannot go on unelectrified track
Then how is this already possible?
Example506.png
Example506.png (59.67 KiB) Viewed 4246 times
The steamloco is pulling the electric loco over an unelectrified track, and I did not use "compatible_railtype"
:?: :?:

EDIT: Also tested it in vanilla game to be sure its not something in my GRF, same thing, electric engine gets pulled over unelectric track by the steam-engine
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: [NML] Railtype list and Labels

Post by Eddi »

vanilla game already sets ELRL to be "compatible" with RAIL, that's why this works.

but for your RTU2 and RTE2 railtypes, you must do this manually
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: [NML] Railtype list and Labels

Post by Quast65 »

Eddi wrote:vanilla game already sets ELRL to be "compatible" with RAIL, that's why this works.

but for your RTU2 and RTE2 railtypes, you must do this manually
Isnt that only the case then for railtype-specific trains? So for example Metro, or specially designed narrow-gauge trains, or the "trains" in Wired and Pipe? (or my own "special" trains if I would make those).
So, as long as the trainset is compatible with RAIL and/or ELRL, I dont have to worry about compatibility in my GRF?
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: [NML] Railtype list and Labels

Post by Eddi »

Quast65 wrote:So, as long as the trainset is compatible with RAIL and/or ELRL, I dont have to worry about compatibility in my GRF?
you will still run into some corner cases...
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: [NML] Railtype list and Labels

Post by Quast65 »

Eddi wrote:
Quast65 wrote:So, as long as the trainset is compatible with RAIL and/or ELRL, I dont have to worry about compatibility in my GRF?
you will still run into some corner cases...
Well, at least then I would know where to start finding a possible solution for those ;-)

Thnx for all of your help! :bow:
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: [NML] Railtype list and Labels

Post by Quast65 »

I have another question... ?(

In my trackset I have introduced Metro tracks.
What I would like is that only Metro (3rd rail) trains are buyable in the Metro-depot, BUT that it is possible for regular non-electric trains (RAIL) to also run on the Metro-tracks.

Is that at all possible? If so, with what Railtype-list and where should that list be (in the properties of RAIL or in the properties of the Metro-tracks)?

At the moment I have put the Metro-tracks into the powered-railtype-list of RAIL, so RAIL trains can run on the metro-tracks (that is what I want), but are also buyable in the Metro-depot (that is NOT what I want).
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: [NML] Railtype list and Labels

Post by Eddi »

no, that is not possible. both things are defined by the same property (compatible/powered)
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: [NML] Railtype list and Labels

Post by Quast65 »

Eddi wrote:no, that is not possible. both things are defined by the same property (compatible/powered)
Thnx for the quick reply! Saves me time to search/experiment to see if it was possible ;-)
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 6 guests