Transport Fever

Transport Fever

Locomotive Whistle Sound Fix
25 Comments
KeybdFlyer 4 Feb, 2020 @ 8:44pm 
@Hypernaught That's just what I needed to hear, many thanks. I followed the same path as you did, in the end. Dipped into other mods with their own soundsets and tried to figure-out what they'd done! Mostly it worked, but it's nice to have your method set out set-by-step to refer back to for the future. Good job, and once again - many thanks!
Capitán Alatriste 4 Feb, 2020 @ 5:03pm 
Ah sweet man! Cheers
Hypernaught  [author] 3 Feb, 2020 @ 1:33pm 
@KeybdFlyer @Griviues I updated the description above to include some step by step instructions for anyone who wants to do it themselves.

I haven't tweaked the values since I last changed this a couple of years ago, and I don't know if the code has changed for the second game, but I may come back and try again when I get it.

Hope it works for you guys, I'll try and be quicker on the response next time!!
Hypernaught  [author] 3 Feb, 2020 @ 1:27pm 
@KeybdFlyer @Griviues

This was why in the base game all the 'old' trains had the same whistle, and the 'new' trains all had their own shared whistle sound. Because each model file just pointed to either the train_steam_old.lua or train_steam_modern.lua which both had a single 'horn' value that pointed to the same name .wav file.

So what I did was I copied over the entire contents of the soundset file for either new or old depending on the train, changed the 'horn' value to the .wav file that I wanted to use and saved it as a new .lua file with a different name. Then I went to the individual train model file and changed the soundset 'name' value so it would always point at my new soundset.

That did the trick for me, but I'm aware it might not be a perfect solution.
Hypernaught  [author] 3 Feb, 2020 @ 1:27pm 
@KeybdFlyer @Griviues

Hi guys, really sorry for not replying for such a long time, didn't come back to this game for a while until the 2nd was announced. I'm more than happy to break down what I did, as it's more of a bodged work-around than anything else after digging around some mods that had their own sound sets and working out how to do it for base trains.

I initially had the bright idea of going into the individual model files (res>models>model>vehicle>train) for each train that was in the base game and setting the horn value in the soundset object to a different corresponding .wav file in the audio files.

Problem was this only initially worked, then the whistles reverted back to a standard soundset (which are found in res>config>soundset), which made me realise that the base game only has two base sound sets for steam train models: train_steam_old.lua and train_steam_modern.lua
KeybdFlyer 14 Jan, 2020 @ 8:42pm 
@Griviues I'd be grateful if you'd explain how the "fix" works! I've looked through the files and got a rough idea, but can't grasp exactly what needs to be changed for each model. I made some whistle effects for early locomotives which work fine for a short while but then revert to the default whistle - and it's driving me nuts! :-)
Capitán Alatriste 24 Sep, 2019 @ 2:41pm 
Hello there
Griviues 24 Feb, 2019 @ 3:22am 
Hey there. I've recently noticed that the issue appears with workshop locomotives (added to the game).

I've nailed down that it happens when a locomotive is sent into a depot and then out again - then the whistle reverts to the default one. I've also been able to find out that if you save the game and reload it, the whistle sounds will be fixed.

I've been wondering how you managed to fix that issue on the vanilla locomotives (I've checked and your fix works with the same reproduction steps), and if it would be possible for me to modify the workshop locomotives the same way you did - in order to fix the reverting whistle issue.

I realise that you may not do Transport Fever mods any more, but I'd like to know your method so perhaps I can get to the bottom of this.
Not_A_KGB_Agent 24 Jan, 2019 @ 4:08pm 
im just gonna ask ive asked before but can sombody please make a working railway cannon
DocBrown86 3 Aug, 2017 @ 2:15am 
Hope you eventually get the American ones taken care of. This was really starting to bug me tonight!
Northerner Transport Hub 1 Aug, 2017 @ 12:51am 
that will show them stupid developers
WannaSeeSomethingStupid? 25 Jul, 2017 @ 2:09am 
Seems like the mod brings European locomotives and multiple units into the American vehicle set. Not technically a problem, but it seems a bit of an odd side effect.
Cibus 26 Apr, 2017 @ 11:25am 
but still a great mod
Cibus 26 Apr, 2017 @ 11:25am 
a wonderful scotsman how nice
Hypernaught  [author] 25 Apr, 2017 @ 3:58pm 
And there I thought I'd gotten away with it, how's that now? :P
Cibus 25 Apr, 2017 @ 1:25pm 
just a hint i would update the picture you have.
the picture is of a steam whistle on a steam tractor a steam train has a large deeper whistle
Hypernaught  [author] 23 Apr, 2017 @ 5:28am 
Glad you're happy with it matey. ^^
CUADRADITOS 23 Apr, 2017 @ 1:37am 
I'm testing a lot of days and works properly! Thanks again for repair this shit! XDD
Hypernaught  [author] 19 Apr, 2017 @ 11:14am 
Had forgotten to add the modified locomotive models, sorry about that, have updated the fix, the locomotives should now consistently use the intended whistle sounds.

@Empire Builder: These changes at present only affect the European locomotives, in truth I haven't tried out the American ones, do they all revert to the same whistle? If that's the case I'll see about updating the American locomotives as well.
CUADRADITOS 19 Apr, 2017 @ 5:26am 
I'm testing and the problem persist. Don't know the problem only is on my spanish version of the game, but something is missing.

On original folder there are a ".lua" only for "train_diesel", "train_electric_modern", "train_electric_old", "train_steam_modern" and "train_steam old".

I think the game don't read the .lua of this mod (or the files) there is no .lua for specific train on my original folder of the game, and I think this is the problem. When I add (manually, copy, paste) this files to my folder, the trains sounds the first time but no more... I will try to search the solution but I'm not a programmer XD
CUADRADITOS 19 Apr, 2017 @ 4:05am 
I'm testing that, and only sounds the first time when the train leave at first station. Not sure this is a game problem o conflict with repeat sounds of the game. I think the solution is copy that folder into game's folder. I think this solves that issue
CUADRADITOS 18 Apr, 2017 @ 11:12pm 
Thanks! You did it! Maybe developers see that mod and fix that officially... Thanks again
Tomahawk109 18 Apr, 2017 @ 5:50pm 
Is this for Europe only or both EU and USA trains?
MeowCats 18 Apr, 2017 @ 3:20pm 
Oooh thank you for this! some of the locomotives sounded ear-numbingly strange at some point.. especially electric ones.
Cha0ticG0th 18 Apr, 2017 @ 3:02pm 
THANK YOU!!!