Signals in tunnels and on bridges V3.02 r24031

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
FLHerne
Tycoon
Tycoon
Posts: 1536
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Signals in tunnels and on bridges V3.02 r24031

Post by FLHerne » 20 Sep 2012 15:56

FaantBoy501 wrote:Hello All, I also have been trying to apply this Signal in Tunnel patch, but with little succes. Am not an expert at this, sadly, but I managed to use TortoiseSVN 1.7.9 and OpenTTD Trunk R24534.
When I try to apply the patch itself, it gives me around 5 faulty messages. But I really don't have a clue how to solve this. Maybe someone can help me out with this. Thx in advance.
If you're using a version posted in this thread, you'll need to apply it to the appropriate OpenTTD version (r24031, unless I missed a more recent one). As far as I can tell, Streckenläufer hasn't posted his updated version here.

@Streckenläufer: Would you mind posting your version? It would save me some time duplicating it :P .
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.

User avatar
FaantBoy501
Engineer
Engineer
Posts: 2
Joined: 20 Sep 2012 13:17

Re: Signals in tunnels and on bridges V3.02 r24031

Post by FaantBoy501 » 20 Sep 2012 16:48

aa oke that would be great thx in advance.

User avatar
Streckenläufer
Engineer
Engineer
Posts: 57
Joined: 22 Jun 2012 14:45
Location: Berlin-Germany

Re: Signals in tunnels and on bridges V3.02 r24031

Post by Streckenläufer » 25 Sep 2012 19:23

Hello,

my last working version is trunk/r24551

Signals in tunnels, Traffic Light, Tunnel under water
MfG Streckenläufer
OpenTTD V1.7.1, r27930 - Trafficlight - Bridge/tunnel Signals - Watertunnel - HousePlacing - SeaplaneAirport - Clipboard - Win7 64bit - MinGW/msys
!Sorry for my google English translator!

User avatar
FLHerne
Tycoon
Tycoon
Posts: 1536
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Signals in tunnels and on bridges V3.02 r24031

Post by FLHerne » 25 Sep 2012 20:50

I meant, could you post the patch file for that so that other people (like me) can use it? :wink:
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.

User avatar
Quast65
Tycoon
Tycoon
Posts: 1653
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: Signals in tunnels and on bridges V3.02 r24031

Post by Quast65 » 25 Sep 2012 23:02

Signals in tunnels, Traffic Light, Tunnel under water
Exactly the three patches I would like to use combined in a game! :D
I meant, could you post the patch file for that so that other people (like me) can use it?
Indeed, pretty please with sugar on top! :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

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

pravdomil
Engineer
Engineer
Posts: 7
Joined: 21 Feb 2013 21:51
Contact:

Re: Signals in tunnels and on bridges V3.02 r24031

Post by pravdomil » 21 Feb 2013 23:58

Hi, I updated this nice patch to work with revision 25033.
What we shall do to have it in official release?
Attachments
signaltunnel_V3.02_r25033.patch
(35.09 KiB) Downloaded 175 times

User avatar
kyosuke1989
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 24 Mar 2008 13:04
Location: Finland

Re: Signals in tunnels and on bridges V3.02 r24031

Post by kyosuke1989 » 22 Feb 2013 16:16

I believe that someone has "the less hacky way" of implementing this feature in works in some point of future. This current implementation does not allow you to implement signals same way as on track.

User avatar
FLHerne
Tycoon
Tycoon
Posts: 1536
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: Signals in tunnels and on bridges V3.02 r24031

Post by FLHerne » 22 Feb 2013 17:28

pravdomil wrote:What we shall do to have it in official release?
Even if this implementation was ever likely to reach trunk (it won't, due to being hacky and inflexible gameplay-wise), it still has several quite serious bugs that would prevent it from doing so:
- It just doesn't work at all with path signals (not only can you not put them in tunnels, placing path signals immediately before or after tunnels causes loads of bugs). With many/most players using path signals for almost everything, this is a big problem.
- The first train arriving at a newly-signalled tunnel often stops, despite it being clear, and has to be forced through.
- When stopping trains at the signals, it doesn't properly set the power/load/whatever - trains continue to produce smoke at the maximum rate, and are charged the same running costs as for accelerating. Similarly, they're shown as '0mph' rather than 'Waiting for path'.
- For some reason, it displays a signal facing in the wrong direction at the exit end of the bridge.
- Sometimes, for no apparent reason, trains just ignore the signals and crash into the ones in front. I couldn't see a pattern, but that might be because it only happens rarely.

Of course, as a constant user of this patch, I'd love it if anyone did fix any of the above. I suspect they'd be wasting their time though, as the devs would be unlikely to accept a patch based on this even without any bugs :( .
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.

Ferrarius
Engineer
Engineer
Posts: 37
Joined: 03 May 2011 11:52

Re: Signals in tunnels and on bridges V3.02 r24031

Post by Ferrarius » 12 Jul 2013 18:05

Actually, the signal at the end of the tunnel/bridge is quite helpful if one wants to quickly see in what direction the tunnel signals have been built.

bcmpinc
Engineer
Engineer
Posts: 19
Joined: 18 Nov 2008 00:10

Re: Signals in tunnels and on bridges V3.02 r24031

Post by bcmpinc » 12 Jul 2013 18:16

Another reason why this patch would not be included in trunk is the following. Consider this piece of "src/tables/settings.ini", that is added by the patch:

Code: Select all

[SDTC_VAR]
var      = gui.simulated_wormhole_signals
type     = SLE_UINT8
flags    = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
def      = 2
min      = 1
max      = 16
str      = STR_CONFIG_SETTING_SIMULATE_SIGNALS
strval   = STR_CONFIG_SETTING_SIMULATE_SIGNALS_VALUE
proc     = RedrawScreen
There are two issues. One minor one, the setting does not belong to gui. And one major one, the client can use a different setting than the server. This will guarantee that a multi-player game will desync.

If I don't forget, I will put a version of this patch, that applies to current trunk and fixes this issue, here within a few days.

Oh and FLHerne, thanks for pointing out the other bugs. If I want to include this patch in my patch pack, I will have to fix some of those bugs as well.

pravdomil
Engineer
Engineer
Posts: 7
Joined: 21 Feb 2013 21:51
Contact:

Re: Signals in tunnels and on bridges V3.02 r24031

Post by pravdomil » 12 Jul 2013 20:14

Its time to create some Git or Hg repo for this patch, can somebody create it?

bcmpinc
Engineer
Engineer
Posts: 19
Joined: 18 Nov 2008 00:10

Re: Signals in tunnels and on bridges V3.02 r24031

Post by bcmpinc » 12 Jul 2013 22:02

I have created https://github.com/bcmpinc/openttd, which contains this patch, as well as various other patches.

bcmpinc
Engineer
Engineer
Posts: 19
Joined: 18 Nov 2008 00:10

Re: Signals in tunnels and on bridges V3.02 r24031

Post by bcmpinc » 13 Jul 2013 13:11

Updated to trunk and fixed desync bug.
Attachments
signaltunnel_V3.03.r25593.patch
(37.52 KiB) Downloaded 155 times

User avatar
Vaulter
Traffic Manager
Traffic Manager
Posts: 185
Joined: 21 Dec 2004 05:35
Skype: andrey-zaharov
Location: St. Petersburg, Russia
Contact:

Re: Signals in tunnels and on bridges V3.02 r24031

Post by Vaulter » 12 Aug 2013 21:51

is it only for me? I have red signals at fresh built bridge-signals : searching for the wrong code and cannot find any
:?:

bcmpinc
Engineer
Engineer
Posts: 19
Joined: 18 Nov 2008 00:10

Re: Signals in tunnels and on bridges V3.02 r24031

Post by bcmpinc » 15 Aug 2013 11:43

A yes, that is an eye-candy feature. It has absolutely no purpose other than showing that it is a bridge with signals. Trains ignore that signal completely. Note that on bridges you can only have one-way signals.

User avatar
Redirect Left
Tycoon
Tycoon
Posts: 6564
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Signals in tunnels and on bridges V3.02 r24031

Post by Redirect Left » 09 Sep 2013 03:00

bcmpinc wrote:A yes, that is an eye-candy feature. It has absolutely no purpose other than showing that it is a bridge with signals. Trains ignore that signal completely. Note that on bridges you can only have one-way signals.
That is a bit misleading to the actual player though. I'd suggest coming up with a seperate way of indicating it is a signalled bridge (other than i dunno...it having signals on it). I did read somewhere on these forums a while back that there are unused signal sprites, perhaps use one of them? Note that I have no idea if these sprites still exist, if they ever did, i'm sure a dev will know for sure, I also don't know what they look(ed) like, so I'm unsure of suitability, may be worth looking into though, as a red signal is a bit misleading, at least in my opinion ;)

On the plus side, it's a very interesting patch and works well enough for the job it does, I hope one day someone can patch it up enough to make it valid for inclusion by default, but I think it may be a terrible amount of work, sadly :(
Image
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!

User avatar
Steijn
Engineer
Engineer
Posts: 72
Joined: 12 May 2003 15:14
Location: Amersfoort/Rotterdam

Re: Signals in tunnels and on bridges V3.02 r24031

Post by Steijn » 27 Sep 2013 00:01

Hi, can someone update this fantastic patch to the current trunk? I tried the latest release but I get errors when I try to apply the patch. I tried solving it myself, but unfortunately I can't get it right (probably due my limited programming skills :oops: ). If it's not that much work, help would be appreciated very much. :bow:

This is the error report:
patching file src/rail_cmd.cpp
...
Hunk #2 FAILED at 1025.
...
1 out of 8 hunks FAILED -- saving rejects to file src/rail_cmd.cpp.rej

User avatar
MasterMeNL
Engineer
Engineer
Posts: 79
Joined: 12 Oct 2012 17:16
Skype: melvinvermeeren
Location: Netherlands

Re: Signals in tunnels and on bridges V3.02 r24031

Post by MasterMeNL » 27 Sep 2013 07:46

Did you use signaltunnel_V3.03.r25593 posted above or the one in the main post? Because I think that the first one still should apply cleanly to trunk.
If you not tell me and I'll update it.

Also, I think I found a bug in this.
When a path signal checks a bridge or tunnel with signals the game crashes over here, although this is with my own patch pack (it's in my signature) so the problem may lie with some other patches instead of this one but I doubt it.

Can anyone confirm this?

Regards,

Melvin.
Anyone up for some casual co-op?
MMNL Ready2Play MP PatchPacks; Request here!.

User avatar
Steijn
Engineer
Engineer
Posts: 72
Joined: 12 May 2003 15:14
Location: Amersfoort/Rotterdam

Re: Signals in tunnels and on bridges V3.02 r24031

Post by Steijn » 27 Sep 2013 09:07

Hmmm, seems I used signaltunnel_V3.02_r25033.patch :oops: , now I tried to apply signaltunnel_V3.03.r25593.patch on trunk 25799 and I still get some, but different, errors.
[...]
patching file src/saveload/saveload.cpp
Hunk #1 FAILED at 251.
1 out of 1 hunk FAILED -- saving rejects to file src/saveload/saveload.cpp.rej
patching file src/saveload/saveload.h
Hunk #1 FAILED at 89.
1 out of 1 hunk FAILED -- saving rejects to file src/saveload/saveload.h.rej
[...]
Further I tried to verify your bugreport, but I can't replicate it. I used OpenTTD 1.3.2 stable release with signaltunnel_V3.02_r25033.patch and chunnelv20_r24097.patch applied to it. I made the following tracksetup (and sent a train over it):
noproblem.png
noproblem.png (15.53 KiB) Viewed 3720 times
Everything works fine here, perhaps you can provide a savegame with the tracksetup you used. :)

User avatar
MasterMeNL
Engineer
Engineer
Posts: 79
Joined: 12 Oct 2012 17:16
Skype: melvinvermeeren
Location: Netherlands

Re: Signals in tunnels and on bridges V3.02 r24031

Post by MasterMeNL » 27 Sep 2013 14:48

Thanks for verifying this.
I decided to test all of my builds to find the culprit and it is ATC Speed Control, turning it off fixing the problems even in the latest builds!

I'll try to fix this problem, but I may not be able to.
ATC Speed Control doesn't like checking those "weird" signals on "impossible" places I guess.

Regards,

Melvin.

P.S. Want to play co-op sometime?
Anyone up for some casual co-op?
MMNL Ready2Play MP PatchPacks; Request here!.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 2 guests