[OTTD] Universal Rail Type

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
zero.eight
Traffic Manager
Traffic Manager
Posts: 128
Joined: 15 Jun 2007 01:14

[OTTD] Universal Rail Type

Post by zero.eight »

The Universal Rail Type NewGRF is an attempt at making train replacement easier. It allows players to use Autoreplace to convert engines and wagons into models of other rail types e.g. monorail <-> maglev. Simply configure Autoreplace, build Universal Depots (select the Universal Rail construction option and then select the depot) and send the trains that you want to replace to the nearest Universal Depot. Once the trains are all in depots you can convert the tracks and restart all of the trains. Since Autoreplace has been used, the trains' orders and groups are preserved.

Compatibility with NewGRFs that provide new trains or new/modified rail types is not guaranteed. In some cases it may be necessary to remove all wagons from a train for Autoreplace to be successful but there should be no problems with the default engines and wagons.

If you want more of a challenge, set the "Enable push/pull behaviour" parameter and have a look at this post. It requires building a "Universal Engine" to push/pull trains to new depots. It might be really tedious though so it isn't the default behaviour.

Side effects:
  • Players can build Universal Rail track which allows any of the default trains to run on it. This defeats the purpose of having different rail types but currently it's the only way to make this GRF function. It's up to you to use or abuse this feature. Of course, you can set the speed limit and construction cost of the track in the parameter menu to add some kind of penalty. In addition, Universal Rail track looks like normal railway track so it may be confusing if you build a lot of it. Note that if you build a Universal Depot at a 45degree angle to other rail, a small piece of Universal Rail track may be built automatically. This is unavoidable.
Version History:
2.0.1
  • Compatibility fixes
2.0.0
  • Universal rail track speed limit can be set by parameter (defaults to unlimited)
  • Universal rail track construction cost multiplier can be set by parameter
  • Universal engine does not need to be constructed
  • Added readme that can be accessed ingame
1.4 and older
  • Add Universal Rail and Universal Engine
Universal Rail Type 2.0.0 and newer require OpenTTD 1.2.0 or newer.
2.0.1 is not compatible with earlier versions of Universal Rail Type.

I recommend using 2.0.1 or newer rather than 2.0.0. It contains some additional safety measures to protect against messing up your games.

Downloads:
BaNaNaS (a search for "univ" should be sufficient. Check this page if you have no idea what that means)
Devzone: http://bundles.openttdcoop.org/universalrails/releases

Source: http://dev.openttdcoop.org/projects/universalrails
Kindly hosted by DevZone and built using the NML Build Framework; big thanks to all involved.

From the original request here.
Last edited by zero.eight on 26 May 2013 15:25, edited 3 times in total.
OpenTTD: VAST - station tiles and objects | MICS - urban monorail graphical conversion | Universal Rail Type - easier train replacement
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: [OTTD] Universal Rail Type

Post by V453000 :) »

Hint hint, I think it is a lot more useful if Univ Rail does not set any speed limit ... you do not even need the universal engine.

e.g. NUTS Unrealistic Train Set has no speed limits and it all works like a charm ... yes, people do sometimes use the universal track instead of the "proper" track fo that engine, which I disagree with doing in most cases (except Mars), but hell, up to them.
ImageImageImage
User avatar
zero.eight
Traffic Manager
Traffic Manager
Posts: 128
Joined: 15 Jun 2007 01:14

Re: [OTTD] Universal Rail Type

Post by zero.eight »

Yeah, the speed limit is unnecessary. I'll add a parameter for it and default to unlimited.

I'll remove the engine as well for the default behaviour. It's only exists because railtype introduction dates didn't exist when this NewGRF was first made. The engine will remain for push/pull behaviour, although I don't know if anyone actually uses it.
OpenTTD: VAST - station tiles and objects | MICS - urban monorail graphical conversion | Universal Rail Type - easier train replacement
User avatar
V453000 :)
President
President
Posts: 946
Joined: 01 Feb 2011 11:22
Location: Beer

Re: [OTTD] Universal Rail Type

Post by V453000 :) »

the engine really is just an unnecessary step :) also, I would only make it available in NO_CLIMATE so that it does not break compatibility with older versions
ImageImageImage
User avatar
zero.eight
Traffic Manager
Traffic Manager
Posts: 128
Joined: 15 Jun 2007 01:14

Re: [OTTD] Universal Rail Type

Post by zero.eight »

Version 2.0.0 has been released. But I am an idiot and I didn't check backwards compatibility properly so... version 2.0.1 has also been released.

Changes from 1.4:
  • Features and fixes
    • Universal Rail track speed limit can be set by parameter (defaults to unlimited)
    • Universal Rail track construction cost multiplier can be set by parameter
    • Universal Engine does not need to be constructed so it won't pollute the construction menu
    • Added readme that can be accessed ingame
    • Added some compatibility fixes
  • Source
    • Reimplemented in NML
    • Moved to DevZone
Version 2.0.0 and newer require OpenTTD 1.2.0 or newer.
2.0.0 and newer are not compatible with older versions (1.x series).

If you want these shiny new features and don't have version 2.0.0 (quite likely) you can skip it and go straight to 2.0.1.

Get it via BaNaNaS or http://bundles.openttdcoop.org/universa ... ses/2.0.1/

Check the first post for a more elaborate description.
OpenTTD: VAST - station tiles and objects | MICS - urban monorail graphical conversion | Universal Rail Type - easier train replacement
claxx
Engineer
Engineer
Posts: 5
Joined: 02 Jan 2014 20:58

Re: [OTTD] Universal Rail Type

Post by claxx »

I have installed the add-on but I cant find a way to build universial depot? I thought it was gonna be a alternative like railway, monorail etc but it isnt
User avatar
zero.eight
Traffic Manager
Traffic Manager
Posts: 128
Joined: 15 Jun 2007 01:14

Re: [OTTD] Universal Rail Type

Post by zero.eight »

claxx wrote:I have installed the add-on but I cant find a way to build universial depot? I thought it was gonna be a alternative like railway, monorail etc but it isnt
Yes, there should be a new entry called "Universal Rail construction" in the list of constructable tracks. URT 2.0.1 works as expected in OTTD 1.4.0-beta 1.
Are you sure that the NewGRF is active? Are there any other NewGRFs active, especially ones that provide new track types?
Attachments
s.png
s.png (51.83 KiB) Viewed 28860 times
OpenTTD: VAST - station tiles and objects | MICS - urban monorail graphical conversion | Universal Rail Type - easier train replacement
claxx
Engineer
Engineer
Posts: 5
Joined: 02 Jan 2014 20:58

Re: [OTTD] Universal Rail Type

Post by claxx »

zero.eight wrote:
claxx wrote:I have installed the add-on but I cant find a way to build universial depot? I thought it was gonna be a alternative like railway, monorail etc but it isnt
Yes, there should be a new entry called "Universal Rail construction" in the list of constructable tracks. URT 2.0.1 works as expected in OTTD 1.4.0-beta 1.
Are you sure that the NewGRF is active? Are there any other NewGRFs active, especially ones that provide new track types?
It says its not active, do I have to start a new game to make it active?

THe Universal Rail Construction and Progressive Rail Set is both active when I´m at the main menu but not when I´m the game
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4760
Joined: 09 Sep 2007 05:03
Location: home

Re: [OTTD] Universal Rail Type

Post by Alberth »

spidyboy
Engineer
Engineer
Posts: 1
Joined: 11 Jun 2017 16:09

Re: [OTTD] Universal Rail Type

Post by spidyboy »

i need some help with this.. i just now installed the grf but I can't find the universal track if I open it on my existing saved games. However I do found it in new games.

is there anyway to open it on existing saved games?

Thanks before
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4760
Joined: 09 Sep 2007 05:03
Location: home

Re: [OTTD] Universal Rail Type

Post by Alberth »

Not without ruining your existing savegames.

Once you created the world, you're stuck with it. Make a new world if you don't like it.
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
jez
Traffic Manager
Traffic Manager
Posts: 152
Joined: 23 Aug 2003 21:24

Re: [OTTD] Universal Rail Type

Post by jez »

I've discovered a bit of a nasty side-effect of this NewGRF: when you go to autoreplace and replace wagons, you'll see the wagons from all the different track types. If you try to replace a wagon with a wagon for the wrong track type, the replacement will silently fail. So, I converted to monorail, then tried to upgrade my 25 tonne food van with a 32 tonne food van. This silently failed, because apparently the 32 tonne van is a RAIL van and the monorail van was a 30 tonne van.

Is there a way to modify this NewGRF so that only the appropriate wagons appear for replacement? Unlike the locomotives, it's generally not obvious from the graphic or description what rail type a wagon is appropriate for.
=== Jez ===
Eddi
Tycoon
Tycoon
Posts: 7936
Joined: 17 Jan 2007 00:14

Re: [OTTD] Universal Rail Type

Post by Eddi »

no. it's the entire point of this newgrf to allow replacing across the "wrong" railtypes.
You might not exactly be interested in Ferion, but if you are, have fun :)
User avatar
jez
Traffic Manager
Traffic Manager
Posts: 152
Joined: 23 Aug 2003 21:24

Re: [OTTD] Universal Rail Type

Post by jez »

Replacing locomotives, yes. But you don't want to replace your old wagons with rail wagons if your track is monorail, as the autoreplace will fail.
=== Jez ===
LaChupacabra
Transport Coordinator
Transport Coordinator
Posts: 275
Joined: 08 Nov 2019 23:54

Re: [OTTD] Universal Rail Type

Post by LaChupacabra »

Eddi wrote: 07 Jun 2021 13:32 no. it's the entire point of this newgrf to allow replacing across the "wrong" railtypes.
That's right. However, the problem does exist. It is not big, but it is. It consists in the fact that if you use this type of track only to exchange trains, in the exchange menu you are not able to specify for which type of track a given locomotive or wagon is assigned. This is particularly difficult to distinguish in the case of the default train set where the carriages look identical.

A solution would be to add information about the compatible track type. This information could be a permanent / optional element such as showing which set the vehicle is from or triggered by NewGRF.
Which is monorail.png
Which is monorail.png (24.53 KiB) Viewed 6817 times
I am sorry for may English. I know is bed.
Eddi
Tycoon
Tycoon
Posts: 7936
Joined: 17 Jan 2007 00:14

Re: [OTTD] Universal Rail Type

Post by Eddi »

LaChupacabra wrote: 07 Jun 2021 18:36This information could be [...] triggered by NewGRF.
this is actually possible, although not many NewGRFs use it in this way.
You might not exactly be interested in Ferion, but if you are, have fun :)
User avatar
jez
Traffic Manager
Traffic Manager
Posts: 152
Joined: 23 Aug 2003 21:24

Re: [OTTD] Universal Rail Type

Post by jez »

Eddi wrote: 07 Jun 2021 20:38
LaChupacabra wrote: 07 Jun 2021 18:36This information could be [...] triggered by NewGRF.
this is actually possible, although not many NewGRFs use it in this way.
Do you know how? It'd be good to update this NewGRF to display that info.
=== Jez ===
Eddi
Tycoon
Tycoon
Posts: 7936
Joined: 17 Jan 2007 00:14

Re: [OTTD] Universal Rail Type

Post by Eddi »

you need to set the purchase text callback, but doing that in this NewGRF is a terrible idea, because that would make it incompatible with any other vehicle GRF.

a better place would be a NewGRF which already modifies the default wagons, like OpenGFX+ Trains.
You might not exactly be interested in Ferion, but if you are, have fun :)
User avatar
jez
Traffic Manager
Traffic Manager
Posts: 152
Joined: 23 Aug 2003 21:24

Re: [OTTD] Universal Rail Type

Post by jez »

Yeah but I don't want the other changes made in that NewGRF.
=== Jez ===
Eddi
Tycoon
Tycoon
Posts: 7936
Joined: 17 Jan 2007 00:14

Re: [OTTD] Universal Rail Type

Post by Eddi »

making only the changes you want is left as an exercice left for the reader.
You might not exactly be interested in Ferion, but if you are, have fun :)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 1 guest