Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
Kamikadze666

Shared mission files

Recommended Posts

Hi. I'm trying to make a campaign playable as a series of MP Coop missions and one of the problems I've run into is that the campaign missions have a lot of shared files, mostly sounds (around 36mb), and I don't want to have to include these files with every single mission, since that would make the total size implode. I'm tinkering with the idea of making an addon out of these shared files so that each MP mission could access them, however I have no addon-making experience and I must be doing something wrong since it's just not working.

Here's what I'm doing:

I have a series of .ogg coupled with .lip files that I want to include in the addon, as well as stringtable.csv and config.cpp

The config.cpp currently contains only definitions of identities, sounds, and music, like this:

// SOUND EFFECTS
class CfgSounds
{
   sounds[]={};
   class res_tolk1_1
     {
           name = "res_tolk1_1";
           sound[] = {"res_tolk1_1.ogg", db+20, 1.0};
           titles[]={};
   };
   class res_tolk1_2
     {
           name = "res_tolk1_2";
           sound[] = {"res_tolk1_1.ogg", db+20, 1.0};
           titles[]={};
   };
   class res_tolk1_3
     {
           name = "res_tolk1_3";
           sound[] = {"res_tolk1_3.ogg", db+20, 1.0};
           titles[]={};
   };

.....

};

I put all these files in the same folder and make a pbo out of them (using no compression), then put the pbo in the Res/Addons folder.

In game I try to access the sounds with statements like:

player say "res_tolk1_1"

to which the game replies that the sound wasn't found.

What am I doing wrong? Is making an addon out of these files even a good idea or there's a better way to go about doing this?

Thank you for your attention.

Edited by Kamikadze666

Share this post


Link to post
Share on other sites

You need to define the full path to the sound file on the config, like this:

sound[] = {"\your_addon\res_tolk1_1.ogg"...

Share this post


Link to post
Share on other sites

Ok, I tried including the full path in the config file like suggested, it didn't seem to help.

By addon name you mean the name I assign to the .pbo file, right?

By the way the text strings in stringtable.csv are also inaccessable during the game, so it appears that the engine just doesn't register addon's presence at all :/

Edited by Kamikadze666

Share this post


Link to post
Share on other sites

Any more ideas, anyone?

Never mind, I figured it out.

Apparently config.cpp MUST contain CfgPatches class, or else the game doesn't register addon's presence at all. I didn't know that. It's working now.

Edited by Kamikadze666

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  

×