Frictional Games Forum (read-only)

Full Version: Custom Music
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So for my next mod, I wanted to use custom music for it to give it a little variety. How exactly do I do this though? I mean, make the ogg file play in my mod, because the directory for all of the music files are from the main SOMA folder. So how do I get the music to play in this mod? I'm no genius so I wouldn't know off the top of my head how to do this, but I would like to know so I can add the background music to the custom story.
Just look in the map scripts from main game soma. Almost all of them have the music script in them. There are 2 music functions I believe, 1 advanced, and 1 a little simpler. For both of them you will need to set a priority for the music, so it does not get overwritten or overwrite another track you dont want it to. Remember priorities are not numbers like in amnesia, but enums now, basically just write e_music_prio and the options should pop up.
As for where to put the music it should go into your assets folder, and you can probably also make a music folder inside that. You also have the option to just make a music folder in the main mod folder, but that feature is intended for when you want to overwrite vanilla music.

dont have my soma installed right now, so some of this info may be outdated slighty incorrect.
The ones you want predominantly are Music_Play and Music_Stop. You can also use MusicPlay_Ext For playing music with a little more control. The wiki has documentation on these and the other music-related functions, and like WALP said, you can look at the code for various SOMA levels for usage examples.

And yes, I believe the string value you put in the file parameter is the name of the music's .ogg file.
(04-26-2016, 12:19 AM)WALP Wrote: [ -> ]Just look in the map scripts from main game soma. Almost all of them have the music script in them. There are 2 music functions I believe, 1 advanced, and 1 a little simpler. For both of them you will need to set a priority for the music, so it does not get overwritten or overwrite another track you dont want it to. Remember priorities are not numbers like in amnesia, but enums now, basically just write e_music_prio and the options should pop up.
As for where to put the music it should go into your assets folder, and you can probably also make a music folder inside that. You also have the option to just make a music folder in the main mod folder, but that feature is intended for when you want to overwrite vanilla music.

dont have my soma installed right now, so some of this info may be outdated slighty incorrect.
Yeah, I think I was just confused where to put the music, because I didn't have an assets folder from copying over a previous mod folder I had. But thanks for telling me, though, I was a little uneducated about the music functions I guess.