Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Adding Custom Music to your game?  (Read 8738 times)

rankalee

  • Ensign
  • *
  • Posts: 5
    • View Profile
Adding Custom Music to your game?
« on: January 07, 2013, 10:12:38 PM »

Hi guys excuse my noobish question but i tried to search but couldnt find much...

I am trying to add custom music to my game and some mods.

I did a little searching and I followed these steps below but cannot get it to work?

1/ put my newly converted .ogg files into the sounds/music folder
2/ change the code from data/config/sounds.json to put the path name of the .ogg (look at code below)

{

         
   "music":{
      "music_campaign":[
         {"file":"mymusic.ogg","source":"sounds/music/music.bin"}      #my custom music             
      ],
      "music_title":[
         {"file":"mymusic2.ogg","source":"sounds/music/music.bin"}    #my custom music
      ],
      "music_combat":[
         {"file":"battle1.ogg","source":"sounds/music/music.bin"},    #my custom music
         {"file":"battle2.ogg","source":"sounds/music/music.bin"},    #my custom music
         #{"file":"battle3.ogg","source":"sounds/music/music.bin"},    #my custom music
   ],
   },

3/ assuming it would all work as it looks so simple..  so I booted up game but there is no music is playing at all.. I even tried to remove the music.bin line from the source and no difference...

what am I doing wrong am I missing a step or something?  
« Last Edit: January 07, 2013, 10:14:50 PM by rankalee »
Logged

Romeo_One

  • Captain
  • ****
  • Posts: 393
  • "Let me do the german dance for you..."
    • View Profile
    • Rejection - The Fight for Unity
Re: Adding Custom Music to your game?
« Reply #1 on: January 07, 2013, 10:42:25 PM »

Wrong encoding maybe or does Starsector accept every encoding of the ogg file?
Logged

rankalee

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Adding Custom Music to your game?
« Reply #2 on: January 08, 2013, 12:03:07 AM »

Wrong encoding maybe or does Starsector accept every encoding of the ogg file?

no idea. I originally converted from an mp3 file to .ogg format using this site: http://media.io I am using the 128kb standard. Usually works for other games before but not here.

Logged

Psiyon

  • Admiral
  • *****
  • Posts: 772
  • Trippy
    • View Profile
Re: Adding Custom Music to your game?
« Reply #3 on: January 08, 2013, 09:38:43 AM »

You actually have to put the music files inside of music.bin, instead of just the music directory. Just copy Starsector's music.bin, remove everything from it, place your songs in it. .bin files open with WinRAR.
Logged

silentstormpt

  • Admiral
  • *****
  • Posts: 1060
    • View Profile
Re: Adding Custom Music to your game?
« Reply #4 on: January 08, 2013, 10:13:32 AM »

Or add them with a direct dir from your sound folder, for example:

Code
	"music":{
# "source" can also be a directory
"music_campaign":[
    {"file":"arispace.ogg","source":"sounds/music/"},
    {"file":"space.ogg","source":"sounds/music/"},
{"file":"orbit1.ogg","source":"sounds/music/"},
    {"file":"orbit2.ogg","source":"sounds/music/"},
{"file":"orbit3.ogg","source":"sounds/music/"},
    {"file":"orbit4.ogg","source":"sounds/music/"},
{"file":"orbit5.ogg","source":"sounds/music/"},
    {"file":"orbit6.ogg","source":"sounds/music/"},
{"file":"orbit7.ogg","source":"sounds/music/"},
    {"file":"orbit8.ogg","source":"sounds/music/"},
{"file":"orbit9.ogg","source":"sounds/music/"},
    {"file":"quasispace.ogg","source":"sounds/music/"},
    {"file":"quasispace2.ogg","source":"sounds/music/"},
{"file":"hyper.ogg","source":"sounds/music/"},
{"file":"hyper2.ogg","source":"sounds/music/"}
],

"music_title":[
{"file":"shipyard.ogg","source":"sounds/music/"},
{"file":"arilou.ogg","source":"sounds/music/"},
    {"file":"spathi.ogg","source":"sounds/music/"},
{"file":"shofixti.ogg","source":"sounds/music/"},
{"file":"chmmr.ogg","source":"sounds/music/"},
    {"file":"vux.ogg","source":"sounds/music/"},
{"file":"syreen.ogg","source":"sounds/music/"},
{"file":"yehat.ogg","source":"sounds/music/"},
    {"file":"ilwrath.ogg","source":"sounds/music/"},
{"file":"blackur.ogg","source":"sounds/music/"},
{"file":"thradd.ogg","source":"sounds/music/"},
{"file":"urquan.ogg","source":"sounds/music/"}
],
     "music_combat":[
    {"file":"battle.ogg","source":"sounds/music/"},
    {"file":"battle_mortal_melee.ogg","source":"sounds/music/"},
{"file":"kohr_ah_battle.ogg","source":"sounds/music/"}
],
Logged

Romeo_One

  • Captain
  • ****
  • Posts: 393
  • "Let me do the german dance for you..."
    • View Profile
    • Rejection - The Fight for Unity
Re: Adding Custom Music to your game?
« Reply #5 on: January 08, 2013, 10:19:55 AM »

Didn't he already try that?

Quote
...
I even tried to remove the music.bin line from the source and no difference...
...
Logged

silentstormpt

  • Admiral
  • *****
  • Posts: 1060
    • View Profile
Re: Adding Custom Music to your game?
« Reply #6 on: January 08, 2013, 10:23:39 AM »

Didn't he already try that?

Quote
...
I even tried to remove the music.bin line from the source and no difference...
...

that was a derp from my part, i can only see the files being in the wrong folder then
Logged

rankalee

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: Adding Custom Music to your game?
« Reply #7 on: January 09, 2013, 02:20:36 AM »

thanks guys,

I tried every suggestion.

Yeah, used winrar and extracted bin files and put my files in, re-binned but still no go... starting to think it is my .ogg files.  They play OK outside the game though.

I'll try converting them again. What program do you guys use to convert audio for starfarer?
Logged

Romeo_One

  • Captain
  • ****
  • Posts: 393
  • "Let me do the german dance for you..."
    • View Profile
    • Rejection - The Fight for Unity
Re: Adding Custom Music to your game?
« Reply #8 on: January 09, 2013, 02:21:58 AM »

I had a similar problem with quite some games before, it usually had something to do with the bitrate.
Not sure if this problem is present here too.
Logged

silentstormpt

  • Admiral
  • *****
  • Posts: 1060
    • View Profile
Re: Adding Custom Music to your game?
« Reply #9 on: January 09, 2013, 04:54:31 PM »

thanks guys,

I tried every suggestion.

Yeah, used winrar and extracted bin files and put my files in, re-binned but still no go... starting to think it is my .ogg files.  They play OK outside the game though.

I'll try converting them again. What program do you guys use to convert audio for starfarer?

http://audio.online-convert.com/convert-to-ogg

worked with my mod so im guessing it should be ok
Logged

Computica

  • Ensign
  • *
  • Posts: 31
    • View Profile
Re: Adding Custom Music to your game?
« Reply #10 on: January 13, 2013, 03:09:20 PM »

The Engine reads only one music mod at a time. If there are several music mods then no music will play for some reason. Also if you pack the files into a zip file you have to rename it into "music.bin" or else the game can't find the music files.

I'll be posting a space music mod in a few minutes: http://fractalsoftworks.com/forum/index.php?topic=5373.0
« Last Edit: January 13, 2013, 04:51:00 PM by Computica »
Logged