Home   Help Search Login Register  

Author Topic: custom music in intro ?  (Read 2181 times)

0 Members and 3 Guests are viewing this topic.

Offline mr reality

  • Members
  • *
  • insert sharp object
custom music in intro ?
« on: 16 Apr 2005, 01:08:16 »
I've made my island intro and decided to add some music but i'm tired of the original OFP music because i've heard it a thousand times( havn't we all ::) ) but i can't seem to add my custom .ogg file even though i added it in the description.exe. When i play the intro in the editor the music plays but when i place the anim file in the addons folder the music is not heard and a message comes up saying music file not found. Is it not possible.
"I'd like to do more than dance with her"

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:custom music in intro ?
« Reply #1 on: 16 Apr 2005, 01:49:13 »
Did you put your music file into a folder called 'music'.....and was this folder inside your mission folder?

Make sure also that you have included the path to the music file in the class definition in your description.ext.


Planck
I know a little about a lot, and a lot about a little.

Offline mr reality

  • Members
  • *
  • insert sharp object
Re:custom music in intro ?
« Reply #2 on: 16 Apr 2005, 02:09:24 »
Everything ran fine in the editor i had the 'music' folder and the description.exe was fine. I even checked that the music was installed by looking into a trigger music list. I'll give it one more go tonight if i can keep my eyes open  :o
"I'd like to do more than dance with her"

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:custom music in intro ?
« Reply #3 on: 16 Apr 2005, 02:12:32 »
If all else fails post your description.ext.


Planck
I know a little about a lot, and a lot about a little.

Offline mr reality

  • Members
  • *
  • insert sharp object
Re:custom music in intro ?
« Reply #4 on: 16 Apr 2005, 02:30:10 »
You read my mind  :o

Quote
class CfgMusic
{
   // List of music tracks (.ogg files without the .ogg extension)
   tracks[] = {TheGreyHavens};

   // Class definition needed for each music track
   class TheGreyHavens
   {
      // Name to display in mission editor
      name = "The Grey Havens";
      // Music path, volume, pitch
      sound[] = {\music\TheGreyHavens.ogg, db + 40, 1.0};
   };
};

I'm thinking it may have something to do with the music path as it will be differant to a normal mission folder. but on the otherhand the only custom music into's iv'e seen are MODs.
« Last Edit: 16 Apr 2005, 02:34:16 by mr reality »
"I'd like to do more than dance with her"

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:custom music in intro ?
« Reply #5 on: 16 Apr 2005, 13:57:08 »
Not at all sure but, try changing the name of your folder inside your intro folder to something else.

The reason I say this is it might be looking for the track in the default Music.pbo.
Now, I was under the impression that it checked in the intro folder first before looking in the default locations, but I might be wrong.

Try changing the folder name....say 'musik'...and alter the description.ext to suit.
I doubt it would work, but, it's worth a try.

Another thing to try, which might not be terribly important, but you never know, is, put quotes around the path.
BIS used quotes in their cfgMusic section in the game config.


Like so:

sound[] = {"\music\TheGreyHavens.ogg", db + 40, 1.0};


The volume BIS used was 1.0, the same for the pitch value, for example:

sound[]={"\Music\Seventh_overdose.ogg",1.0,1.0};

You could possibly try that too. ;D

I don't know if this will be needed but if everything else fails you could alter the path to suit your mission PBO exactly:

sound[] = {"\Nameofmyintrofolder\music\TheGreyHavens.ogg", db + 40, 1.0};[/b]

Hope some of that will help.  :)

EDIT:  Another thing to check is that your music file is 16 bit Stereo 44100 hz 128kbps.



Planck
« Last Edit: 16 Apr 2005, 14:44:09 by Planck »
I know a little about a lot, and a lot about a little.

Offline mr reality

  • Members
  • *
  • insert sharp object
Re:custom music in intro ?
« Reply #6 on: 16 Apr 2005, 18:40:04 »
First off i would like to thankyou for trying to help me but alas i couldn't get it to work  :(. I think that the music track has to be in the Config file as the same message keeps popping up everytime and that message is Music Grey Havens not Found. Is there anyway i can open up the config and place my music file so i can try that. Or wherever the music files are kept.
"I'd like to do more than dance with her"

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:custom music in intro ?
« Reply #7 on: 16 Apr 2005, 19:10:22 »
If you could examine a third party island intro description.ext you might be able to work out what they did to make it work.

Standard practice for missions anyway is to have a folder inside the mission folder called Music, into which your music ogg file is placed.

You do have an intro.sqs that starts the music playing don't you?  It would have the playmusic command.....

playMusic "TheGreyHavens"

or

playMusic "thegreyhavens"


BTW It might be worth removing all capitals from the file name, I think I read somewhere that capitals in the file names can cause problems sometimes.


Planck

« Last Edit: 16 Apr 2005, 19:12:00 by Planck »
I know a little about a lot, and a lot about a little.

Offline mr reality

  • Members
  • *
  • insert sharp object
Re:custom music in intro ?
« Reply #8 on: 17 Apr 2005, 02:10:47 »
I've got all the required folders and heres a small snippet of my init.sqs

Quote
#start
titleCut ["","BLACK IN", 3]
playmusic ["thegreyhavens",0]
_camera = "camera" camCreate [4808,5941,0]
_camera cameraEffect ["internal","back"]



I've tried everything. What puzzles me is that it all works fine in the mission editor but when i place the folder in the addons folder the intro plays fine but no music  ???



"I'd like to do more than dance with her"

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:custom music in intro ?
« Reply #9 on: 17 Apr 2005, 03:03:50 »
I've come to the conclusion that description.ext files don't work in intro cutscenes.

So, what you could do is make a config.cpp file with your cfgMusic definitions in it.
Next take this file and PBO it along with your Music folder which will contain your music file.

Shove that in your addons folder and hopefully it will all work.

I think the game can't find your music, the track has not been defined because the description ext is not read.

Thats the way I see it anyway.

I might try a few experiments myself tomorrow.....emmmm I mean later today.  ::) ::)


Planck
I know a little about a lot, and a lot about a little.

Offline mr reality

  • Members
  • *
  • insert sharp object
Re:custom music in intro ?
« Reply #10 on: 17 Apr 2005, 19:17:33 »
 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D

I have succeded.....And You my friend pointed me in the right direction. I hope i havn't gone against the grain because i unpbo'd the island pbo and inserted the music folder with .ogg file inside and added the music class to the config. Now i get the music in the intro  ;D and i also get the music in the editor if i use this particular island.

I want to add my heartfelt thanks to you Planck because without your knowledge i would not of accomplished this.
"I'd like to do more than dance with her"

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:custom music in intro ?
« Reply #11 on: 17 Apr 2005, 19:53:08 »
Hehehehe......you are very welcome........Have Fun.   ;D


Planck
I know a little about a lot, and a lot about a little.