Jump to content
johnnyboy

Config command to look up String Table value for voice commands?

Recommended Posts

I am re-using vanilla ARMA  voice commands that are language specific.  I would also like to look up and display language-specific text for these commands based on vanilla string tables.  Example of voice commands I would like to look up the string table value are:

a3\dubbing_radio_f\data\eng\male02eng\radioprotocoleng\normal\100_commands\staylow.ogg
a3\dubbing_radio_f\data\eng\male01eng\radioprotocoleng\stealth\100_commands\goprone_1.ogg
a3\dubbing_radio_f\data\eng\male01eng\radioprotocoleng\stealth\100_commands\goprone_2.ogg
a3\dubbing_radio_f_exp\data\fre\male03fre\radioprotocolfre\stealth\100_commands\onyourfeet.ogg

In the wiki for getTextRaw they show this code for getting string table value and localizing it for a vehicle name:

_text = getTextRaw (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // "$STR_ACTION_GETIN_DRIVER"
_key = _text select [1]; // "STR_ACTION_GETIN_DRIVER"
_localized = localize _key; // "Get in %1 as Driver"
_localized == getText (configFile >> "CfgVehicles" >> "Thing" >> "displayName"); // true

How do I look up string table values for voice commands?  I looked in the config viewer for the Man object and did not see anything useful.

 

Edit:  It might be as simple as figuring out a prefix like "ACTION" or "Q" below, which works for these two words:

localize "STR_ACTION_DROP_WEAPON"; // returns "Drop %1"
localize "STR_Q_NORTH"; // returns "North"

As a wild-assed guess, I tried STR_ACTION_STAYLOW, STR_COMMAND_STAYLOW, and STR_Q_STAYLOW and all return an empty string.

Share this post


Link to post
Share on other sites
_string = getTextRaw (configfile >> "RadioProtocolENG" >> "SentUnitPosDown" >> "__1_1___Prone_1" >> "text");
hint _string; // returns '$STR_A3___1_1___Prone'
copyToClipboard _string;

Hopefully this is what you were looking for. "RadioProtocol(language)" does not seem to matter when I looked.
__1_1___Prone is "Normal", __1_1___Prone_1 is "Stealth" and __1_1___Prone_2 is "Combat". They all seem to return the same, though.

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, Lacyway said:

Hopefully this is what you were looking for. "RadioProtocol(language)" does not seem to matter when I looked.

Thanks much man!  You saved me some precious time.

_string = getTextRaw (configfile >> "RadioProtocolFRE" >> "SentUnitPosDown" >> "__1_1___Prone_1" >> "text");  
hint localize _string];  // returns "%1.1 - Prone"
copyToClipboard localize _string; 

With the returned localized value of "%1.1 - Prone" I can remove the leading characters of "%1.1 - ", leaving me with the localized string of "Prone".   Perfect! 👍

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

×