Building electrified railway over not electrified

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

Post Reply
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Building electrified railway over not electrified

Post by adf88 »

When building electrified railway over non-electrified, underlying rails are converted into electrified. But not always - electrified track we are building may not cover underlying non-electrified track. The image shows the problem:
zrzut_ekranu.png
zrzut_ekranu.png (69.77 KiB) Viewed 5719 times
On the left side we can see that existing non-electrified track was combined with being built electrified track. But on the right we see that tracks were not combined together.

This is wrong in my opinion. More natural way would be to convert rail type in the second case too. Present behaviour can lead to mistakes. It's hard to spot places where a single piece of an electrified railway is not electrified.

// EDIT
Implementation:
electrified_over_non_electrified_r22335.diff
(1.67 KiB) Downloaded 148 times
Last edited by adf88 on 17 Apr 2011 14:57, edited 1 time in total.
:] don't worry, be happy and checkout my patches
User avatar
SquireJames
Tycoon
Tycoon
Posts: 1863
Joined: 07 Aug 2004 11:56
Skype: squirejames5
Location: Stoke-on-Trent
Contact:

Re: Building electrified railway over not electrified

Post by SquireJames »

Sure that is what the convert railtype button is for
Image
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Building electrified railway over not electrified

Post by adf88 »

SquireJames wrote:Sure that is what the convert railtype button is for
Did you read my post?

// edit

The point is that in the first case you don't have to use the convert railtype tool, but in the second you have to. And that's wrong.
:] don't worry, be happy and checkout my patches
User avatar
SquireJames
Tycoon
Tycoon
Posts: 1863
Joined: 07 Aug 2004 11:56
Skype: squirejames5
Location: Stoke-on-Trent
Contact:

Re: Building electrified railway over not electrified

Post by SquireJames »

No, I just decided to post a random comment that was vaguely related /sarcasm

Yes, I read your post. I still don't see the bug. The first shot shows you building across at 90 degrees, so the resulting line is all new. The second is you trying to build over the top of an existing rail piece in the same direction. It's not going to work, it's not intended to work, that's what the conversion button is for....
Image
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: Building electrified railway over not electrified

Post by Hyronymus »

I usually don't like 'half answers' to questions but can you try to explain your problem in a more detailed way?
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Building electrified railway over not electrified

Post by Eddi »

adf88 wrote:This is wrong in my opinion. More natural way would be to convert rail type in the second case too. Present behaviour can lead to mistakes. It's hard to spot places where a single piece of an electrified railway is not electrified.
how do you intend this to work when connecting an unelectrified rail to an existing electrified rail? and what if you use a NewGRF rail set, like NuTracks?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Building electrified railway over not electrified

Post by planetmaker »

I figure the point is: if you over-build with a compatible railtype you should convert the original railtile to the one being currently build. But only those tiles where you actually build. The problem, of course, then occurs where you overbuild an e-rail main line when attaching an un-electrified side line. Maybe it could be handled similar like for conversion or removal costs: go by track costs.
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Building electrified railway over not electrified

Post by Eddi »

so: "take the most expensive one"? but only if compatibility/powered is never removed, that should be done by conversion only.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Building electrified railway over not electrified

Post by adf88 »

I mean just to extend present behaviour to other track layouts. Presently if you cross two compatible rail pieces on a tile they will be combined together. I mean to do the same also when being built piece of rail covers already existent piece of rail.
Image
Compatible rail types are being combined together already. But not always, the criterion is "the same trackbit - don't combine, different trackbit - combine". I think we should always do combine.

Below we cross two compatible tracks:
Image
The new track is fully passable by an electric engine. But take some more complex example:
Image
We can see that the new track has a "gap" impassable by an electric engine.
Another example. This happened to me many times. Consider we are building some long electrified track, but there is a piece of non-electrified rail somewhere in the middle. It's hard to spot such places (until we have a huge traffic jam and we scream "WTF..."):
Image

// EDIT
planetmaker wrote:if you over-build with a compatible railtype you should convert the original railtile to the one being currently build. But only those tiles where you actually build.
Yes, but...
planetmaker wrote:The problem, of course, then occurs where you overbuild an e-rail main line when attaching an un-electrified side line.
in that case don't convert. Don't downgrade, only upgrade.
:] don't worry, be happy and checkout my patches
User avatar
Lordmwa
President
President
Posts: 899
Joined: 20 May 2006 19:30
Location: West Sussex, England

Re: Building electrified railway over not electrified

Post by Lordmwa »

I very much like this - very simple and makes sense.

My tupence on the idea:

Adding electricity (or higher speed in the case of nutraks) by going over the old with the new as an alternative to convert rail tool seems good
The reverse should not be possible without the convert rail to avoid loosing electricity when adding non electrified junctions.
The TT forums trivia tournament! Come along and join in the fun
http://www.funtrivia.com/private/main.cfm?tid=90722
TERdON
Engineer
Engineer
Posts: 90
Joined: 09 Nov 2010 15:30

Re: Building electrified railway over not electrified

Post by TERdON »

I agree as well.

Additionally, with NuTracks, it would be helpful if tracks were never downgraded even with the convert rail tool, at least not without confirmation, not even partly (e.g. going from medium speed non-eletrified to low speed electrified).
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Building electrified railway over not electrified

Post by adf88 »

adf88 wrote:
SquireJames wrote:Sure that is what the convert railtype button is for
Did you read my post?
Never late to say sorry. Sorry - it was mean.

I wanted to summarize everything. The issue can be split into two related ones.

1. The design of the rail tools is wrong. It can lead to mistakes when placing tracks. Rules about combining* tracks are not straightforward - they are different when crossing and different when overbuilding tracks. The fact that crossing-over "works" (track types get combined) encourages to think that it will also "work" when overbuilding.

* The combining occurs when one track is being crossed over or overbuilt by another track but with different track type. In the first case (crossing over) new track type is chosen if it's not less compatible then the old track type, otherwise the old track type is preserved. In the second case (overbuilding) always the old track type is preserved.
Since A "works", one may think that B should "work" too.
Since A "works", one may think that B should "work" too.
w.png (108.62 KiB) Viewed 4147 times
2. There is almost no visual indication of the situation where a rail track was placed but some parts in the middle of it wasn't turned into compatible railtype e.g. when placing an electrified track, some parts in the middle may left non-electrified and the user is not notified about the fact.
Usually, when placing a track and there is an obstacle, the track stops on this obstacle. It gives a visual feedback - we can easily see that not entire track was placed. It's like different when overbuilding another tracks, they get placed anyway, it's like the obstacles were silently skipped:
Almost no visual indication, easy to miss.
Almost no visual indication, easy to miss.
ttc.png (39.8 KiB) Viewed 4147 times

Also notice that "combining" is not the same as "converting". If we would unify the rules of the combining in a way that I proposed, the rail conversion tool wouldn't get obsolete. It's for massive, aerial converting of tracks to a single type. The track tool would become better in precise mixing of tracks of different types.
I agree on that the proposed changes would make the tools to interfere more and that this is a bad thing about interfaces in general. But a bit of interference doesn't have to be wrong, especially when it resolves other issues.


There is also a related FS ticket about stations: http://bugs.openttd.org/task/6590
:] don't worry, be happy and checkout my patches
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 45 guests