I would like to make a mod to change the music just for fun. what file would I edit to redirect the music that plays, to different music files.
You can overwrite the music at data/music or even add more at the data/sound/constants.json
what bruno said, plus your music needs to be in .ogg files. (as far as i can see)
Nah, it is just a better file format. But there are (or there was at least) also .wav and .mp3 files
ah, good to know DISREGARD THE .OGG REQUIREMENT (why is .ogg better?)
Not sure. Maybe it is not?
I just see it everywhere. All I know it is an open format.
the internet just told me its smaller while sounding better, but its lossy so if you try to turn it into something else you will have a bad time.
Definitely use OGGs when possible. WAVs are terrible for performance - it isn’t as bad for music, but if used for short effects, they’ll cause performance hitches.
@max99x @BrunoSupremo
ok so i added music to the music folder and i added the names of the songs to sound_constants.json
but i get this error
release-843 (x64)[M]
std::exception: ‘‘MusicChangeV1’ has no alias named ‘s_m_glacern_01’ in the manifest.’
stack traceback:
[C]: ?
[C]: in function ‘play_music’
stonehearth/services/client/sound/sound_service.lua:356: in function ‘_update_music_channel’
stonehearth/services/client/sound/sound_service.lua:308: in function ‘_change_music’
stonehearth/services/client/sound/sound_service.lua:83: in function <stonehearth/services/client/sound/sound_service.lua:82>
help please
The error message mentions MusicChangeV1
, but the URIs in your image are in stonehearth:music
. Where are you specifying MusicChangeV1
?
I put them in stonehearth:music
because I don’t know how to redirect it to the mod folder.
because the address path uses “:” instead of “/” so I figured it would be easier to just put the new music in the same place as all the other music.
Those URIs are not file system paths. They are defined in a manifest that specifies the path. The modding guide describes how that works.
Can I use file system paths instead?
As best practice, we use a manifest instead of direct paths because sometimes, devs need to move stuff from folder to folder, and then we only have to update the manifest, instead of all the places in the code that reference those files. It’s good discipline.
Hi, is this mod going to be put onto the Steam Workshop?
Only if I can get it to work.
more objective answer: “sort of”
format is “/nameofmod/rest/of/the/location.json”
so “stonhearth/entities/armor/chain_mail/chain_mail.json” like stuff