OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Sgt.Zeke on 20 Apr 2003, 07:17:31

Title: Ogg Music for PBO?
Post by: Sgt.Zeke on 20 Apr 2003, 07:17:31
Ok,    a long time a go I had downloaded many music files (which are quite large) for my 'nam missions, and I was wondering if there is any way that you can pbo your ogg music so that it stays in the game, rather than to keep makin description.ext files >:(. Now I've tried to put all my music and a description.ext into a folder and then try to pbo it, but when i put it into the addons folder, is does not show up in-game. So once more to repeat the question, is there a way to take ogg files and make them into one large pbo file so that the music will stay in-game without the description.ext file in every mission ???, thanks   -Sgt.Z
Title: Re:Ogg Music for PBO?
Post by: Archangel Scream on 22 Apr 2003, 17:24:28
Why would you not want to use your des ext in the first place??
Title: Re:Ogg Music for PBO?
Post by: Killswitch on 27 Apr 2003, 21:42:00
Hot diggity! Got curious and did a test. Zeke - yes, it's indeed possible to make a .pbo addon with the songs you want available all the time without messing with mission-specific description.ext entries.

Here's what I did:


Code: [Select]
// Some defines (borrowed from BIS' own commented .cpp-files)
#define true 1
#define false 0

// type scope
// used for show entry

#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

#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

class CfgPatches {

   class muzak {
      units[] = {};
      weapons[] = {};
   };

};

class CfgMusic {
   access = ReadAndCreate;

   tracks[] = {finawar,model};

   class finawar {
      name = "I fought in a war";
      sound[] = {"\muzak\music\finawar.ogg", db+0, 1.0};
   };

   class model {
      name = "The model";
      sound[] = {"\muzak\music\themodel.ogg", db+0, 1.0};
   };
};

Then I packed all that up in a muzak.pbo addon using Amalfi's MakePBO (Avaliable here on OFPEC) and
put that muzak.pbo in the AddOns folder.

After starting OFP, the two songs ("I fought in a war" and "The model") are available in the Music part
of the effects dialog for a trigger in the mission editor.

Some notes:

Comments/additions/gotchas/fixes/others welcome!

I can see the sites now... "The 60's mod", "Grunge Rock Mod '91", "OFP Disco Mod"  ;D
Title: Re:Ogg Music for PBO?
Post by: Frosty on 29 Apr 2003, 10:58:32
I have done this for my Citizen Soldiers MOD (over at Pre-1985 addons). Over 60 minutes of authentic 1930s-1940s music.
Fully-sick, as the ethnics would say in Australia ;D
Title: Re:Ogg Music for PBO?
Post by: Sgt.Zeke on 29 Apr 2003, 23:49:46
Thank you SO much killswitch :o ;D I will go try it now and see how this works, if anything goes wrong, i'll get back to ya! Thnks again!     -Sgt.Z
Title: Re:Ogg Music for PBO?
Post by: EvilSpock on 30 Apr 2003, 23:42:59
I just finished attempting this on 1.46 and music doesnt appear in pulldown menu.....any ideas?  
                                      :help:
Title: Re:Ogg Music for PBO?
Post by: Killswitch on 01 May 2003, 03:38:51
EvilSpock, try this:

In MakePBO there's a settings page (klick "Properties").

Make sure the "Resistance PBO" is not checked and try repacking it again. Then, maybe
MakePBO will create a "1.46-compliant" addon.

Title: Re:Ogg Music for PBO?
Post by: EvilSpock on 01 May 2003, 23:45:09
Good idea but wasnt that........im sure its possible somehow since the nam Ia Trang map comes with music embedded in it somehow thats selectable from pulldown menu. Maybe i should get a hold of those guys. Interested in this since have the entire Apocalypse Now soundtrack in ogg files  :o and dont want to send the files to clients every time a mission in started
Title: Re:Ogg Music for PBO?
Post by: Sgt.Zeke on 04 May 2003, 05:54:11
Posted by: EvilSpock  Posted on: May 01, 2003, 11:45:09 PM  
Good idea but wasnt that........im sure its possible somehow since the nam Ia Trang map comes with music embedded in it somehow thats selectable from pulldown menu.
************************************************

There is music embedded in the Ia Trang map? Where did I miss this? ???  


Anyway, about the *.pbo it works great, thanks sooo much killswitch!!!!
Title: Re:Ogg Music for PBO?
Post by: EvilSpock on 04 May 2003, 20:53:41
lol ya your right was thinkin that lifeless stuff came from that. glad it works for somebody guess ill keep fiddlin
Title: Re:Ogg Music for PBO?
Post by: Sgt.Zeke on 07 May 2003, 04:34:52
Gee, thanks so much guys!!!!  :thumbsup:

Now, how would i get SOUND files into PBO (like under voices or ananayomous (sry for misspelling)?

Thnx.