Jump to content
Sign in to follow this  
madrussian

Getting units speaking via Radio Protocol (via sideRadio command) – Quick question

Recommended Posts

 

Hi all, I managed to get sideRadio command working, could use bit of help on one very important aspect.

 

Here’s my "description.ext":

class CfgRadio
{
	sounds[] = {};
	class BUB_CloseThatDoor {
		name = "";
		sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 0.001, 1.0 };
		title	= "Close that door!";
	};
};

[Please note - For accessing game files with these radio commands (customRadio, globalRadio, groupRadio, sideRadio, vehicleRadio), I found the @ symbol (see above) to be absolutely critical, and as far as I can tell, it’s not listed in anywhere in the refs for any of these commands!]

 

Here’s my call:

Loon sideRadio "BUB_CloseThatDoor";

 

It works!  That is to say:

 

  • Loon says "Close that door!" aloud over the radio
  • A sideChat message is displayed from Loon that says “Close that door!”
  • While Loon is speaking, player hear the radio crackle (very important, so you as player can tell it’s coming over the radio) plus radio beeps.
  • This radio “message” is queued up with all the rest of the radio messages coming in. For instance, if you run the sideRadio command in a row 10 times without delay, he will say each of his messages only after the last message is complete. In the mean time, if someone else chimes in over side channel, the new guy’s message goes into the queue too, and is spoken at the appropriate time, etc. The end result is no one talks over anyone else and all messages are spoken in turn (with none being missed).  Thankfully this is exactly what I’m looking for!

 

Here’s the problem:

 

He says his phrase at full volume, which is very loud as compared to the regular radio traffic.  This makes it impossible (or at least extremely difficult) to tell that he’s suppose to be speaking over the radio.  If you really strain your ears, you can hear the radio crackle, but as mentioned it’s totally inconsistent with all the normal radio protocol being spoken, and sounds pretty much like he’s standing right besides you.  Whereas in my case, he’s halfway across the map!

 

My next thought was I simply need to reduce the volume. Makes sense, right? Well, unfortunately I can’t seem to get the volume control working, and that’s what I need help with.

 

In the reference for “description.ext”, here's what it says about CfgRadio:
 

Quote

Defines radio sentences you can play with these radio commands: customRadio, vehicleRadio, groupRadio, sideRadio, globalRadio.

 

class CfgRadio
{
    sounds[] = {};
    class RadioMsg1
    {
        // display name
        name    = "";

        // filename, volume, pitch
        sound[]    = { "\sound\filename1.ogg", db - 100, 1.0 };

        // radio caption
        title    = "I am ready for your orders.";
    };
    class RadioMsg2
    {
        name    = "";
        sound[]    = { "\sound\filename2", db - 100, 1.0 }; // .wss implied
        title    = $STR_RADIO_2;
    };
};

 

Importantly, CfgRadio classes define sound (see above) as:  [sound file path & filename, volume, pitch]

 

After some quick testing, the sound file path and pitch controls work great but I can’t seem to get the volume control working at all.

 

I'm assuming that in the example "db" is a numeric constant that must be define elsewhere.  Having no idea what "db" is, I try the shotgun approach, by defining all of these test classes in CfgRadio (again, inside my "description.ext"), all in an attempt to get my Loon to speak at different volumes:

Quote

class CfgRadio
{
    sounds[] = {};

    class Test1 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 0.001, 1.0 };
        title    = "Close that door! 1";
    };
    class Test2 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 0.01, 1.0 };
        title    = "Close that door! 2";
    };
    class Test3 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 0.1, 1.0 };
        title    = "Close that door! 3";
    };
    class Test4 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 0.5, 1.0 };
        title    = "Close that door! 4";
    };
    class Test5 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 1, 1.0 };
        title    = "Close that door! 5";
    };
    class Test6 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 1.5, 1.0 };
        title    = "Close that door! 6";
    };
    class Test7 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 2, 1.0 };
        title    = "Close that door! 7";
    };
    class Test8 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 10, 1.0 };
        title    = "Close that door! 8";
    };
    class Test9 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 100, 1.0 };
        title    = "Close that door! 9";
    };
    class Test10 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", 1000, 1.0 };
        title    = "Close that door! 10";
    };
    class Test11 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", -0.001, 1.0 };
        title    = "Close that door! 11";
    };
    class Test12 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", -0.01, 1.0 };
        title    = "Close that door! 12";
    };
    class Test13 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", -0.1, 1.0 };
        title    = "Close that door! 13";
    };
    class Test14 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", -0.5, 1.0 };
        title    = "Close that door! 14";
    };
    class Test15 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", -1, 1.0 };
        title    = "Close that door! 15";
    };
    class Test16 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", -1.5, 1.0 };
        title    = "Close that door! 16";
    };
    class Test17 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", -2, 1.0 };
        title    = "Close that door! 17";
    };
    class Test18 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", -10, 1.0 };
        title    = "Close that door! 18";
    };
    class Test19 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", -100, 1.0 };
        title    = "Close that door! 19";
    };
    class Test20 {
        name = "";
        sound[] = {"@A3\Dubbing_Radio_F\data\ENG\Male01ENG\RadioProtocolENG\Normal\100_Commands\closethatdoor.ogg", -1000, 1.0 };
        title    = "Close that door! 20";
    };
};

 

Here are my test calls (referencing Test classes 1-20 above), all attempting to affect volume:

sleep 1;

Loon sideRadio "Test1";
sleep 0.1;
Loon sideRadio "Test2";
sleep 0.1;
Loon sideRadio "Test3";
sleep 0.1;
Loon sideRadio "Test4";
sleep 0.1;
Loon sideRadio "Test5";
sleep 0.1;
Loon sideRadio "Test6";
sleep 0.1;
Loon sideRadio "Test7";
sleep 0.1;
Loon sideRadio "Test8";
sleep 0.1;
Loon sideRadio "Test9";
sleep 0.1;
Loon sideRadio "Test10";
sleep 0.1;
Loon sideRadio "Test11";
sleep 0.1;
Loon sideRadio "Test12";
sleep 0.1;
Loon sideRadio "Test13";
sleep 0.1;
Loon sideRadio "Test14";
sleep 0.1;
Loon sideRadio "Test15";
sleep 0.1;
Loon sideRadio "Test16";
sleep 0.1;
Loon sideRadio "Test17";
sleep 0.1;
Loon sideRadio "Test18";
sleep 0.1;
Loon sideRadio "Test19";
sleep 0.1;
Loon sideRadio "Test20";

Test Result:  He says all 20 lines (great!) and he uses the radio protocol (great!), but he speaks them all at exactly the same volume (bad).

 

So now I'm somewhat stumped, but probably I’m missing something trivial here.

 

Anyone know how to successfully increase or decrease the volume of phrases spoken via sideRadio?

 

Btw- I welcome any and all ideas, even simple things I may have missed.  Thanks! :smile_o:

 

Share this post


Link to post
Share on other sites
// For the volume argument
db+4 // Increases it
db+40 // Ear rape?

It also depends on the original quality / volume of the ogg file. You don't have to use db- or db+ btw, you can just do -4 or 4 instead. I think db is louder/quieter though. Can't remember exactly.

Share this post


Link to post
Share on other sites

Thanks for the reply.  I understand that one ogg file will probably be louder or quieter than another.

 

The problem is, I am trying different values for volume setting on the same ogg file, and they have no absolutely no effect on actual volume.  Rather, all sounds play at full volume.

 

Please see my 2nd "description.ext" above (which I now unspoilered, the one with 20 blue texts) and note that I'm trying all different values for volume (see blue text).  Again, none of these volume changes do anything to change actual volume of the sound when played via sideRadio.  Any idea what specifically is wrong in my "description.ext" that's preventing the volume from changing?

 

Anyone have a working example of sideRadio playing the same ogg at different volumes?

 

(Anyhow, perhaps I just found a bug.  Can someone confirm?)

 

Share this post


Link to post
Share on other sites

Try:

db+100

Maybe it is being overriden by the game since that ogg is not custom. Shouldn't do but who knows. Either that or the volume doesn't take affect with CfgRadio / sideRadio command doesn't? No idea.

Share this post


Link to post
Share on other sites

it is relative volume (to other sound sources) - you cannot modify the volume itself. for that you have to adjust the source file

 

second aspect to it is if its direct speech (volume loss over distance) or radio (always the same)

  • Like 1

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  

×