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

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

Post by FLHerne »

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 had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
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 »

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 »

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

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

Post by FLHerne »

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 had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

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

Post by Quast65 »

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
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.
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 »

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 235 times
User avatar
kyosuke1989
Transport Coordinator
Transport Coordinator
Posts: 273
Joined: 24 Mar 2008 13:04
Location: Finland

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

Post by kyosuke1989 »

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

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

Post by FLHerne »

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 had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
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 »

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 »

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 »

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 »

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 »

Updated to trunk and fixed desync bug.
Attachments
signaltunnel_V3.03.r25593.patch
(37.52 KiB) Downloaded 215 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 »

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 »

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: 7238
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

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

Post by Redirect Left »

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
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is 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 »

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: 86
Joined: 12 Oct 2012 17:16
Location: Netherlands

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

Post by MasterMeNL »

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.
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 »

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 6512 times
Everything works fine here, perhaps you can provide a savegame with the tracksetup you used. :)
User avatar
MasterMeNL
Engineer
Engineer
Posts: 86
Joined: 12 Oct 2012 17:16
Location: Netherlands

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

Post by MasterMeNL »

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?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 10 guests