Honk

by GotLag

Trains honk when stopping. And starting. And on command.

Tweaks
2 years ago
0.13 - 1.1
83.0K
Trains

i fog horn for cargo ship

4 years ago

just noticed my cargo ships use the same honk as train, is it possible to use different honk for them?

4 years ago

Honk currently doesn't distinguish between different types of train, and the cargo ships are modified trains. I'll have a look, but I expect all I can do without rewriting the mod is to disable horns for ships.

4 years ago

whoa, rewrite the whole mod or just add a few sections to it? seems extreme to have to rewrite it but i admit, havent looked at the sauce. i will trust in your judgement - i expected to hear the engine would limit this.

4 years ago

fwiw the best thing I can find for you is that the debug name of an entity is cargo_ship if it is one.

robot256 β˜†
3 years ago
(updated 3 years ago)

Hey GotLag, I have implemented this feature, if you want to incorporate it in your release! All I did was add a remote interface so that other mods can add sounds and assign them to specific entities. They can also assign "none" if that entity should not make any noise. The Honk mod saves the assignments in a table and checks it for the target entity before defaulting to the normal sound.

See the last commit in my fork: https://github.com/robot256/robot256_Honk
Here is my example of how to use it: https://github.com/robot256/MoreHonks

As a test, I added some very nice steam train whistles to the steam engines in Yuoki Industries - Railways and the Steam Locomotive mod. Next I'm going to add some fog horn sounds for the cargo ships. In the future, it would be possible for mods like Cargo Ships to include the horn sounds themselves and register them with Honk to the appropriate entities.

Edit: I posted my fork with the interface, and a new mod with the new sounds. Feedback is welcome!

robot256 β˜†
3 years ago

Just wanted to bump this topic since you updated Honk recently. It'd be great if you want to incorporate my remote interface for adding custom sounds per entity. If not, no worries, and I'll update my fork.

3 years ago

Sorry for not responding last time, it was on my list of things to do then work got real busy.
Do you mind if I have a look through it this weekend?

robot256 β˜†
3 years ago
(updated 3 years ago)

No problem! Let me know if you have any questions (here or on GitHub).

Edit: Use this URL to see the final version of my additions. Relevant files are control.lua, settings.lua, and locale.cfg. https://github.com/robot256/robot256_Honk/compare/810afde..3a89d22

robot256 β˜†
2 years ago

Hey Gotlag, thanks for the invite! I can push my update sometime this week.

Do you think the ship and steam train sounds from More Honks should be incorporated into this one, or kept as an add-on?

2 years ago

It's entirely up to you

robot256 β˜†
2 years ago

Okay, thanks!

New response