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
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 306
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by ColdIce »

if you use "block signal" ----> bridge/tunnel with signals on/in it ----> "Path Based Signal" = wrong
if you use "block signal" ----> bridge/tunnel with signals on/in it ----> "block signal" "Path Based Signal" = good
The rest is confetti!
Storm8
Engineer
Engineer
Posts: 3
Joined: 18 May 2010 09:05

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by Storm8 »

Hi,

I have no experience with using these patches, but can anyone please help me on how to get this patch working on Windows XP?

Thank you very much
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by ChillCore »

Storm8 wrote: Hi,
I have no experience with using these patches, but can anyone please help me on how to get this patch working on Windows XP?
Thank you very much
Patches have to be applied to the source code and recompiled into a working binary.

You can find all information you need here:
http://wiki.openttd.org/Category:Compiling_OpenTTD
There is a sticky at the top of the development section where you can ask questions if you have trouble.

If you browse a bit around you might be able to find a pre-compiled win32 binary.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Storm8
Engineer
Engineer
Posts: 3
Joined: 18 May 2010 09:05

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by Storm8 »

Compiling it seems too dificult for me. I have found a version with this feature already compiled, but my savegames would not work on that. does anyone please have only this patch compiled for win so I can use it normally?

Also is there a chance it will be included in some of future versions of OpenTTD?

thank you
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by Eddi »

these are development versions, you can't expect savegames to work like they do in stable versions.
Storm8
Engineer
Engineer
Posts: 3
Joined: 18 May 2010 09:05

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by Storm8 »

Yeah, I know... Just hoping someone might have a solution for me. I have a savegame I have spend many many hours on and I'd also like to use this feature.

Funny thing is that I have a savegame from about 20 years earlier (many changes has been made since then tough) where the patch works... So, anyone might have a suggestion what change could have caused the error?

Cheers
joshua peli
Engineer
Engineer
Posts: 60
Joined: 11 Jan 2010 15:34

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by joshua peli »

Hi...
I'm not so good with computers, so...can you tell me, step by step, how to install these files? Have I to unzip the files with a special programme? ?( ?( :bow: :bow: THX
rjch_au
Engineer
Engineer
Posts: 6
Joined: 18 Jul 2010 07:23

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by rjch_au »

For the benefit of those who have come to rely on this patch, I've made an attempt at updating this patch so it will apply to later versions of OpenTTD. Please be aware that I'm not a particularly good programmer - I know only enough to be dangerous. I've compiled this patch and it seems to be working for me. Please don't ask for help in applying it to whichever version of OpenTTD you're running - I'm unlikely to be able to help you. If it breaks anything, you get to keep any of the leftover pieces.
signaltunnel_V2.02_r20176.patch
(30.89 KiB) Downloaded 157 times
User avatar
Lord Aro
Tycoon
Tycoon
Posts: 2369
Joined: 25 Jun 2009 16:42
Location: Location, Location
Contact:

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by Lord Aro »

joshua peli wrote:Hi...
I'm not so good with computers, so...can you tell me, step by step, how to install these files? Have I to unzip the files with a special programme? ?( ?( :bow: :bow: THX
http://wiki.openttd.org/compiling
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
benom
Engineer
Engineer
Posts: 10
Joined: 01 Oct 2009 10:00

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by benom »

i just tried the one r20176 patch and found a bug ... when removing signals from both bridges and tunnels the game crashes
rjch_au
Engineer
Engineer
Posts: 6
Joined: 18 Jul 2010 07:23

Re: New V2 signals in tunnels and on bridges V2.02 r19495

Post by rjch_au »

benom wrote:i just tried the one r20176 patch and found a bug ... when removing signals from both bridges and tunnels the game crashes
Like I said - this is a patch to the patch to allow it to apply to the latest SVN versions. I can't say whether the crash you're getting is a bug in the original patch or something introduced by me.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Wasila »

I have had a problem with the latest version of the patch on the OP - the setting to change the frequency of simulated tunnels is not there. It is currently set too high and is of little use to me. Any help would be appreciated.

Wasila
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by ChillCore »

That option was removed. If I remember correctly because trains will crash on reverse if the gap is too small.

Search for "100 tiles" in the patch and change the "6" you find there to something else. (and the comments too maybe.)
You need to change it in both places else the actual gaps between the signals will not correspond to the signals that are drawn on the bridges.

I have it at 4 for the moment but I also have trains do not reverse when waiting in front of signals enabled.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Wasila »

Strange; I'm pretty sure I changed it in both places but, while the signals are in gaps of two in bridges the trains still wait six tiles before moving, and nothing has changed with the tunnels.

Thanks,
Wasila
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by ChillCore »

That sounds like you have correctly changed "bridge_signal_position += 6;" in tunnelbrige_cmd.cpp but did not change "static const uint8 bridge_signal_block_size = TILE_SIZE * 6;" in train_cmd.cpp.

It has been a while I have changed the patch to my likings but I think that is the only two places to change.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Wasila »

It appears to be working now. Thanks a lot!
joshua peli
Engineer
Engineer
Posts: 60
Joined: 11 Jan 2010 15:34

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by joshua peli »

Sorry guys...I've downloaded the file "signaltunnel_V2.02_r20363.patch". Lord Aro gave me the site http://wiki.openttd.org/compiling ...but, I don't understand which index have I to chose...please, help me, I want to learn compiling files ;)
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Wasila »

Well, what OS are you on? Windows? Mac? Linux? More information needed.
joshua peli
Engineer
Engineer
Posts: 60
Joined: 11 Jan 2010 15:34

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by joshua peli »

Oh...I use Windows version ;)
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: New V2 signals in tunnels and on bridges V2.02 r20363

Post by Wasila »

* Download "base" from http://lunac.sourceforge.net/, then install it (remember the installation directory)
* Download "useful" sources from http://www.openttd.org/download-openttd-useful, extract it to $INSTALLDIR/home. Once extracted extract all zips/tar.gzs.
* Start bash from $INSTALLDIR/bin
* Navigate to /home/<extracted dir>
* Enter zlib directory
* make -f win32/Makefile.gcc BINARY_PATH=/bin INCLUDE_PATH=/include LIBRARY_PATH=/lib install
* Enter lzo directory
* ./configure --bindir=/bin --includedir=/include --libdir=/lib --enable-static
* make install
* Enter lpng directory
* make -f scripts/makefile.mingw install
* Enter freetype
* ./configure --bindir=/bin --includedir=/include --libdir=/lib --enable-static
* make install
* Enter icu/source (4.4.1 doesn't work, 4.2.1 does)
* ./configure --bindir=/bin --includedir=/include --libdir=/lib --enable-static --disable-strict
* make install
* Enter xz
* ./configure --bindir=/bin --includedir=/include --libdir=/lib --enable-static
* make install
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Semrush [Bot] and 44 guests