Jump to content
Sign in to follow this  
--LKK.Burnix--

Add music into ofp

Recommended Posts

I have again my problem, my campaign is to large. 50MB without addons. I have include music into every mission.

Is it possible do make an Addon, and now I mean not Amore, wich include my music into the OFP? Like I can chose it in the Mission Editor at the effects menu.

I have unpacked in the DTA folder the music.pbo

But I find just .ogg files! And now config or anything else.

How has BIS include this?

Please help me. And please not Amore!

Share this post


Link to post
Share on other sites

i think you could compile a pbo addon file with all the .ogg musics and create a config.cpp, but i dont know what to put in the cpp

Share this post


Link to post
Share on other sites
LKK.Burnix[- @ June 27 2003,19:34)]Please help me. And please not Amore!

rock.gif

Creating a separate PBO with the music files inside will cause OFP to load the entire file when OFP starts.

And the difference between doing that and using AMORE is trivial.

Also, if you go for the custom PBO method, should you need to update the PBO (add/update and audio file, correct/change the config.cpp), the whole PBO has to be downloaded again by everyone.

Share this post


Link to post
Share on other sites

I think you don't understand.

When my campaign is done, I pack all the music files into the PBO. I only want to know how to describe the music files into OFP.

@theavonlady

Sorry, if I can understand Amore, I want use that. But.. you know what I mean wink_o.gif

Share this post


Link to post
Share on other sites
LKK.Burnix[- @ June 29 2003,01:08)]I think you don't understand.

When my campaign is done, I pack all the music files into the PBO. I only want to know how to describe the music files into OFP.

@theavonlady

Sorry, if I can understand Amore, I want use that. But.. you know what I mean wink_o.gif

Well you can use the sample AMORE config.cpp as your guideline for your campaign. Look at this page on The FAQ's AMORE section.

The definitions there are pretty much the same as they would be if you coded the definitions in a description.ext file. Obviously, you must change the directory paths pointing to your file.

Share this post


Link to post
Share on other sites

Sorry, but OFP couldn´t find my music.

I have a folder: There are my four music files, then here the config.cpp:

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

class CfgMusic

{

access=1;

class caTheme

{

name="CA 1 - Theme";

sound[]={"caTheme.ogg",1.000000,1.000000};

};

class caPeace

{

name="CA 2 - Peace";

sound[]={"caPeace.ogg",1.000000,1.000000};

};

class caOntheRun

{

name="CA 3 - On the Run";

sound[]={"caOntheRun.ogg",1.000000,1.000000};

};

class caHeavyInasion

{

name="CA 4 - Heavy Invasion";

sound[]={"caOntheRun.ogg",1.000000,1.000000};

};

};

Is that right?

And yes, it´s a PBO file, and no folder in my Addons folder.

sad_o.gif

Share this post


Link to post
Share on other sites

Does your config.cpp start with a CfgPatches section, similar to the following:

Quote[/b] ]class CfgPatches

{

class <span style='color:red'>your_unique_addon_name</span>

{

units[] = {};

weapons[] = { };

worlds[] = { };

requiredVersion = 1.00;

};

};

Share this post


Link to post
Share on other sites

No, but now I have insert this:

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

class CfgPatches

{

  class your_unique_addon_name

  {

      units[] = {};

      weapons[] = { };

      worlds[] = { };

      requiredVersion = 1.00;

  };

};

Then I made the PBO and packed this into Addons folder. But again it found no music  sad_o.gif

Here now the full config.cpp:

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

class CfgPatches

{

class ca_music

{

units[] = {};

weapons[] = { };

worlds[] = { };

requiredVersion = 1.00;

};

};

class CfgMusic

{

access=1;

class caTheme

{

name="CA 1 - Theme";

sound[]={"caTheme.ogg",1.000000,1.000000};

};

class caPeace

{

name="CA 2 - Peace";

sound[]={"caPeace.ogg",1.000000,1.000000};

};

class caOntheRun

{

name="CA 3 - On the Run";

sound[]={"caOntheRun.ogg",1.000000,1.000000};

};

class caHeavyInasion

{

name="CA 4 - Heavy Invasion";

sound[]={"caOntheRun.ogg",1.000000,1.000000};

};

};

mad_o.gif

Share this post


Link to post
Share on other sites

How are you referencing the music files in your mission.sqm or script files. Show us the code that is not working?

What is the exact text of the error message you are receiving?

Share this post


Link to post
Share on other sites

There is no error message and the config is right but it does not work. I know that problem and i have no solution. If you define a model in the same config you will see that the music now work. I meen OFP will ignore the config if you only define the CFGMusic class.

Share this post


Link to post
Share on other sites
I meen OFP will ignore the config if you only define the CFGMusic class.

Works for AMORE! smile_o.gif

Share this post


Link to post
Share on other sites

Now It looks like this:

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

{

class ca_music

{

units[] = {};

weapons[] = { };

worlds[] = { };

requiredVersion = 1.00;

};

};

class CfgMusic

{

class caTheme

{

name="CA 1 - Theme";

sound[]={\ca_music\caTheme.ogg,1.000000,1.000000};

};

class caPeace

{

name="CA 2 - Peace";

sound[]={\ca_music\caPeace.ogg,1.000000,1.000000};

};

class caOntheRun

{

name="CA 3 - On the Run";

sound[]={\ca_music\caOntheRun.ogg,1.000000,1.000000};

};

class caHeavyInasion

{

name="CA 4 - Heavy Invasion";

sound[]={\ca_music\caHeavyInvasion.ogg,1.000000,1.000000};

};

};

But it dont work...

Share this post


Link to post
Share on other sites

Just a wild guess. Maybe OFP doesn't like the spaces in the "Name" fields. Make the names the same as defined in Class.

Share this post


Link to post
Share on other sites

Coool! Now it works!

I have insert this:

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

class CfgMusic

{

tracks[]={ caTheme, caPeace, caOntheRun, xcaHeavyInasion };

Thanks for support!

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  

×