Jump to content
Sign in to follow this  
rekrul

Want the CAS voice/radio dialog

Recommended Posts

When you call in CAS, using the SOM-module, you get a radio dialog that I want to use in my own mission (only the dialog, not the SOM-part). Anyone have any idea how I can find out what samples to play (and how, but I guess there's plenty of threads about that already).

Edit: Basically what I want is someone screaming or say half-panicked/stressed "We need air-support!" but I'll settle for the CAS dialog.

Edited by Rekrul

Share this post


Link to post
Share on other sites

why dont you just extract the sounds and put it in your mission with the desciption.ext? im not sure, but they should be in the dubbing.pbo..

btw. do you have OA and if so, are the sound dialogs playing completly for you if you order CAS? for me its bugged since OA, only half of the sounds play..

Share this post


Link to post
Share on other sites

I would I knew how. :) Basically I don't want to add the sounds in my mission so they're there twice, but I remember I did something similar with A2 where you had a radio-dialog but there I looked up on the biki what all the words were. However I can't find that again. And if there's a way to just launch the entire SOM dialog, that sounds (no pun intended) a lot easier.

I have both, but this is for OA. Actually I haven't even tested SOM yet, I just assumed it was the same as with A2.

Share this post


Link to post
Share on other sites

I found the script here: http://community.bistudio.com/wiki/kbTell but I have no idea where the different files go. The example refers to a config file, a bikb file and finally the script file. I read this: http://forums.bistudio.com/showthread.php?t=91875 and it seems like I have to learn uh... FSMing? This is just for a radio conversion (or if there's already an Ambush-sample, I just want to play it) but I want everyone to hear it.

Share this post


Link to post
Share on other sites

Well I took the hard workaround by de-PBOing the dubbing-file, extracted the .ogg files I wanted to use, defined them in description.ext, put an AI on the map and called him HQ, and then manually played off the sounds with sleep between the sideRadio commands. I do get some problems if "my guy" (the one talking on the radio, requesting CAS) gets killed though.

If anyone can help me with the smart and elegant way, that would be awesome (i.e. how to use the example in the http://community.bistudio.com/wiki/kbTell article).

Edited by Rekrul

Share this post


Link to post
Share on other sites
Well I took the hard workaround by de-PBOing the dubbing-file, extracted the .ogg files I wanted to use, defined them in description.ext, put an AI on the map and called him HQ, and then manually played off the sounds with sleep between the sideRadio commands. I do get some problems if "my guy" (the one talking on the radio, requesting CAS) gets killed though.

If anyone can help me with the smart and elegant way, that would be awesome (i.e. how to use the example in the http://community.bistudio.com/wiki/kbTell article).

I'm fiddling with bikb files and they are confusing the heck out of me, I like them as I have got it to read out the map co-ordinates of the player's position, I got on working okay using this:

(Using LDL's Addon btw, this script just calls a ac-130 to the players location & I'm not sure if I need all the stuff in the script but it looked like I needed it all after looking through BIS' huge scripts.....)

in AC130AI.sqf (called via comm's menu)

hint "script started";
BIS_SSM_HQWEST = (createGroup west) createUnit ["Logic", [10,10,1000], [], 0, "NONE"];
BIS_SSM_HQWEST setGroupId ["Headquaters", "SIX"];
BIS_SSM_HQWEST setIdentity "SSMHQ_EN";
player setGroupID ["Reaper", "One"];
_hq = BIS_SSM_HQWEST;
_rt = "Airstrike";
BIS_SSM_fnc_GetRelevantPlayersArray = 
	{
		// in _ra we collect all those players, where their BIS_SSM_VIEWDISTANCE circle intersects the BIS_SSM_SPAWNDISTANCE circle
		// create the array to deal with, by excludeing out of range players
		//_this = center of circle
		private "_ra";
		_ra = [];
		{ 
			if ( not (_this distance _x > BIS_SSM_VIEWDISTANCE+BIS_SSM_SPAWNDISTANCE) 
					and not ((_this distance _x) < BIS_SSM_SPAWNDISTANCE - BIS_SSM_VIEWDISTANCE) ) 
			then {_ra = _ra + [_x];}; 
		} foreach playableUnits;
		_ra
	};
BIS_SSM_fnc_NtoS =
{
private "_r";
_r = "";
switch (_this) do 
{	
	case 48: {_r = "zero"};
	case 49: {_r = "one"};
	case 50: {_r = "two"};
	case 51: {_r = "three"};
	case 52: {_r = "four"};
	case 53: {_r = "five"};
	case 54: {_r = "six"};
	case 55: {_r = "seven"};
	case 56: {_r = "eight"};
	case 57: {_r = "nine"};	
	case 65: {_r = "alpha"}; 
	case 66: {_r = "bravo"}; 
	case 67: {_r = "charlie"}; 
	case 68: {_r = "delta"}; 
	case 69: {_r = "echo"}; 
	case 70: {_r = "fotxtrot"}; 
	case 71: {_r = "golf"}; 
	case 72: {_r = "hotel"}; 
	case 73: {_r = "india"}; 
	case 74: {_r = "juliet"}; 
	case 75: {_r = "kilo"}; 
	case 76: {_r = "lima"}; 
	case 77: {_r = "mike"}; 
	case 78: {_r = "november"}; 
	case 79: {_r = "oscar"}; 
	case 80: {_r = "papa"}; 
	case 81: {_r = "quebec"}; 
	case 82: {_r = "romeo"}; 
	case 83: {_r = "sierra"}; 
	case 84: {_r = "tango"}; 
	case 85: {_r = "uniform"}; 
	case 86: {_r = "victor"}; 
	case 87: {_r = "whiskey"}; 
	case 88: {_r = "xray"}; 
	case 89: {_r = "yankee"}; 
	case 90: {_r = "zulu"};

	case 97: {_r = "alpha"}; 
	case 98: {_r = "bravo"}; 
	case 99: {_r = "charlie"}; 
	case 100: {_r = "delta"}; 
	case 101: {_r = "echo"}; 
	case 102: {_r = "fotxtrot"}; 
	case 103: {_r = "golf"}; 
	case 104: {_r = "hotel"}; 
	case 105: {_r = "india"}; 
	case 106: {_r = "juliet"}; 
	case 107: {_r = "kilo"}; 
	case 108: {_r = "lima"}; 
	case 109: {_r = "mike"}; 
	case 110: {_r = "november"}; 
	case 111: {_r = "oscar"}; 
	case 112: {_r = "papa"}; 
	case 113: {_r = "quebec"}; 
	case 114: {_r = "romeo"}; 
	case 115: {_r = "sierra"}; 
	case 116: {_r = "tango"}; 
	case 117: {_r = "uniform"}; 
	case 118: {_r = "victor"}; 
	case 119: {_r = "whiskey"}; 
	case 120: {_r = "xray"}; 
	case 121: {_r = "yankee"}; 
	case 122: {_r = "zulu"};		
};
_r
};
	BIS_SSM_fnc_POStoSpeechArray = 
	{
		private "_ra";
		_ra = [];
		{
			_ra=_ra+[_x call BIS_SSM_fnc_NtoS];

		} foreach toarray mapgridPosition _this;
		_ra
	};




player kbAddtopic["Airstrike", "SSMradio.bikb"];
BIS_SSM_HQWEST kbAddtopic["Airstrike", "SSMradio.bikb"];

player kbTell [_hq,_rt,_rt+"Request", ["Team",{},"Reaper",["Reaper"]],["Location",{}, mapgridposition player,player call BIS_SSM_fnc_POStoSpeechArray],true];

waitUntil {player kbWasSaid [_hq,_rt,_rt+"Request", 3]};

_mapclicks = player getVariable "LDL_Mapclicks";

if (isNil "_mapclicks") then
{
player setVariable ["LDL_Mapclicks", 0, true];
_mapclicks = 0;
};


if(!LDL_ac130_active && _mapclicks < LDL_options select 22) then
{

_pos = [ getPos player select 0, getPos player select 1, -5];
player setVariable ["LDL_Mapclicks", ((player getVariable "LDL_Mapclicks") + 1), true];
hint format ["%1 AC-130 left.", (LDL_options select 22) - (player getVariable "LDL_Mapclicks")];
BIS_SSM_HQWEST kbtell [player,"airstrike","airstrikeAccepted"];

		sleep 1;
		[_pos,LDL_options select 0,LDL_options select 1,LDL_options select 17, LDL_options select 20]call LDL_ac130_AI_setup;



}
else
{
BIS_SSM_HQWEST kbtell [player,"airstrike","airstrikeDenied"];
};

Init.sqf (nothing to do with it jst shows how to add to communication menu)

If (isNil "BIS_MENU_GroupCommunication") then {
BIS_MENU_GroupCommunication = [
	[localize "STR_SOM_COMMUNICATIONS", false]
];
};

waituntil {!isnil "BIS_MENU_GroupCommunication"};

CUSTOM_menu = [
["Menu",false],
["Call in AC-130 (Remote Control)",[2],"",-5,[["expression","nul = execvm 'ac130.sqf'"]],"1","1"],
["Call in AC-130 (Support)",[3],"",-5,[["expression","nul = execvm 'ac130AI.sqf'"]],"1","1"],
["Call in Apache Gunship",[3],"",-5,[["expression","nul = execvm 'apache.sqf'"]],"1","1"],
["Call in Helo Extraction/Reinsertion",[4],"",-5,[["expression","nul = execvm 'helo\check.sqf'"]],"1","1"]
];

_count = count BIS_MENU_GroupCommunication;
BIS_MENU_GroupCommunication set [_count, ["Support",[0],"#USER:CUSTOM_menu",-5,[["expression",""]],"1","1"]];

ssmradio.bikb (taken from depbo'd file if you know the target you could probably use the one in game)

class Sentences
{

class ArtilleryRequest // line 570 
{
	text = $STR_EP1_ARTILLERYREQUEST_1;
	speech[]={%Team,RequestingFireSupportAtGrid,%Location};
	class Arguments
	{
		class Team {type = "simple";};
		class Location {type = "simple";};
	};
};
class ArtilleryRequest0 // line 570 
{
	text = $STR_EP1_ARTILLERYREQUEST_0;
	speech[]={RequestingFireSupportAtGrid,%Location};
	class Arguments
	{
		class Location {type = "simple";};
	};
};
class ArtilleryAccepted // line 571 
{
	text = $STR_EP1_ARTILLERYACCEPTED_1;
	speech[]={FiringAtTargetLocation};
	class Arguments
	{
	};
};
class ArtilleryDenied // line 572 
{
	text = $STR_EP1_ARTILLERYDENIED_1;
	speech[]={ArtilleryNotAvailableRightNow};
	class Arguments
	{
	};
};
class MortarRequest // line 573 
{
	text = $STR_EP1_ARTILLERYREQUEST_1;
	speech[]={%Team,RequestingFireSupportAtGrid,%Location};
	class Arguments
	{
		class Team {type = "simple";};
		class Location {type = "simple";};
	};
};
class MortarRequest0 // line 573 
{
	text = $STR_EP1_ARTILLERYREQUEST_0;
	speech[]={RequestingFireSupportAtGrid,%Location};
	class Arguments
	{
		class Location {type = "simple";};
	};
};
class MortarAccepted // line 574 
{
	text = $STR_EP1_ARTILLERYACCEPTED_1;
	speech[]={FiringAtTargetLocation};
	class Arguments
	{
	};
};
class MortarDenied // line 575 
{
	text = $STR_EP1_MORTARDENIED_1;
	speech[]={NoFireMissionAvailableAtThisTime};
	class Arguments
	{
	};
};
class UnitsDropRequest0 // line 576 
{
	text = $STR_EP1_UNITSDROPREQUEST_0;
	speech[]={RequestingReinforcementsToOurPositionGrid,%Location};
	class Arguments
	{
		class Location {type = "simple";};
	};
};
class UnitsDropAccepted // line 577 
{
	text = $STR_EP1_UNITSDROPACCEPTED_1;
	speech[]={WeCanFlyInReinforcmentsAsNeeded};
	class Arguments
	{
	};
};
class UnitsDropDenied // line 578 
{
	text = $STR_EP1_UNITSDROPDENIED_1;
	speech[]={YouWillHaveToManageYourself};
	class Arguments
	{
	};
};
class AmmoDropRequest // line 579 
{
	text = $STR_EP1_AMMODROPREQUEST_1;
	speech[]={ThisIs,%Team,RequestingSupplyDropAtGrid,%Location};
	class Arguments
	{
		class Team {type = "simple";};
		class Location {type = "simple";};
	};
};
class AmmoDropRequest0 // line 579 
{
	text = $STR_EP1_AMMODROPREQUEST_0;
	speech[]={RequestingSupplyDropAtGrid,%Location};
	class Arguments
	{
		class Location {type = "simple";};
	};
};
class AmmoDropAccepted // line 580 
{
	text = $STR_EP1_AMMODROPACCEPTED_1;
	speech[]={SupportOnWayStandBy};
	class Arguments
	{
	};
};
class AmmoDropDenied // line 581 
{
	text = $STR_EP1_AMMODROPDENIED_1;
	speech[]={Negative};
	class Arguments
	{
	};
};
class AirstrikeRequest // line 582 
{
	text = $STR_EP1_AIRSTRIKEREQUEST_1;
	speech[]={%Team,RequestingCloseAirSupportAtGrid,%Location};
	class Arguments
	{
		class Team {type = "simple";};
		class Location {type = "simple";};
	};
};
class AirstrikeRequest0 // line 582 
{
	text = $STR_EP1_AIRSTRIKEREQUEST_0;
	speech[]={RequestingAirSupportAtGrid,%Location};
	class Arguments
	{
		class Location {type = "simple";};
	};
};
class AirstrikeAccepted // line 583 
{
	text = $STR_EP1_AIRSTRIKEACCEPTED_1;
	speech[]={RogerAircraftOnTheWay};
	class Arguments
	{
	};
};
class AirstrikeDenied // line 584 
{
	text = $STR_EP1_AIRSTRIKEDENIED_1;
	speech[]={NegativeOnTheCloseAirSupport};
	class Arguments
	{
	};
};
class CeaseFireRequest // line 585 
{
	text = $STR_EP1_CEASEFIREREQUEST_1;
	speech[]={CeaseFireE};
	class Arguments
	{
	};
};
class CeaseFireRequest0 // line 585 
{
	text = $STR_EP1_CEASEFIREREQUEST_1;
	speech[]={CeaseFireE};
	class Arguments
	{
	};
};
class CeaseFireAccepted // line 586 
{
	text = $STR_EP1_CEASEFIREACCEPTED_1;
	speech[]={CeaseFireInEffect};
	class Arguments
	{
	};
};
class CeaseFireDenied // line 587 
{
	text = $STR_EP1_CEASEFIREDENIED_1;
	speech[]={Negative};
	class Arguments
	{
	};
};

};

class Arguments{};
class Special {};

startWithVocal[] = {};
startWithConsonant[] = {};

Share this post


Link to post
Share on other sites

hi how did you get it to read out the position, trying to work on a dynamic transport cas gunship script with radio voiceovers. scripts work just need to find out for to read out the location of markers

Share this post


Link to post
Share on other sites

I did something similar, using Domination and that vanilla spotter script as a basis.

.bikb:

class ArtilleryRequest {
	text = "%Team, requesting %Type strike at grid %Location. %Rounds salvoes!";
	speech[] = {%Team,%Type,%Location};
	class Arguments {
		class Team {type = "simple";};
		class Type {type = "simple";};
		class Rounds {type = "simple";};
		class Location {type = "simple";};
	};
};

Functions I needed (I'm not using mapclick, but typed coordinates, that allows for 8 digit grids):

_ToGrid8 = {
private ["_pos","_posx","_posy","_array","_tmp","_str"];
_pos = _this;
_str = format ["%1",mapGridPosition _pos];
_posx = toArray format ["%1", round (((_pos select 0) % 100) / 11)] select 0;
_posy = toArray format ["%1", round (((_pos select 1) % 100) / 11)] select 0;
_array = toArray _str;
_tmp = [];
{_tmp set [count _tmp, _x]} forEach [_array select 0, _array select 1, _array select 2, _posx, _array select 3, _array select 4, _array select 5, _posy];
_str = toString _tmp;
_tmp = nil;
_posx = nil;
_posy = nil;
_str
};

_GridStringToPosition = {
private ["_input","_res","_exit","_tocheck"];
_input = _this select 0;
_res = [];
if !(typeName _input in ["STRING"]) exitWith {if(d_debug_mode) then {hintSilent "_StringToGrid: Not a string, code error!"}; _res = "Bad grid data due to code error!"; _res};
if (count toArray _input != 6 && count toArray _input != 8) exitWith {if(d_debug_mode) then {hintSilent "_StringToGrid: String not of correct size"}; _res = "Bad grid data"; _res};
_exit = false;
for "_i" from 0 to (count toArray _input) - 1 do {
	_tocheck = (toArray _input) select _i;
	if !(_tocheck in [48,49,50,51,52,53,54,55,56,57]) exitWith {_exit = true};
};
if (_exit) exitWith {if (d_debug_mode) then {hintSilent "_StringToGrid: String contained non numerals"}; _res = "Bad grid data"; _res};
if (count toArray _input == 6) then {
	_res = [
		10000 * (parseNumber toString [toArray _input select 0]) +
		1000 * (parseNumber toString [toArray _input select 1]) +
		100 * (parseNumber toString [toArray _input select 2]) + 50,
		10000 * (parseNumber toString [toArray _input select 3]) +
		1000 * (parseNumber toString [toArray _input select 4]) +
		100 * (parseNumber toString [toArray _input select 5]) + 50
	];
} else {
	_res = [
		10000 * (parseNumber toString [toArray _input select 0]) +
		1000 * (parseNumber toString [toArray _input select 1]) +
		100 * (parseNumber toString [toArray _input select 2]) +
		10 * (parseNumber toString [toArray _input select 3]) + 5,
		10000 * (parseNumber toString [toArray _input select 4]) +
		1000 * (parseNumber toString [toArray _input select 5]) +
		100 * (parseNumber toString [toArray _input select 6]) +
		10 * (parseNumber toString [toArray _input select 7]) + 5
	];
};
_res
};

The part in the artillery script that performs the kbTell:

_vocalarray = ["pause","pause","pause","grid"];
for "_i" from 0 to (count _input) - 1 do {
	_number = parseNumber (format ["%1",toString [_input select _i]]);
	_vocal = switch _number do {
		case 0: {"zero2"};
		case 1: {"one2"};
		case 2: {"two2"};
		case 3: {"three2"};
		case 4: {"four2"};
		case 5: {"five2"};
		case 6: {"six2"};
		case 7: {"seven2"};
		case 8: {"eight2"};
		case 9: {"nine2"};
		default {"zero2"};
	};
	_vocalarray set [_i+4, _vocal];
};
//	player globalChat format ["%1",_vocalarray];
_vocaltype = switch d_ari_type do {
	case "he": {["RequestingImmediateArtillerySuppressionHighExplosiveHowCopyQ"]};
	case "wp": {["RequestingImmediateCoverWithWilliePeteOver"]};
	case "smoke": {["AdjustFireAtTheTargetLocationOver","pause","pause","WithAnImmediateArtillerySuppressionRequestSmokeOver"]}; //Smoke is missing, so this is workaround
	case "flare": {["RequestingContinuousIlluminationAtTheTargetLocationHowCopyQ"]};
	case "sadarm": {["WeNeedAGuidedAntiArmorStrikeOver"]};
	case "copperhead": {["WeNeedLaserGuidedOrdnanceOver"]};
	case "dpicm": {["RequestingFireSupportFireForEffectOver"]};
	default {[]};
};
player kbTell [__speaker,d_kb_topic_side_arti,"ArtilleryRequest",
	["Team","",_firstsecondstr,[_firstsecondstr]],
	["Type","",d_ari_type,_vocaltype],
	["Rounds","",str(d_ari_salvos),[]],
	["Location","",if (count _input == 8) then {_position call _ToGrid8} else {mapGridPosition getPosASL _ari_target},_vocalarray],
	true
];

Note that some of the numbers are said very quickly, so I'm considering a fix by having each number not a string, but an array like [2,"eight",3] where the numbers means how many "pause" to put into the resulting array.

If you have a working kbTell system in already, it shouldn't be too much of a problem implementing this idea.

Edited by CarlGustaffa

Share this post


Link to post
Share on other sites

tried intergrating that but cant get it to work. i already have a marker on the groung and i want it to say the grid. gonna try to extract the bis arty function to try to get that to work

EDIT

nevermind got it working now using a different method

_lz is an invis helipad

_gridPos = mapGridPosition getPos _lz

_grid = toarray _gridPos

_1 = switch (_grid select 0) do {case 48: {"Zero"};case 49: {"One"};case 50: {"Two"};case 51: {"Three"};case 52: {"Four"};case 53: {"Five"};case 54: {"Six"};case 55: {"Seven"};case 56: {"Eight"};case 57: {"Nine"};}

_2 = switch (_grid select 1) do {case 48: {"Zero"};case 49: {"One"};case 50: {"Two"};case 51: {"Three"};case 52: {"Four"};case 53: {"Five"};case 54: {"Six"};case 55: {"Seven"};case 56: {"Eight"};case 57: {"Nine"};}

_3 = switch (_grid select 2) do {case 48: {"Zero"};case 49: {"One"};case 50: {"Two"};case 51: {"Three"};case 52: {"Four"};case 53: {"Five"};case 54: {"Six"};case 55: {"Seven"};case 56: {"Eight"};case 57: {"Nine"};}

_4 = switch (_grid select 3) do {case 48: {"Zero"};case 49: {"One"};case 50: {"Two"};case 51: {"Three"};case 52: {"Four"};case 53: {"Five"};case 54: {"Six"};case 55: {"Seven"};case 56: {"Eight"};case 57: {"Nine"};}

_5 = switch (_grid select 4) do {case 48: {"Zero"};case 49: {"One"};case 50: {"Two"};case 51: {"Three"};case 52: {"Four"};case 53: {"Five"};case 54: {"Six"};case 55: {"Seven"};case 56: {"Eight"};case 57: {"Nine"};}

_6 = switch (_grid select 5) do {case 48: {"Zero"};case 49: {"One"};case 50: {"Two"};case 51: {"Three"};case 52: {"Four"};case 53: {"Five"};case 54: {"Six"};case 55: {"Seven"};case 56: {"Eight"};case 57: {"Nine"};}

player kbTell [bIS_SSM_HQWEST,"Transport","grid",["location",{},_gridPos,[_1,_2,_3,_4,_5,_6]],true];

Edited by ozzyt109
sorted problem

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  

×