Trains through non-stop stations / Whistle boards

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
User avatar
Dave
Moderator
Moderator
Posts: 17249
Joined: 26 Dec 2005 20:19
Location: North London

Trains through non-stop stations / Whistle boards

Post by Dave »

I've been thinking about this and just want to throw it out to the world (mods: I'll also be placing a suggestion in TTDP, don't shout for cross-posting).

Assuming a train knows when it's entering a station (I don't actually know if that's the case), and assuming it knows it's not stopping, could something be done either in a grf or the game system to make the train sound it's horn/whistle as it enters the station? It's not compulsory anymore, but it would be a nice addition.

Also the possibility of building a whistle board (probably like a station, effectively) that causes the train to sound it's whistle or horn when required.

Both pretty empty ideas with very little benefit other than realism, but I thought I'd throw them out there to see if it was easy enough to implement.
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
User avatar
Zhall
Tycoon
Tycoon
Posts: 1237
Joined: 17 Jul 2007 01:36
Skype: moonray_zdo
Location: Teh matrix, duh.
Contact:

Re: Trains through non-stop stations / Whistle boards

Post by Zhall »

¿
User avatar
Toni Babelony
Tycoon
Tycoon
Posts: 1389
Joined: 07 Jul 2006 09:34
Skype: toni_babelony
Location: Sagamihara-shi, Japan
Contact:

Re: Trains through non-stop stations / Whistle boards

Post by Toni Babelony »

This subject is quite interesting and I do think it'll be a great addition to TTD, though in a lot of countries this isn't common practice. However, I'm always a foamer for horny trains. :mrgreen:
Retired JapanSet developer and creator of TIAS.
PantyraiderZ
Engineer
Engineer
Posts: 32
Joined: 19 May 2007 00:49

Re: Trains through non-stop stations / Whistle boards

Post by PantyraiderZ »

Over here in the Boston Metro area, all commuter rails that pass by my station as well as the Downeaster trains blow ther horns as a safety precaution. So i'm for that.
yorick
Engineer
Engineer
Posts: 80
Joined: 23 Mar 2008 08:53

Re: Trains through non-stop stations / Whistle boards

Post by yorick »

I created a patch that makes train whistle when they pass a waypoint.
Attachments
waypoint_whistle.diff
r14030
(749 Bytes) Downloaded 266 times
Batti5
Transport Coordinator
Transport Coordinator
Posts: 279
Joined: 06 Aug 2007 17:37

Re: Trains through non-stop stations / Whistle boards

Post by Batti5 »

bridge & tunnel whistle board, like in reality.
Wish to earn some money for free just by viewing some advertisment? Click this banner for more info.
Image
It is Legal.
User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: Trains through non-stop stations / Whistle boards

Post by ostlandr »

Cool idea!

http://en.wikipedia.org/wiki/Train_horn ... rn_Signals

http://en.wikipedia.org/wiki/Train_whistle

Most useful ones IMHO would be:

_ _ (two long sounds) when starting- already in game

_ _ o _ (long, long, short, long) - approach level crossing- should be used for "whistle post"

o o (two short)- acknowledge order- for waypoints?

o o o (3 short) - backing up- use when train reverses?
Who is John Galt?
Batti5
Transport Coordinator
Transport Coordinator
Posts: 279
Joined: 06 Aug 2007 17:37

Re: Trains through non-stop stations / Whistle boards

Post by Batti5 »

(two long sounds) when starting- already in game
(long, long, short, long) - approach level crossing- should be used for "whistle post"
(two short)- acknowledge order- for way points?
(3 short) - backing up- use when train reverses?
I try ed WITH!!!!! recent builds, it works 100% OK, no errors, do the suggestions written above and, put it in trunk.

Plus, trains could Whistle level crossings and stations it there not stopping, and different engines could have different sounds not just locos.
And a switch in the advanced settings on/off
Wish to earn some money for free just by viewing some advertisment? Click this banner for more info.
Image
It is Legal.
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Trains through non-stop stations / Whistle boards

Post by 2007Alain2007 »

updated to R15821
For Community Integrated Version http://code.google.com/p/civopenttd/
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Trains through non-stop stations / Whistle boards

Post by 2007Alain2007 »

code change

Code: Select all

-if (IsTileType(v->tile, MP_RAILWAY) && IsRailWaypoint(v->tile) && IsFrontEngine(v)) v->PlayLeaveStationSound();
+if (IsTileType(v->tile, MP_RAILWAY) && IsRailWaypoint(v->tile) && v->IsFrontEngine()) v->PlayLeaveStationSound();
hope this is ok to show the change like this
For Community Integrated Version http://code.google.com/p/civopenttd/
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Trains through non-stop stations / Whistle boards

Post by SirkoZ »

IsFrontEngine(v) -> v->IsFrontEngine() is the same thing I changed in the diesel_smoke patch for r16724+, so yes it's OK. ;-)
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Trains through non-stop stations / Whistle boards

Post by 2007Alain2007 »

I just working on this patch becuse it seems a nice one to get me started on

goals for this patch is to get a setting on it and also add bridge & tunnel whistle

I added bridge & tunnel whistle thats working here is the patch file for that

How dose the settings page work can any one give me a hint in the right way i just had a go at it and fail with a failt error in text doc ?

but this patch is working but still theres a no on and off setting

and also i need to clean the code up but this is the frist time i tryed to chage a patch file

but please tell me what you think
whistle.patch
For Community Integrated Version http://code.google.com/p/civopenttd/
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 3 guests