Jump to content
Sign in to follow this  
ashram 1-1

Failing to make even a simple sound mod for M4A1_Aim

Recommended Posts

Hi folks, please help me - i have read through all 25 pages of sound modding 101 and many threads found in configs and scripting subforum relating to sound modding.

I shall have to give up now if someone can't put me straight but i think i am very close.

I am just trying to get it running on M4A1_Aim weapon class for now.

directory structure

SAM4\SAM4\

containing:

m4dry.wss

m4fashot.wss

m4reload.wss

m4seq01.wss

m4seq02.wss

m4seq03.wss

m4seq04.wss

m4seq05.wss

(checked and confirmed all .wss 44.1 kHz 16 bit mono)

and config.cpp

class CfgPatches
{
class SAM4
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAWeapons","CAWeapons_E" };

};
};

class Mode_SemiAuto;
class Mode_FullAuto;

class CfgWeapons
{
class Rifle;
class M4A1_Aim: Rifle
{
	drySound[] = {"\SAM4\m4dry",1,1,20};
	reloadMagazineSound[] = {"\SAM4\m4reload",1,1,20};

	class Single : Mode_SemiAuto {
		begin1[] = {"\SAM4\m4seq01", 20, 1, 900};
		begin2[] = {"\SAM4\m4seq02", 20, 1, 900};
		begin3[] = {"\SAM4\m4seq03", 20, 1, 900};
		begin4[] = {"\SAM4\m4seq04", 20, 1, 900};
		begin5[] = {"\SAM4\m4seq05", 20, 1, 900};
		soundBegin[] = {"begin1", 0.2, "begin2", 0.2, "begin3", 0.2, "begin4", 0.2, "begin5", 0.2};
	};

	class FullAuto : Mode_FullAuto{
		begin1[] = {"\SAM4\m4fashot", 20, 1, 900};
		soundBegin[] = {"begin1", 1};
	};

};
};

seems to successfully pbo on the root folder using cpbo.

then put SAM4.pbo in @SAM4\Addons in the root of my arma2 directory and added -mod=@SAM4 to shortcut parameters.

mod seems to load ok as it is listed top-right of the main screen.

testing in editor - i still get the vanilla sounds, RPT shows the following:

Version 1.60.87580

Updating base class M4A1->Rifle, by sam4\sam4\config.cpp/CfgWeapons/M4A1_Aim/

Cannot find a sound file sam4\m4reload.wss

Cannot find a sound file sam4\m4dry.wss

Something wrong in my config.cpp or with the file paths?

Why can't it find these m4reload.wss and m4dry.wss files? they are in the same directory as all the others!

Do the "Updating base class" lines in RPT indicate an error?

Supplementary question: anyone know why are the vanilla sounds are so bright? I extracted from game pbos and loaded some examples into soundforge and they sound absolutely awful - horribly overloaded top end, but in game it works out ok. Does the game apply some processing to the raw sounds like EQ/low pass filter? Sounds from other people's soundmods i checked out are not like this however. :confused_o:

Thanks very much in advance. Sam.

Share this post


Link to post
Share on other sites

Heya, I suppose the tools have taken SAM4\SAM4 as PBOPREFIX, so the sounds might have to be \SAM4\SAM4\....soundfile

For the updating base classes: http://browser.six-projects.net/cfg_weapons/M4A1_Aim/config?version=58

class M4A1;
class M4A1_Aim: M4A1 {

not

class Rifle;
class M4A1_Aim: Rifle {

Also have to take into account the inheritance of the FireModes:

http://browser.six-projects.net/configclasses/CfgWeapons>M4A1>Single/config?version=58

class Rifle;
class M4A1: Rifle {
  class Single;
  class Burst;
  class FullAuto;
};
class M4A1_Aim: M4A1 {
  class Single: Single { }; // ...
};

Edited by Sickboy

Share this post


Link to post
Share on other sites

bedankt, looks like you spotted something critical - i'll try again after a suitable pause.

i suppose trying this while off work sick might not be the best plan. my head is spinning, how much of that is flu and how much is configs is difficult to say. :-)

cheers dude.

Share this post


Link to post
Share on other sites

Nobody said this stuff is easy. Once you get your head wrapped around it though, it becomes second nature. As with a lot of things, getting the foundation work down is the hardest part.

Let us know how you get on.

Share this post


Link to post
Share on other sites

thanks Hellfire, "Nobody said this stuff is easy", roger that!

don't get me wrong, i'm not complaining, just frustrated, i turned over every resource i could find and still hit a brick wall. i thought i would start with something "simple", lol. i managed to add some custom sounds back in my counterstrike days, this is certainly on another planet.

perhaps i should have started with a thorough understanding of the classes, inheritance etc. rather than jumping in feet first... it seems i am not playing with a full deck. although i did read all of 101 and thought i was ready ;)

I took sickboy's advice and shortened the paths, also included a $PBOPREFIX$ this time. some success, in that no unfound files are reported in RPT. Also tried the changes to config - However, i still didn't get any different sounds in game.

Would you say it's necessary to binarize or ok to just pbo the folder?

Thanks for your assistance fellas, i need to take a break and read up more on some of the stuff you posted, get a grasp of the basics. Otherise I feel like i am unreasonably expecting people to "fix it for me".

I will probably start from scratch with a single sound and just try to get that working.

Meanwhile had success making a script to determine the enemy's weak flank, so I'm going to crack on with finding a concealed route.

Will post back over the weekend about this config business.

Share this post


Link to post
Share on other sites

Personally, I don't binarize stuff during development.

Don't worry about asking us for help, it's why we are here :). We all started somewhere and I feel it is only right that I pass on what I have learned.

You could try encoding your sounds in .ogg to narrow down the problem. I find that .ogg sounds better as well. Don't forget to change the file extensions in the config if you try this.

begin5[] = {"\SAM4\m4seq05", 20, 1, 900}; [b]-->[/b] begin5[] = {"\SAM4\m4seq05.ogg", 20, 1, 900};

Edited by Hellfire257

Share this post


Link to post
Share on other sites

@ Ashram - try this mate see if it works for you.

class CfgPatches
{
class SAM4
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAWeapons","CAWeapons_E" };

};
}
class Single;
class FullAuto;
class CfgWeapons
{
class M4A1;
class M4A1_Aim: M4A1
{
	drySound[] = {"\SAM4\m4dry",1,1,20};
	reloadMagazineSound[] = {"\SAM4\m4reload",1,1,20};

	class Single: Single
	{
		begin1[] = {"\SAM4\m4seq01", 20, 1, 900};
		begin2[] = {"\SAM4\m4seq02", 20, 1, 900};
		begin3[] = {"\SAM4\m4seq03", 20, 1, 900};
		begin4[] = {"\SAM4\m4seq04", 20, 1, 900};
		begin5[] = {"\SAM4\m4seq05", 20, 1, 900};
		soundBegin[] = {"begin1", 0.2, "begin2", 0.2, "begin3", 0.2, "begin4", 0.2, "begin5", 0.2};
	};
	class FullAuto: FullAuto
	{
	class FullAuto : Mode_FullAuto{
		begin1[] = {"\SAM4\m4fashot", 20, 1, 900};
		soundBegin[] = {"begin1", 1};
	};
};
};

Keep your folder structure the same and check your $PBOPREFIX$ is correct inside ie the same as the mod folder name (im presuming it will be SAM4)

If your still stuck I will make it for you and you change the file names and folder structure to suit your setup, then after you reproduce for another weapon and so on - its the best and the easiest way to learn.

Regards

Bp

Edited by Bigpickle

Share this post


Link to post
Share on other sites

thanks everyone for help and encouragement. did a lot of scripting over the weekend, long day at work, so need to take a break this evening and do something else, namely lying on the sofa :-)

i'll try out myself first with the suggestions, hopefully i can learn by fixing it. if not, that's a kind offer mr pickle.

would be nice to get this working, by hook or crook, as i just found 5 nice slightly different shots in sequence from a real M4, and want to hear if it makes an improvement in game. at least i can be sure of the authenticity of the source material. that's the idea, rather than total overhaul i'd like to make some small mods with very carefully selected and edited sounds. while configs must be overcome, i think i can already knock up some high quality sounds with 20 years music making experience... and editing on nice monitors never hurts either ;-)

On that note, If anyone needs help with an audio project, it can be pretty laborious checking and trimming samples for instance, I'm more than happy to give something back to this community in that way.

Share this post


Link to post
Share on other sites

great :) got it working,

not sure if it was the ogg or config changes in the end but i have a working template now.

seems good as a start, sharp shots with some nice dense early reflections. need to work on the tails and adding a bit of extra boom.

I'll post up a link when i'm satisfied, not sure if i am ready for 'addons complete' yet. i would like to ask others to be the judge of that.

thanks again for getting me started. much appreciated!

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  

×