Jump to content
Sign in to follow this  
theavonlady

Custom music in an island anim not working.

Recommended Posts

I want to add a music score to the I44 Sicily Island anim cutscene I released today.

Here's my DESCRIPTION.EXT file:

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

{

tracks[] =

{

BoBTheme

};

class BoBTheme

{

name = "BoBTheme";

sound[] = {\Music\BoBTheme.ogg, db+35, 1.0};

};

};<span id='postcolor'>

Here's the script's top lines that include control of the music:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_camera = "camera" camCreate [-89784.22,7493.73,-8681.15]

_camera cameraEffect ["internal","back"]

;titleCut ["","BLACK IN",7]

0 fadeMusic 0.5

playMusic "BoBTheme"<span id='postcolor'>

When the island's anim runs, I get the message: Music BoBTheme not found. What's wrong? confused.gif

Is there some limitation in introducing custom music into island anims?

Share this post


Link to post
Share on other sites

Update: it works just fine when I run the anim mission folder in the Mission Editor but still no go when it runs as an anim on OFP's main menu. sad.gif

I see I'm not the only one with this problem:

http://www.ofpec.com/yabbse....start=0

For the record, I also tried placing the OGG file directly in the anim directory and specified either

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">sound[] = {\BoBTheme.ogg, db+35, 1.0};<span id='postcolor'>

or

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">sound[] = {BoBTheme.ogg, db+35, 1.0};<span id='postcolor'>

But neither of those worked either.

BIS? confused.gif

Share this post


Link to post
Share on other sites

I think I have found the cause. It would be nice if someone at BIS could confirm the following:

OFP does not process file description.ext when running anim island cutscene missions.

I placed several lines of garbage at the start of description.ext and there was no error message whatsoever except for the music file not being found - which is understandable if the music's definition is not processed to begin with.

BIS, is this correct? Is there a workaround? (Don't think so).

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (theavonlady @ 01 May 2003,18:33)</td></tr><tr><td id="QUOTE">It would be nice if someone at BIS could confirm<span id='postcolor'>

BIS? Yoohoo! confused.gifsad.gif

Share this post


Link to post
Share on other sites
Guest

From intro.abel\intro.sqs (from OFP\Dta\anims.pbo)

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">

;init

_camera = "camera" camCreate [9578.59,3540.29,1.66]

_camera cameraEffect ["internal","back"]

0 fadeMusic 0.2

0 fadeSound 0.05

_rnd = random 5

? _rnd > 2.5 : goto "t2"

playMusic "Track11"

goto "znova"

#t2

playMusic "Track3"

etc etc etc (camera moves......)

<span id='postcolor'>

Have a look through those sqs files. I get the feeling the instructions to play music shouldn't be in the description.ext but in the intro.wherever\blahblahblah.sqs file that contains all the camera moves. Hope that helps smile.gif

Share this post


Link to post
Share on other sites

When editing the description.ext you must click save in the editor before previewing. Otherwise changes in the description.ext isn't loaded.

A common problem that gets me everytime I am editing the file sad.gif

Hoz

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Leone @ 12 May 2003,17:23)</td></tr><tr><td id="QUOTE">Have a look through those sqs files. I get the feeling the instructions to play music shouldn't be in the description.ext but in the intro.wherever\blahblahblah.sqs file that contains all the camera moves. Hope that helps  smile.gif<span id='postcolor'>

Your feelings are wrong.

Your example shows tracks that are predefined within OFP's install (Tracknn). You do not have to define them again.

I'm referring to a music track within the mission folder. Normally this is defined as I showed you in DESCRIPTION.EXT.

However, when run as an island anim, it appears that DESCRIPTION.EXT isn't processed at all, as I can type absolute garbage therein and OFP doesn't issue any error messages.

Now where's BIS? confused.gifsmile.gif

Share this post


Link to post
Share on other sites

Have you tried defining the music as a playsound? Thats what I have used in the past.

class CfgSounds

{

sounds[] = { };

class sound1

{

name = "";

sound[] = {"\sound\space1.ogg", db+25, 1};

titles[] =

{

};

};

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (hoz @ 12 May 2003,18:37)</td></tr><tr><td id="QUOTE">Have you tried defining the music as a playsound?<span id='postcolor'>

Once again, you're missing the point. This, too, would be defined in DESCRIPTION.EXT. The problem is that DESCRIPTION.EXT is bypassed when OFP runs an island's anim cutscene.

BIS? confused.gif

Share this post


Link to post
Share on other sites

Are you using intro.sqs? I haven't played with it much, but why not launch the cutscene from the init.sqs which is loaded after the description.ext?

Edit:

I read over the weekend where someone said you needed to reload the mission after saving to read the description.ext I don't beleive this, based on my experiences smile.gif

Hoz

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (hoz @ 12 May 2003,18:43)</td></tr><tr><td id="QUOTE">Are you using intro.sqs?<span id='postcolor'>

Once again, where would the private music track be defined?

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">I read over the weekend where someone said you needed to reload the mission after saving to read the description.ext<span id='postcolor'>

This is not relevant. The files all exist already, before OFP was even started. This is not a file refresh problem.

Share this post


Link to post
Share on other sites

Maybe you found a bug when using intro.sqs?

Why not try running your cutscene from the init.sqs and remove intro.sqs, then it should load the description.ext and run the cutscene?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (hoz @ 12 May 2003,18:53)</td></tr><tr><td id="QUOTE">Maybe you found a bug when using intro.sqs?

Why not try running your cutscene from the init.sqs and remove intro.sqs, then it should load the description.ext and run the cutscene?<span id='postcolor'>

I have neither init.sqs nor intro.sqs files here.

To the best of my knowledge, they have nothing to do with DESCRIPTION.EXT processing.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (theavonlady @ 01 May 2003,17:33)</td></tr><tr><td id="QUOTE">I think I have found the cause. It would be nice if someone at BIS could confirm the following:

OFP does not process file description.ext when running anim island cutscene missions.<span id='postcolor'>

Confirmed.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suma @ 14 May 2003,17:01)</td></tr><tr><td id="QUOTE"></span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (theavonlady @ 01 May 2003,17:33)</td></tr><tr><td id="QUOTE">I think I have found the cause. It would be nice if someone at BIS could confirm the following:

OFP does not process file description.ext when running anim island cutscene missions.<span id='postcolor'>

Confirmed.<span id='postcolor'>

Do you know I've been holding my breath icon12.gif since opening this thread waiting for you to say that! crazy.gif

Is their any alternate method? confused.gif

Share this post


Link to post
Share on other sites

I found this thread thru a link in the ofp2 section wink.gif

Avon for music in config:

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

class CfgMusic

{

access=1;

class islemuse1

{

name="IsleMuse 1";

sound[]={"\i44_islename\music\musefile.ogg",1.000000,1.000000};

};

};

<span id='postcolor'>

For multiple cutscenes to be played at random (each time you go to main menu):

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

cutscenes[]={"..\ADDONS\i44_Anim\Cut1","..\ADDONS\i44_Anim\Cut2","..\ADDONS\i44_Anim\Cut3"};

<span id='postcolor'>

Cut1, cut2.. are the cutscene folder names.

If you want random cutscenes palying each time it loops in menu (as the random one is chosen when menu loads, unitl its loaded again), yo uwould need something along the lines of :

_random = random 5

? _random == 1 : goto "scene1"

? _random == 2 : goto "scene2"

#scene1

_camera = "camera" camCreate [9578.59,3540.29,1.66]

_camera cameraEffect ["internal","back"]

blahblah

#scene2

_camera = "camera" camCreate [9578.59,3540.29,1.66]

_camera cameraEffect ["internal","back"]

blahblah

Share this post


Link to post
Share on other sites

Nagual,

Thanks. You're referring to defining music and cutscenes in an island's config.cpp file, correct?

I'm trying to do this externally, that is, with an existing file whose PBO file I don't want to touch.

Share this post


Link to post
Share on other sites

Ahh, well if description.ext wont work, then only real option is make an external pbo for just the music.

The config would be like this, very simple:

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

class CfgPatches

{

class i44_music

{

units[] = {};

weapons[] = { };

worlds[] = { };

requiredVersion = 1.00;

};

};

class CfgMusic

{

access=1;

class i44_muse

{

name="i44_muse";

sound[]={"\i44_music\music\i44_muse.ogg",1.000000,1.000000};

};

};

<span id='postcolor'>

*i44_music* is the folder name, with a folder *music* inside, with *i44_muse* as the ogg file, in side the music folder.

Then just pack it with stuffpbo or makepbo, and you can use the music with your cutscene.

Share this post


Link to post
Share on other sites

Thanks Nagual. What would be an example of a CfgSounds entry to insert in the config.cpp?

Share this post


Link to post
Share on other sites

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

class CfgSounds

{

class sound1

{

name="sound1";

sound[]={"\pboname\sound\sound1.ogg",0.100000,1.000000};

titles[]={};

};

};

<span id='postcolor'>

Share this post


Link to post
Share on other sites

Also to make the sounds more accessable than through triggers and commands, add a cfgvehicles, that will lets you make sounds available in the editor under empty>sounds, so you can place the sound on the map. Eg, place some tommy guns and mg42 sounds on the map to create ambience.

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

class CfgVehicles

{

class All{};

            class Sound {};

            class battle1: Sound

{

scope=2;

sound="sound1";

displayName="Ambient - MG42";

};

};

<span id='postcolor'>

*sound1* is the name of a sound you define in cfgsounds.

Share this post


Link to post
Share on other sites

Thanks for confusing me, Nagual. tounge_o.gif Now I have more questions.

First, in the CfgVehicles example you just gave, what if I wanted to create a new class name for music and sounds that would still let me place sounds on a map? That is, I don't want a new class within EMPTY.

More questions:

What is the "class battle1: Sound" statement in your example?

What does scope=2 do?

How is displayName= different than the Name= statement in a CfgSound definition?

In earlier CfgSound examples, what does access=1 do? What is the "access" setting for and what else can it be set to?

If you want to take this offline, please PM me.

TIA. smile_o.gif

Share this post


Link to post
Share on other sites
Guest

scope=

#define private 0 //! item is never visible

#define protected 1 //! "advanced designer" switch must be activated to use it

#define public 2 //! anyone can see/use it

access=

#define ReadAndWrite 0 //! any modifications enabled

#define ReadAndCreate 1 //! only adding new class members is allowed

#define ReadOnly 2 //! no modifications enabled

#define ReadOnlyVerified 3 //! no modifications enabled, CRC test applied

smile_o.gif

Share this post


Link to post
Share on other sites

Thanks. What are the defaults for scope= and access= ?

Can anyone help with the additonal questions I have two posts up?

Share this post


Link to post
Share on other sites
Guest

There aren't any "defaults" as such....it depends on the addon or config section.

Basically any section that you can add a cfgPatches to (ie cfgVehicles) is R&W=0. cfgSurfaces is R&W=2 sad_o.gifmad_o.gif You'll have to work out what section you want to create a "patch" for, and see what the BIS-made R&W status is (check the config.bin and config.bin from O.pbo) Scope is for the mission editor (visable/not visable etc).

Make sense?

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  

×