[Mod Request] Renfe Train Sound

This is the place to request new mods or give ideas about what could be done.
Viceniallself01
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Apr 13, 2025 2:43 pm
Contact:

[Mod Request] Renfe Train Sound

Post by Viceniallself01 »

Hello, I would like a custom sound for when trains arrive to stations that plays the Spanish train system jingle.

I don't know how to make mods, and it's a very small kinda sh*tpost thing, so if someone wants to point me in the right directions to do it myself that's fine too
Last edited by Viceniallself01 on Wed Apr 16, 2025 7:09 pm, edited 1 time in total.
eugenekay
Filter Inserter
Filter Inserter
Posts: 368
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [Mod Request] Renfe Train Sound

Post by eugenekay »

The existing Honk Mod should have all of the Code you need to get started. You can Download it directly from the mod portal, then Unzip it to create your own version. You will need to change the sound files (OGG file format), and edit the control.lua to change how it works.... or enjoy the cacophony. Place your copy into the Mods folder in your User Data Directory. You can find more information about the Mod file Structure on the Wiki.

Good Luck!
robot256
Smart Inserter
Smart Inserter
Posts: 1145
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [Mod Request] Renfe Train Sound

Post by robot256 »

You don't even need to download and modify Honk. You can make a helper mod that has Honk as a dependency and changes the sound files. There's even an API to change the sound only for certain types of locomotive. I'm happy to help if you have a specific idea for when it should play.
Viceniallself01
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Apr 13, 2025 2:43 pm
Contact:

Re: [Mod Request] Renfe Train Sound

Post by Viceniallself01 »

Thank you both for replying, I ended up downloading a mod called Train Announcements which came with a script to add custom sounds that didn't work for me, so I manually wrote code for the mod that added the custom sound using the other sounds code as reference I spent like 2 hours trying to make it work until I realised that I forgot to add the extension .ogg to my sound in the data file. After changing the settings and playing around with the mod a bit, I also realised that it was not what I exactly had in mind because the sounds only play when you are inside the train and when hosting a server with friends it would say that the files in the mods don't match up. I was thinking that maybe instead of the train making the sound, it could be the station itself, so I will check out the mod structure page and if I have any questions I'll ask them here. Again thank you
robot256
Smart Inserter
Smart Inserter
Posts: 1145
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [Mod Request] Renfe Train Sound

Post by robot256 »

In that case, definitely take a look at the source code for Honk! It has a good system for playing sounds and identifying train events. You could probably make it work for you by cutting out all the options and changing the coordinates where the sound is played.
Post Reply

Return to “Ideas and Requests For Mods”