1Tac F3 Radio ACRE2 component

The main idea behind the ACRE2 radio allocator is to offer a lot of flexibility and power to the mission maker. You should be able to create just about any radio layout with it. The fundamental design is to use a large array in which you define every radio channel you want to see used, this radio channel listing will be outputted in to a briefing page (pictured below), highlighting all the channels the player should be on. You should only need to edit the settings file, found in /f/radios/acre2_settings.sqf

radios2.jpg

Firstly the languages available in the mission are specified in an array at the top.

f_radios_settings_acre2_languages = [["english","English"],["farsi","Farsi"],["greek","Greek"]];

The languages are specified as a 2 part array. In the example [“english”,“English”], the first part is the name to use in code to reference it, the second part is the display label the users see.

The following code controls the language a unit can speak, you can tweak this function to return different languages. As this is done by side rather than faction NATO and FIA by default both speak english.

f_radios_settings_acre_babel_assignment = {
 _languagesToSpeak = [];
 
 switch (side _unit) do {
    case west: { _languagesToSpeak pushBack "english";};
    case east: { _languagesToSpeak pushBack "farsi";};
    case resistance: { _languagesToSpeak pushBack "greek";};
    default { _languagesToSpeak pushBack "greek"};
 };
 
 _languagesToSpeak // return list of languages to speak.
};

The first step to do is to modify the radio channel specification.

f_radios_settings_acre2_radioChannels = [
	// Batched by Preset (First entry of every preset is condition to use the preset)
	// chn entry: NAME, DESCRIPTION, RADIO_TYPE, condition for being on the channel
	[   // 0
		{toLower (faction _unit) == "blu_f"}, //Condition for using the preset.
		["Alpha","Alpha Squad Net","ACRE_PRC343",{[_unit,"ASL","A1","A2","A3"] call f_isUnitInGroupArray}],
		["Bravo","Bravo Squad Net","ACRE_PRC343",{[_unit,"BSL","B1","B2","B3"] call f_isUnitInGroupArray}],
		["Charlie","Charlie Squad Net","ACRE_PRC343",{[_unit,"CSL","C1","C2","C3"] call f_isUnitInGroupArray}],
		["1PLT-COM","Platoon Command Net","ACRE_PRC148",{([_unit,"CO","DC","ASL","BSL","CSL"] call f_isUnitLeaderInGroupArray) or (_typeOfUnit in ["m"])}]             
	],
	[   // 1
		{side _unit == east},
		["Alpha","Alpha Squad Net","ACRE_PRC343",{[_unit,"ASL","A1","A2","A3"] call f_isUnitInGroupArray}],
		["Bravo","Bravo Squad Net","ACRE_PRC343",{[_unit,"BSL","B1","B2","B3"] call f_isUnitInGroupArray}],
		["Charlie","Charlie Squad Net","ACRE_PRC343",{[_unit,"CSL","C1","C2","C3"] call f_isUnitInGroupArray}],
		["1PLT-COM","Platoon Command Net","ACRE_PRC148",{([_unit,"CO","DC","ASL","BSL","CSL"] call f_isUnitLeaderInGroupArray) or (_typeOfUnit in ["m"])}]                 
	],
	[   // 2
		{side _unit == resistance}, 
		["Alpha","Alpha Squad Net","ACRE_PRC343",{[_unit,"ASL","A1","A2","A3"] call f_isUnitInGroupArray}],
		["Bravo","Bravo Squad Net","ACRE_PRC343",{[_unit,"BSL","B1","B2","B3"] call f_isUnitInGroupArray}],
		["Charlie","Charlie Squad Net","ACRE_PRC343",{[_unit,"CSL","C1","C2","C3"] call f_isUnitInGroupArray}],
		["1PLT-COM","Platoon Command Net","ACRE_PRC148",{([_unit,"CO","DC","ASL","BSL","CSL"] call f_isUnitLeaderInGroupArray) or (_typeOfUnit in ["m"])}]          
	],
	[   // 3
		{toLower (faction _unit) == "blu_g_f"},
		["Alpha","Alpha Squad Net","ACRE_PRC343",{[_unit,"ASL","A1","A2","A3"] call f_isUnitInGroupArray}],
		["Bravo","Bravo Squad Net","ACRE_PRC343",{[_unit,"BSL","B1","B2","B3"] call f_isUnitInGroupArray}],
		["Charlie","Charlie Squad Net","ACRE_PRC343",{[_unit,"CSL","C1","C2","C3"] call f_isUnitInGroupArray}],
		["1PLT-COM","Platoon Command Net","ACRE_PRC148",{([_unit,"CO","DC","ASL","BSL","CSL"] call f_isUnitLeaderInGroupArray) or (_typeOfUnit in ["m"])}]           
	]
];

This is the channel specification, there are 4 blocks labelled: 0, 1, 2, 3 the first line of each block is the condition for a unit to use that preset, By default: 0 is for NATO, 1 is for CSAT, 2 is for AAF, and 3 is for FIA. Each line after corresponds to a channel. Below is an example of one of these lines:

["Bravo","Bravo Squad Net","ACRE_PRC343",{[_unit,"BSL","B1","B2","B3"] call f_isUnitInGroupArray}],

It is split into several components:

  • “Bravo” - This is the channel name that will be displayed on the radio screen if it supports it. Note most radios have ~10 character limit for the name
  • “Bravo Squad Net” - This is the channel description that is shown on the briefing page, you should ideally give a little bit of information on the channel's purpose.
  • “ACRE_PRC343” - The default radio for this net, the radio channel will be programmed on to every radio that matchs the same frequencies as this radio (see radio settings). This is also the radio that will be given to the unit if you using the missing radio setting and they do not have a radio.
  • {[_unit,“BSL”,“B1”,“B2”,“B3”] call f_isUnitInGroupArray} - This is the channel condition, this condition is checked to see if the player should be on this radio channel.

The channel condition is used to determine which units and who is meant to be a radio channel, there are a few methods of distinguishing between different units typically these involve either: the unit's kit (assign gear role), the group they part of, or if they are the leader of a group or lastly if it is exact unit.

Unit Kit (F3 Assign Gear Role):

Using _typeOfUnit, here we use the classes from assignGear to test if a player should be on the radio channel.

_typeOfUnit in ["m"]

Group membership:

f_isUnitInGroupArray can be used to check if a unit belongs to one of the groups listed. The group name you should use is the Group's name from the unit's init box in the editor GrpNATO_BSL becomes “BSL”. If you are using the vanilla F3 group's and factions you should be okay the pattern is Grp_. If you are using a non-F3 standard faction in f/radios/acre2_init.sqf you need to modify the function 'f_factionNameToSimpleName' and add your custom faction so that it knows what 'faction str' to use.

[_unit,"BSL","B1","B2","B3"] call f_isUnitInGroupArray

Group leader:

f_isUnitLeaderInGroupArray is exactly the same as the above but instead of checking if they are part of the group only returns true if they are leader.

[_unit,"CO","DC","ASL","BSL","CSL"] call f_isUnitLeaderInGroupArray

Specific Unit:

Finally, if your interested in an exact unit instead of a role or group, e.g. a specific JTAC. The following checks if the unit is UnitNATO_ASL.

[_unit,"ASL"] call f_isUnitinUnitArray

Special radio channels are channels that allow communication between multiple presets. The only difference is that the first paramter e.g. [0,3] corresponds to the block numbers from the f_radios_settings_acre2_radioChanels that the channel should appear on.

f_radios_settings_acre2_special_radioChannels = [
	// Presets, channel should be accesible in, DETAILS, CONDITIONS OF BEING IN IT.
	[[0,3],"NATO n FIA","FIA and NATO Liason Net","ACRE_PRC148",{_typeOfUnit in ["co"]}]
];

Changing the radio allocation

There are two methods to giving individual units radios. First there is a manual allocator which runs first, here you can decide what radios are unit gets and any radios in _radiosToGive will be given to the unit. This is a good place to add backpack radios for specific units that should have them.

f_radios_settings_acre2_allocation = {
	_radiosToGive = [];
	_unit = _this select 0;
	_typeOfUnit = _this select 1;
 
	// Give everyone a 343.
	_radiosToGive pushBack "ACRE_PRC343";
 
 
	if (_typeOfUnit in ["co","dc","ftl","m"]) then {
		_radiosToGive pushBack "ACRE_PRC148";   
	};
	if (_typeOfUnit in ["co","dc"]) then {
	//	_radiosToGive pushBack "ACRE_PRC117F";
	};
	//_radiosToGive pushBack "ACRE_PRC148";
	//_radiosToGive pushBack "ACRE_PRC152";
	_radiosToGive // return list of radios to give.
};

After the manual allocator is run, the unit will be checked against all the channels and it the radio channel allocator will figure out if you are missing any radios, if you are missing/don't have enough radios, the allocator can be setup to get you the radios you are missing when this is setting is on (it is on by default), to disable set it to false.

f_radios_settings_giveMissingRadios = true;

It is perfectly accessible to comment out all the radios in the f_radios_settings_acre2_allocation and use just the missing radio allocator based on your channel specifications to issue radios.