Jump to content
Sign in to follow this  
Y2JON

Putting own music into game

Recommended Posts

This is driving me crazy. I've been trying to put my own music tracks into OFP but I can't seem to find where to put it or how to get it to play in game.

I have converted it to .ogg but that's as far as I've got!

Could someone please tell me how to do it.

(If it involves scripting, could someone give me the whole script as I don't know how to do it.) crazy_o.gif

EDIT: Forgot to put the word 'put' before my. Sorry

Share this post


Link to post
Share on other sites

We did search but it brought up 20 pages and none of them seemed relevant.

I am checking the tutorials now.

Thanks

(Between you and me, is it easy to do?! tounge_o.gif )

Share this post


Link to post
Share on other sites

Yes it is very easy providing you do it correctly.

RED

Share this post


Link to post
Share on other sites

I used your Tutorial, and I have done what it said but now it says it cannot find the piece of music, even though it's in the Music Folder and Mission Folder as an .ogg.

HELP!!!

crazy_o.gifmad_o.gifrock.gifsad_o.gif

Share this post


Link to post
Share on other sites

Put this in your description.ext

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMusic

     {

     tracks[]={mysong};

     class mysong

     {

     name = "My Song";

     sound[] = {\Music\mysong.ogg, db+30, 1.0};

     };

     };

Just change 'mysong' into the name of your music file. Try to keep the filename short and as one word (that might be the cause of the problem). As for the name, you can put in the track's full name.

Keep a template somewhere in your missions directory so you can just copy and paste it into any mission folder and change it as needed.

And to play the song from a script, put

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">playMusic "mysong"

Just for those who didn't know. wink_o.gif

[Gareth Gates must die]

Share this post


Link to post
Share on other sites
I used your Tutorial, and I have done what it said but now it says it cannot find the piece of music, even though it's in the Music Folder and Mission Folder as an .ogg.

HELP!!!

crazy_o.gif  mad_o.gif  rock.gif  sad_o.gif

Did you actualy make a description.ext file? if so post what you used here.

RED

Share this post


Link to post
Share on other sites

firstly, make sure your .wav file is acceptable before you convert it to .ogg.

According to Bloodmixer's tutorial on the subject...

Quote[/b] ]Music : Up to 44100 Khz, 16-bit, Stereo. Any length supported.

Speech : Up to 44100 Khz, 16-bit, Mono. Any length supported ?

Radio : Up to 44100 Khz, 16-bit, Mono. Final sound files must not exceed a certain length. I suggest using 11025 Khz since you will notice little difference in quality with 44100 Khz anyway.

Bitrate: Any bitrate seems to work, as long as it is a CONSTANT bitrate.

BIS used 128Kbps on all its sounds. They used 22050 Khz for speech and radio.

Now, go to operationflashpoint/users/yourusername/missions/ and find the mission you're working on's folder.  make a .txt file and rename it description.ext (make sure you remove the .Txt extension and replace it with the .Ext).  open the description.ext file with notepad and copy/paste the code that Skul posted.

for reference...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMusic

    {

    tracks[]={mysong};

    class mysong

    {

    name = "My Song";

    sound[] = {\Music\mysong.ogg, db+30, 1.0};

    };

    };

Replace "mysong" with the name of your .ogg file (without the .ogg extension).  Your .ogg file MUST be all one word or underscores (ie. "my_song" is good, but not "my song").

in your mission folder again make another folder called "music" and copy/paste your .ogg file into there.

now we're ready to rock and roll

if you want to activate the music with a script, use the command <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">playMusic "My_Song" (replacing "My_Song" with the NAME, not filename, of your .ogg file)

it will also be available in the effects/music dialog of a trigger

Share this post


Link to post
Share on other sites

THANKS, YOU LOT ARE A GREAT HELP.

I'm in the process of making a WW2 campaign named Operation Overlord. You play from the D-Day landings up to the German surrender. Is there any program that alows you to put it into a campaigin, apart from OFP campaign editor (campeditor)?                         smile_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×