Jump to content
Sign in to follow this  
mossman1223

Modding custom unit voices

Recommended Posts

I'd like to set my soldier to only use sound files I specify for his voice; sounds he makes when hit, injured, communication especially (take cover, move up that sort of thing).

How would I go about setting this up? This would be in my config.cpp but I have no idea what any of the class names etc would be.

Help appreciated.

Share this post


Link to post
Share on other sites

So I figured out how to replace stuff like, gear sounds when moving, breathing, etc. I imagine I'd do the voices the same way but I still need classnames and whatnot which I don't have and can't yet find.

example:

class SoundGear
               {
                   primary[] = {
					{ "run",
					{ "sound1.wss",0.11220185,1,35 } },
{ "run",
					{ "sound2.wss",0.11220185,1,35 } },
{ "sprint",
					{ "sound3.wss",0.11220185,1,35 } },
{ "sprint",
					{ "sound4.wss",0.11220185,1,35 } },

				};

               };

Share this post


Link to post
Share on other sites

So after doing some more research I've found that making a new CfgVoice entry, using a modded RadioProtocol achieves the effect I desire.... That is, I can apply the new voice to my player profile, but I don't know how or if I can set it specifically so my units always use a defined speaker.

One other thing: When I attempt to inherit from the RadioProtocol entries as defined in dubbing_radio_f/config.bin (ex: class RadioProtocolCustom : RadioProtocolENG {}; ), I get an 'undefined base class' error (presumably because of how RadioProtocolENG is scoped...), which I fix by copy+pasting the needed base class to my config file.... all 15,000 lines. Is there a less weird way to do this? Keep in mind that I'm quite the config editing noob here.

Anyway, for those interested my code looks like this:


class RadioProtocolBase {
   //c&p'd code from RadioProtocolBase here
}

class MyRadioProtocol : RadioProtocolBase {
   //c&p'd code from RadioProtocolENG here. Note - I need to do this to mod stuff like the 'micout' words.
}

class CfgVoiceTypes {
class MyVoiceType {
	name = "$STR_A3_CfgVoiceTypes_MyVoiceType";
	voices[] = {"MyVoiceEntry"};
	preview = "MyVoiceEntry";
	alternative = "";
};
};

class CfgVoice {

class Base {
	variants[] = {0.95, 1.0, 1.05};
	voiceType = "";
	scope = private;
	directories[] = {"", ""};
	protocol = "RadioProtocolBase";
};

class MyVoice : Base {
	protocol = "MyRadioProtocol";
	identityTypes[] = {"default", "Head_USMC", "Head_USMC_CO", "Head_USMC_Camo", "Head_USMC_CO_Camo", "Head_Default", "Head_Special", "LanguageENG_F"};
};

class MyVoiceEntry : MyVoice {
	directories[] = {"\MyAddon\sound\", "\MyAddon\sound\"};
	scope = public;
};

};

Share this post


Link to post
Share on other sites

Not to pull a necro, but I too have been trying to figure out how to do this properly. Anyone?

Share this post


Link to post
Share on other sites

This also interests me as well.

That might be my next endeavor now that I've figured out how to delve into things after a bit of a hiccup on my end.

I'd like to make a "just for fun" soundpack for a few custom units.

I'll look into it and perhaps either add what I've found to this thread, or start another, might be a bit before I start into it, but I've been thinking about it for a while. I didn't know other people were also interested.

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  

×