Jump to content
Sign in to follow this  
porcelain

Making a Music Addon

Recommended Posts

Can someone please give me a step by step guide to creating a music addon? I am very new to addonmaking and the last time i tried it didn't quite work.

Share this post


Link to post
Share on other sites

Maybe I am reading your post wrong, but I am not following what you are asking?

Are you wanting to add your own music to your missions?

Or, are you wanting to replace the stock music in the games?

Or is it something else?

Share this post


Link to post
Share on other sites

Hi, hereunder (spoiler) find the config.cpp of the musics i included in my VVV mod, this config is included in a .pbo file together with the music files.

//------------------------------------------------------

//------------------------------------------------------

//------------------------------------------------------

//

//

// VVV Mod 2011

//

//

//

//

//

//------------------------------------------------------

//------------------------------------------------------

//------------------------------------------------------

// some basic defines

#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

// type scope

#define private 0

#define protected 1

#define public 2

#define WeaponNoSlot0 // dummy weapons

#define WeaponSlotPrimary1 // primary weapons

#define WeaponSlotSecondary16 // secondary weapons

#define WeaponSlotHandGun2 // HandGun

#define WeaponSlotHandGunItem32 // HandGun magazines

#define WeaponSlotItem256 // items

#define WeaponSlotBinocular4096 // binocular

#define WeaponHardMounted65536

class CfgPatches

{

class VVVMOD

{

units[] = {};

weapons[] = {};

requiredVersion = 1.75;

};

};

class CfgMusic

{

access=1;

class VVV_MUS1

{

name="VVV music 1 (Vangelis)";

sound[]={"\VVV_MUS\VVV_music1.ogg",2.0,1.0};

};

class VVV_MUS2

{

name="VVV music 2 (Ben Hur)";

sound[]={"\VVV_MUS\VVV_music2.ogg",2.0,1.0};

};

class VVV_MUS3

{

name="VVV music 3";

sound[]={"\VVV_MUS\VVV_music3.ogg",2.0,1.0};

};

class VVV_MUS4

{

name="VVV music 4 (Gladiator)";

sound[]={"\VVV_MUS\VVV_music4.ogg",2.0,1.0};

};

class VVV_MUS5

{

name="VVV music 5 (Victory)";

sound[]={"\VVV_MUS\VVV_music5.ogg",2.0,1.0};

};

class VVV_MUS6

{

name="VVV music 6 (Troy)";

sound[]={"\VVV_MUS\VVV_music6.ogg",2.0,1.0};

};

class VVV_MUS7

{

name="VVV music 7";

sound[]={"\VVV_MUS\VVV_music7.ogg",2.0,1.0};

};

class VVV_MUS8

{

name="VVV music 8";

sound[]={"\VVV_MUS\VVV_music8.ogg",2.0,1.0};

};

class VVV_MUS9

{

name="VVV music 9";

sound[]={"\VVV_MUS\VVV_music9.ogg",2.0,1.0};

};

class VVV_MUS10

{

name="VVV music 10";

sound[]={"\VVV_MUS\VVV_music10.ogg",2.0,1.0};

};

};

My musics are converted to .ogg format, but .wav works too : here's a tutorial about sounds making : http://www.ofpec.com/editors-depot/index.php?action=details&id=488&game=OFP

Share this post


Link to post
Share on other sites

Here's the config.cpp i included in the pbo along with .ogg files. It didn't work and i'm not exactly sure why

//------------------------------------------------------

//------------------------------------------------------

//------------------------------------------------------

//

//

// Hmusic Addon

//

//

//

//

//

//------------------------------------------------------

//------------------------------------------------------

//------------------------------------------------------

// some basic defines

#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

// type scope

#define private 0

#define protected 1

#define public 2

#define WeaponNoSlot0 // dummy weapons

#define WeaponSlotPrimary1 // primary weapons

#define WeaponSlotSecondary16 // secondary weapons

#define WeaponSlotHandGun2 // HandGun

#define WeaponSlotHandGunItem32 // HandGun magazines

#define WeaponSlotItem256 // items

#define WeaponSlotBinocular4096 // binocular

#define WeaponHardMounted65536

class CfgPatches

{

class VVVMOD

{

units[] = {};

weapons[] = {};

requiredVersion = 1.75;

};

};

class CfgMusic

{

access=1;

class HMUSIC1

{

name="HMUSIC(action)";

sound[]={"\Hmusic\Action.ogg",2.0,1.0};

};

class HMUSIC2

{

name="HMUSIC(Africa 3)";

sound[]={"\Hmusic\Africa 3.ogg",2.0,1.0};

};

class HMUSIC3

{

name="HMUSIC(african 1)";

sound[]={"\Hmusic\African 1.ogg",2.0,1.0};

};

class HMUSIC4

{

name="HMUSIC(african 2)";

sound[]={"\Hmusic\African 2.ogg",2.0,1.0};

};

class HMUSIC5

{

name="HMUSIC(Ambient Horns)";

sound[]={"\Hmusic\Ambient (burn girl).ogg",2.0,1.0};

};

class HMUSIC6

{

name="HMUSIC(Jazz tune)";

sound[]={"\Hmusic\American Radio Tune.ogg",2.0,1.0};

};

class HMUSIC7

{

name="HMUSIC(creepy)";

sound[]={"\Hmusic\Creepy.ogg",2.0,1.0};

};

class HMUSIC8

{

name="HMUSIC(Despair)";

sound[]={"\Hmusic\Despair Classical.ogg",2.0,1.0};

};

class HMUSIC9

{

name="HMUSIC(Drama)";

sound[]={"\Hmusic\Dramatic Classical.ogg",2.0,1.0};

};

class HMUSIC10

{

name="HMUSIC(Moody)";

sound[]={"\Hmusic\Moody Buildup.ogg",2.0,1.0};

};

class HMUSIC11

{

name="HMUSIC(North Africa)";

sound[]={"\Hmusic\North Africa.ogg",2.0,1.0};

};

class HMUSIC12

{

name="HMUSIC(Russian Dance)";

sound[]={"\Hmusic\Russian Dance.ogg",2.0,1.0};

};

class HMUSIC13

{

name="HMUSIC(Sadness)";

sound[]={"\Hmusic\Sad Classical.ogg",2.0,1.0};

};

};

Share this post


Link to post
Share on other sites

Well, first of all, please change the cfgpatch config name, this one is mine (class VVVMOD etc...). Then, try to remove the blank between the words (Sad_Classical.ogg instead of Sad Classical.ogg). Then, check that the file format is ok in the tutorial i linked (up to 44100 Khz, 16 bit, stereo).

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  

×