FS#5534 - Train sound effects with multiple engines

Attached to Project: OpenTTD
Opened by O. Kvist (kyosuke1989) - Wednesday, 24 April 2013, 18:18 GMT
Last edited by frosch (frosch) - Sunday, 05 May 2013, 10:28 GMT
Type Bug
Category NewGRF
Status Confirmed
Assigned To No-one
Operating System Windows
Severity Medium
Priority Normal
Reported Version 1.3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


When a train is waiting for block signal to clear, if running sound is defined on train, it is played even if it shoudn't. Also idle sound is also played at same time. When train is waiting at PBS signal, idling sound behaves as it should, and idling sound is played, without running sound at the same time.

Could there be a switch for that "feature", so one could choose if player wants to have running sound playing on red block signal?
This task depends upon

Comment by frosch (frosch) - Thursday, 25 April 2013, 16:51 GMT
  • Field changed: Status (New → Waiting on reporter)
There is no such thing as "running" or "idle" sound. There are 3 sound effects in total which could be associated with either of them.

Sound effect 4: Played every time the vehicle has moved a certain distance. (i.e. more often when vehicle moves faster)
Sound effect 7: Played at constant rate (every 16 ticks) when vehicle is moving. (speed > 0)
Sound effect 8: Player at constant rate (every 16 ticks) when vehicle is not moving. (speed = 0)

I suspect that you use effect 4 while you want to use 7 and 8.
Also note that the sound for effect 7 and 8 should not be longer than 16 ticks, else the next sound will start before the other finished. This might also result in playing sound in parallel.
Comment by EthanG (EthanG) - Saturday, 27 April 2013, 19:28 GMT
I just tested for this, couldn't replicate it in a game with TTD data (from Windows), no train newgrfs, and monorail trains. These monorails have a very clear 'start sound' which is audible when and only when the train pulls away from signals, stations, and sheds. The sound played only when expected regardless of signal type. I have no idea how this 'start sound' is produced from whatever is in the grfs, but perhaps it's a bug in a particular grf?

(Test version was latest git, pulled <20mins before this comment.)
Comment by O. Kvist (kyosuke1989) - Monday, 29 April 2013, 21:27 GMT
I used Finnish Trainset nightly r54 and OpenTTD 1.3.0. Use any locomotive or multiple unit with sound effects (For example, Dr12 and Tve4 on consist).

Sound effect 7 and 8 are played on the situation when train, which has 2 or more locomotives (having sound effect 7 and 8 programmed correctly) is waiting on block signal to clear. Normally, when train is idling on station, or train is stopped because of red PBS signal or train stopped using GUI stopping command, only sound effect 8 is played.

It seems that when there is over 1 locomotive (having sound effects 7 and 8 programmed correctly) on consist, sound effect 7 is played only on first locomotive, and second locomotive is playing sound effect 8. The second locomotive's sound effect 8 is played, regardless of current consist state (moving or stationary). In stationary case it's ok, but when consist is moving, second locomotive's sound effect 7 should be played also together with first locomotive's sound effect 7.

When there is just 1 locomotive (having sound effects 7 and 8 programmed correctly) on consist, and consist is waiting on red block signal to clear, sound effect 7 is played (it shouldn't!)
Comment by O. Kvist (kyosuke1989) - Tuesday, 30 April 2013, 11:31 GMT
Here is a savegame of situation. Finnish Trainset nightly r54 can be found at First consist with Dr12 and Dr13 (Train 1) is stopped on line manually and Dv16 (Train 2) is waiting on PBS signal. Wrong behaviour can be tested when the Dr12/Dr13 (Train 1) consist is moved and stopped behind block signal and Dv16 (Train 2) (Dv16 has sound effect 7 playing at that time). Dr13 on Dr12/Dr13 consist (Train 1) is not playing sound effect 7 at all, it is playing sound effect 8, regardless of situation. Sound effect 7 is played normally in case of single Dr13 locomotive moving. If Dv16 (Train 2) is stopped behind block signal and Dr12/Dr13 (Train 1) is waiting on block signal to clear, Dr12 has sound effect 7 played at that time, when it should play sound effect 8.
Comment by frosch (frosch) - Sunday, 05 May 2013, 10:28 GMT
  • Field changed: Type (Feature Request → Bug)
  • Field changed: Summary (Train running sound effect played on red block signal → Train sound effects with multiple engines)
  • Field changed: Status (Waiting on reporter → Confirmed)
  • Field changed: Category (Core → NewGRF)