Is it possible to have a music play only in the correct biome?

My main problem is that as soon as you open the game, the sound service already loaded the default list of musics (and starts playing the menu theme). Anything added later to the .json (e.g. through manifest mixins) will not work as it is not looking at the json anymore, just into its saved list.

How do I update it? Any idea?

That’s weird, since Rayya’s Children adds its music with a mixinto too.

Are you saying that it won’t update the sound constants if your mixinto is in a deferred manifest?

In that case we might want to add a task for this. Currently it’s only based on kingdoms, not biomes, and there might be issues when using deferred load mods. :slight_frown:

Yes, this is the case.[quote=“Relyss, post:2, topic:30167”]
Currently it’s only based on kingdoms

This too.

What I did was add it to both kingdoms, so both will have the new musics. But deferred load does not work because it can’t change the already loaded sound service (the sound service starts as soon as you open the game). Deferred loading only works for things that are yet to be read from the json.

In my case, I need to wait for the world service to start, and then I can add the music if it is in the right biome (this is what the applied manifests do too). But it only works for things that are not loaded yet into the memory

1 Like

Hmm I think we had this pending in the backlog for some time already. I’ll add a note for the case of deferred mods. But this kind of thing has lower priority, unfortunately. :disappointed_relieved:

1 Like

It is ok. I’m looking for a workaround. Probably will result in modding the sound service

1 Like

This should become a higher priority as there are various issues related to deferred load manifests, most biome-dependent mixintos are pointless as of now. Farming service also loads before deferred manifests so crops cannot differ between biomes.

Sorry for bumping this old thread, but I was wondering if this issue was fixed? Can music be added for each kingdom? How do you code it into the sound_constants.json for Rayaa’s Children or Northern Alliance?
If I put this in a mod’s (different_music) manifest:
“mixintos”: {
“stonehearth:data:sound_constants”: “different_music:data:sound_constants”
and I have the sound_constants.json also in the mod folder data/sounds only adding some songs to Northern Alliance, I can’t get the newly added songs to play. I also have the new songs in the aliases section of the manifest, and referred to their alias in the sound_constants.json.

Should be possible. Just look at how rayya added its music, and do the same but with different music.

The Northern_Alliance mod is adding its music tracklist into the stonehearth data/sounds/sound_constants.json right? How do I alter the Northern_Alliance sound_constants.json just to add one song, and keep everything it already has? I need help with the code as a mod, please. I have tried to use an override or a mixinto, but it isn’t working. Maybe when the game starts the Northern_Alliance sound_constants.json adds to the stonehearth sound_constants.json first and ignores the mixinto or override that I was trying out.

Finally got it to work, in my manifest I had to use a mixinto:
“mixintos”: {
“northern_alliance/data/sounds/sound_constants.json” : “file(data/sounds/sound_constants.json)”

My mod folder has new songs, I made aliases for them, and my sound_constants.json file just added tracks to the Northern Alliance kingdom tracks.