OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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
-
Why would you not want to use your des ext in the first place??
-
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:
[1] Created an empty folder somewhere on my HD that I named "muzak" (the name of my addon to-be)
[2] In that folder, I made a subfolder called "music"
[3] Put a couple of .ogg songs into the music folder
[4] Created the following config.cpp in the "muzak" folder:
// 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:
- The folder is named "muzak" and in the CfgPatches there's a corresponding "class muzak".
- Note the paths to the songs: "\addon-name\sub-folder\song-name.ogg"
- The "access = ReadAndCreate" is from the BIS config.bin. Dunno if it's strictly necessary
- Actually, you don't have to have a separate "music" subfolder. If you don't, the paths in the CfgMusic will have to change accordingly, of course.
- I don't know from which version of OFP this will work (using 1.91 here), so I didn't add a "requiredVersion" property to the CfgPatches part.
Comments/additions/gotchas/fixes/others welcome!
I can see the sites now... "The 60's mod", "Grunge Rock Mod '91", "OFP Disco Mod" ;D
-
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
-
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
-
I just finished attempting this on 1.46 and music doesnt appear in pulldown menu.....any ideas?
:help:
-
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.
-
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
-
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!!!!
-
lol ya your right was thinkin that lifeless stuff came from that. glad it works for somebody guess ill keep fiddlin
-
Gee, thanks so much guys!!!! :thumbsup:
Now, how would i get SOUND files into PBO (like under voices or ananayomous (sry for misspelling)?
Thnx.