Surviving Mars

Surviving Mars

Custom Music
35 Comments
Three Headed Monkey™ 26 Nov, 2023 @ 2:50am 
Great work - thank you!
cachc5 16 May, 2022 @ 8:43am 
This mod is perfect, thank you.
ChoGGi  [author] 21 Feb, 2022 @ 11:54am 
Never? Bug the devs and they may add support?
Nep-Nep 21 Feb, 2022 @ 6:13am 
Any idea when .mp3 files will be supported?
MunitionsCarsten 25 Aug, 2021 @ 8:46am 
nice thank you:steamthumbsup:
ChoGGi  [author] 24 Aug, 2021 @ 6:41pm 
Changed the desc to hopefully be clearer.
ChoGGi  [author] 24 Aug, 2021 @ 6:38pm 
I did ask the devs for mp3 support (now that all the patents are expired), so hopefully they add it whenever the next big update comes out...
MunitionsCarsten 24 Aug, 2021 @ 6:34pm 
I misread it too :D I putted a ton of mp3 into the folder and wondered why it doesnt work...
Thanks for the mod! Its great !:steamthumbsup:
mx824 8 Mar, 2021 @ 5:15pm 
One ffmpeg -i daisy.mp3 daisy.opus and I'm in business.
mx824 8 Mar, 2021 @ 5:08pm 
lol. thanks. I misread your comment above. I thought it was just AIFF that didn't work. Have a good one sir!
ChoGGi  [author] 8 Mar, 2021 @ 3:13pm 
Well that's easy enough to figure out: daisy. mp3
mx824 8 Mar, 2021 @ 1:32pm 
ChoGGI, first I must thank you for all the SM mods you've created. It's pretty amazing to me how much you've done and the high quality. Do you have any suggestions on how I can troubleshoot (no xp writing mods and running on Linux) why Custom Music is not playing for me?

My Linux AppData directory appears to be ~/.local/share/Surviving Mars

I created a Music (capital M) directory that is readable by all
~/.local/share/Surviving Mars/Music
drwxr-xr-x 2 mx mx 4096 Mar 8 13:50 Music

put a single file in it called daisy.mp3
-rw-r--r-- 1 mx mx 4615205 Mar 8 13:50 daisy.mp3

and I hear the static when I change radio channels but daisy.mp3 does not play.

relevant log entries
Loaded mod def Custom Music...[truncated]
Loading Custom Music(id ChoGGi_CustomMusic, version 0.03-003) items from PackedMods/1411106409/
Savegame Mod Custom Music (id ChoGGi_CustomMusic, version 0.03-003)

Saw no error messages

I gratefully use and enjoy many of your other SM mods without issue
ChoGGi  [author] 12 Feb, 2021 @ 6:53pm 
No problem :)
KnightBloodking 12 Feb, 2021 @ 5:09pm 
Yes that fixed it! Thank you so much for all the help and now I know how to do it in future as well, thanks again I really appreciate the help.
ChoGGi  [author] 12 Feb, 2021 @ 6:39am 
Oh, and change
display_name = T(302535920011404, "Custom Music"),
to
display_name = T(0, "Some new title"),
ChoGGi  [author] 12 Feb, 2021 @ 6:38am 
In metadata.lua change
"id", "ChoGGi_CustomMusic",
to
"id", "ChoGGi_CustomMusic2",

in script.lua first change
if RadioStationPresets.Custom_Music_FTW then
to
if RadioStationPresets.Custom_Music_FTW2 then

then change
id = "Custom_Music_FTW",
to
id = "Custom_Music_FTW2",

lastly change
folder = "AppData/Music",
to
folder = "AppData/Music2",

and lets see if this get mangled by steam
KnightBloodking 12 Feb, 2021 @ 1:54am 
Second Comment due to character limit:

When I change the ID do I need to change it to something specific or does it not matter? The last thing I can say that if you want to, (I'm not trying to take up to much of your time) maybe you could try doing this yourself because it may be easier for you then trying to figure out what I've done wrong with my little to no knowledge on codding. Thanks again for all the help an hopefully we can fix this problem.
KnightBloodking 12 Feb, 2021 @ 1:54am 
Ok, I did that and that made progress, I can now see the second station on the screen, click on it and then listen to the music from a separate file that I just called "Music2" the problem is that when I add the copy mod only one mod will show up. So then I thought maybe if I uninstall the mod from the steam workshop and manually add 2 copies of the mod in, keep one untouched and the other change the ID, display name and folder (to place the music files in) in the script.lua However then it only showed one of the two the paradox mod editor and when I lunched the game I could not see both stations. When I was in the script.lua I noticed there was this:

"if RadioStationPresets.Custom_Music_FTW2 then return"
ChoGGi  [author] 11 Feb, 2021 @ 6:30am 
Yes, you'd also need to change that.
Not sure why items.lua is gone? Unless you saved it in the mod editor. I don't use the editor, so I don't fill out items.lua, which cause issues with the editor. Just copy the original mod, edit it in notepad (or whatever) and stay away from the mod editor.
KnightBloodking 11 Feb, 2021 @ 1:56am 
Hi again, I'm really appreciating the help but when I tried to make a second one custom radio station I did as you said and copied the file and stuck it in my profile folder>Mods, I also renamed the file to "Custom Music 2" then I changed the ID in the lua. when I tried lunching the mod it showed up in the paradox mod manager so I turned it on and opened the in game mod editor. Once in it said this message:

"Failed to load mod items from Custom Music 2 (id e5rwUqm, version 0.00-001). Error: cannot read AppData/Mods/Custom Music 2/items.lua: File Not Found"

Is there anything else I need to change? Also while I was looking in the script.lua I noticed one of the lines was this:

"folder = "AppData/Music","

Do I need to change the word Music to something different in order to keep the 2 separate custom radio stations from playing the same music?
ChoGGi  [author] 10 Feb, 2021 @ 5:11pm 
Either from
https://github.com/ChoGGi/SurvivingMars_CheatMods/tree/master/Mods%20ChoGGi
or
https://www.nexusmods.com/survivingmars/mods/77?tab=files

Stick it in your profile folder>Mods (you'll need to create the folder if you haven't used the mod editor).

profile folder: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1777493789
KnightBloodking 10 Feb, 2021 @ 4:32am 
sorry one more thing, I can't find the script.lua anywhere, where am I meant to be looking?
KnightBloodking 10 Feb, 2021 @ 4:15am 
Ok thanks again for the help.
ChoGGi  [author] 9 Feb, 2021 @ 5:41am 
Yeah, just copy the mod folder, change the id (and the title in script.lua) and have at it.
KnightBloodking 9 Feb, 2021 @ 4:24am 
Hi There I have 2 questions, my first is is it possible to change the name of the radio so it doesn't read 'Custom Music' and instead my own name that I put in? My second is is it possible to duplicate this mod so I can have a second custom radio? Thanks in advance for the help.
Jarp 27 Jan, 2021 @ 11:40am 
Ah, thanks for the assistance. I'll make sure to do that.
ChoGGi  [author] 26 Jan, 2021 @ 6:54pm 
Yep?

SM Mods don't have permission to change files on your computer, you gotta create the folder and stick files in it.
Jarp 26 Jan, 2021 @ 6:38pm 
I for some reason don't have the music folder.
ChoGGi  [author] 20 Nov, 2018 @ 9:41pm 
If you could play them in the game then yeah they'll work, if they're packed in an .hpk file (SM started doing that with mods with the DA? update), you'll need to grab a copy of hpk.exe to extract them (hope you're comfortable with cmd line).
If they're just loose opus/wav files then you can put them in %AppData%\Surviving Mars\Music and have at it.

hpk.exe: https://github.com/nickelc/hpk/releases
Mad WIzard 20 Nov, 2018 @ 8:47pm 
question on this one choggi, kind of a follow up to my other thread, the files that i have subscribed to here, can i transfer them into your custom file or is this only for personal music?
ChoGGi  [author] 2 Nov, 2018 @ 2:09pm 
You keep your music collection in opus format?
Chipper 2 Nov, 2018 @ 8:04am 
I would hate to have to copy actual files and use additional space. i just confirmed that shortcuts to the audio files dont work. oh well.
busyend 17 Sep, 2018 @ 11:15am 
An absolutely fantastic mod, thank you so much! With most mods no longer working, this breathed new life back into my game play.
ChoGGi  [author] 15 Aug, 2018 @ 5:28pm 
v0.3
Da Vinci
ChoGGi  [author] 8 Aug, 2018 @ 8:46pm 
As I said in my mod collection, ECM first then everything else.
Probably should have everything updated next weekish.