Currently, all ambient sounds (music tracks) are either bound to one planet or to all space platforms (and space map). For surfaces which don't have an associated planet or space platform, there is a fallback to play Nauvis-bound tracks on them.
This is not very flexible and not at all friendly towards modded surfaces, especially those created on-the-go.
Since surfaces have names I would like to propose a way to bind ambient sounds to surfaces using their names (alongside the current planet/space platform bindings).
There would be a new property of AmbientSound, something along the lines of surfaces or surface-names, an array of strings. If the current surface's name would contain any of these strings as a substring, the ambient sound could play.
To match this multi-surface binding, the existing planet binding would be extended to accept multiple planets.
I would like to hear from you if this sounds reasonable and/or if there is a use-case this would not cover. And your thoughts in general.
AmbientSound surface binding
-
thesixthroc
- Fast Inserter

- Posts: 126
- Joined: Wed Apr 29, 2020 9:53 pm
- Contact:
Re: AmbientSound surface binding
This would not cover cases such as Pirate Ship islands in which surfaces are generated on-demand, which would be sad for this API. The number of possible surface names in the mod is I think ~1k.
Perhaps new surfaces can have a planet_music string assigned instead?
Perhaps new surfaces can have a planet_music string assigned instead?
Re: AmbientSound surface binding
How are the island surfaces named? Or more like, how would you like the music to be bound to those surfaces?
If you know what the planet_music string would be, can't you just incorporate that into the name of the surface?
My assumptions was that such surfaces created on demand would be named something like "island-<number>", "<size>-island". That way a music track could be bound to all of them by setting surface_names = {"island"}
Is it that those names are "actual" names, visible and come into gameplay?
If you know what the planet_music string would be, can't you just incorporate that into the name of the surface?
My assumptions was that such surfaces created on demand would be named something like "island-<number>", "<size>-island". That way a music track could be bound to all of them by setting surface_names = {"island"}
Is it that those names are "actual" names, visible and come into gameplay?
Re: AmbientSound surface binding
Another thing, AmbientSound::play_on_all_surfaces property could be useful.
Re: AmbientSound surface binding
For my use case , i think it would be nice if players can decide on which surface they want the music contained in my mods, so if they play a new mod that adds a surface and i'm lagging behind for compatibility, they can (while playing/run time per player setting ideally) change the allocation as they like.
Now for generated surfaces like the pirate islands i have no idea how it should be handled nor what is realistic. I don't expect other modders to add some compatibility in their mod for my music either.
Sounds like play_on_all_surfaces could be used for the purpose of making an association between music and those "unknown surfaces". If it's a property of ambient sound, i understand it as for "non-thematic music", i would add this to sound that "could go in pirate island" for example. I imagine it will be possible to avoid playing those sound on the space age planets, if necessary by always playing other song and not those with such property so as to make them reserved for "surfaces without explicit rules". That would be good for me.
Made me think of a mod that would have a button or a shortcut, that player can press when hearing a music, and it would allow them to set up the surface association for this song, from "remove it i don't want to hear that one again" to "put it on every location i love it". I thought maybe a dropdown menu with the surfaces could do, but feature creep is difficult to avoid if you want a song to only be played on 7 out of the 9 surfaces your modpack have ( and it has pirate islands) it sounds tricky to provide the interface for such precision.
I will try to use what is made available anyway
Now for generated surfaces like the pirate islands i have no idea how it should be handled nor what is realistic. I don't expect other modders to add some compatibility in their mod for my music either.
Sounds like play_on_all_surfaces could be used for the purpose of making an association between music and those "unknown surfaces". If it's a property of ambient sound, i understand it as for "non-thematic music", i would add this to sound that "could go in pirate island" for example. I imagine it will be possible to avoid playing those sound on the space age planets, if necessary by always playing other song and not those with such property so as to make them reserved for "surfaces without explicit rules". That would be good for me.
Made me think of a mod that would have a button or a shortcut, that player can press when hearing a music, and it would allow them to set up the surface association for this song, from "remove it i don't want to hear that one again" to "put it on every location i love it". I thought maybe a dropdown menu with the surfaces could do, but feature creep is difficult to avoid if you want a song to only be played on 7 out of the 9 surfaces your modpack have ( and it has pirate islands) it sounds tricky to provide the interface for such precision.
I will try to use what is made available anyway
Check out my latest mod ! It's noisy !

