Author: phronk
Author Website:

Requirements: No addons required

Version: 0.96

Short description: 'Addon-Free ArmA Radio' is a script which enhances the in-game VON by adding simple radio effects when communicating with other players, while factoring distance between the sender/receiver of the transmissions.

Date: 2020-10-30 09:43


Comments: (8)
Rating:



 







Addon-Free ArmA Radio

by
phronk


Description:
This is a script which enhances Arma's VOIP by adding radio effects when communicating with other players, while factoring weather conditions. No mods / third-party programs required. Setup is easy!
(Video & screenshots outdated)

FEATURES
No mods required. THIS IS NOT A MOD.
No third-party programs required
Script will initialize only if TFAR & ACRE2 aren't enabled
Admins/clients don't have to download anything to play your mission
Tiny file size! (44 KB)
No custom sounds; AFAR recycles Arma 3's audio files
No custom artwork; AFAR recycles Arma 3's models/textures
No custom animations; AFAR uses an animation already in Arma 3
No custom items; Players just need a radio equipped to talk on radio channels
Adds interesting depth to VOIP, which it has lacked for so long
Using VOIP will broadcast radio noise to friendlies with a radio
Radio noise gets louder based on overcast, rain, and sunOrMoon
Incapacitated players cannot speak on radio channels
Compatible with land, sea, and air vehicles
Compatible with Zeus
Compatible with Dynamic Groups system
Compatible with End Game respawn templates[community.bistudio.com]
Compatible with End Game Spectator[community.bistudio.com]
Easy to configure - AFAR\CFG.sqf
In-game radio interface also allows local customization
More information in the "ReadMe.txt"


Installation / Usage:
For usage instructions and information of how to use the Addon-Free ArmA Radio please refer to the included documentation and/or example mission.


Media:



Armaholic.com has its own Youtube channel where we will cover the Community made releases.
Subscribe to the Armaholic.com Youtube channel


Known issues:
Mouse button inputs (LMB, MMB, RMB) are not supported


To do:
Simplify script installation even more
Rewrite interface code into .SQF instead of .HPP
Expand radio interference effects
Terrain interference
Reintroduce distance factors (Once BI adds necessary command(s) to Arma)
Convert into an addon (Script version will remain supported)
Create official AFAR gitHub repository


Notes:
DONATE: https://www.paypal.me/Phronk
Donations aren't mandatory for me to produce content, but it humbles me when I see there are people who appreciate my work enough to send money my way without any other obligations.
To those who've donated, thank you!


License / Disclaimer:
As author of this script, I grant permission to all scripters/mission designers to modify this mission to their liking for PERSONAL USE.
This includes granted permission to individuals and ArmA groups to host a mission using the script on a server. HOWEVER, I DO NOT consent publishing ANY VERSION of the script as their own.

If you've made major changes to the script and wish to publish it, PLEASE CONTACT ME FIRST FOR PERMISSION TO BE GRANTED!


Credits & Thanks:
CREDITS
Phronk: Script Creator
Bohemia Interactive: Radio audio, models, textures, and animation

CONTRIBUTIONS
DirtySanchez reorganized AFAR and improved security
Metalman [EXP] helped optimize code initialization

TESTERS
BadBenson
BruceAlmightyy
Chaser
Kargi8499
Limey
MorpheousMike
PRYMSUSPEC
Sjakal
Statsbacktozero
TASK FORCE RONIN


Changelog: (30-10-2020 - updated as it happens, displayed in news once every week)
0.96
Added: Reintroduced distance factors!
Added: Opening radio UI will fix broken eventHandler variables, if detected
Added: Player is given an "itemRadio" upon init
Added: Icons to screen on radio representing current channel permissions
Added: Icon to screen on radio representing signal strength
Added: Icon to screen on radio representing battery (Cosmetic)
Added: "PT" and "FM" text to bottom of radio screen (Cosmetic)
Added: Modified sound effect for cycling channels on radio
Added: Upon init, player is notified to raise their VON volume if it's below 50%
Added: Speech volume is set to 100% upon init (Unsure if it even does anything)
Added: Mouse cursor is moved to center of screen when radio interface is opened
Added: Dropping your radio will stop radio noise from playing
Added: Briefing includes info about radio ranges
Changed: Radio noise no longer changes by distance, time of day, or weather
Changed: Repositioned the cycle channels button to the correct knob on radio
Changed: Font of radio text to "LCD14", instead of "LucidiaConsoleB"
Improved: JIP Compatibility
Improved: Arma Radio Instructions Manual fits briefing window slightly better
Improved: Admin is muted globally if speaking in Global channel and cant breathe
Improved: AFAR initializes much faster now
Improved: Clicking buttons/knobs on the radio UI is much more responsive
Merged: "fuzz2.sqf" with "fuzz.sqf"
Merged: "Next Channel" and "Previous Channel" radio UI buttons into one
Merged: r_mCHName and r_mCHShort into one global variable
Tweaked: Increased volume of all radio effects
Tweaked: Height and width of text in radio UI to fit in the radio screen better
Tweaked: Ear icon in the AFAR Information briefing is now smaller to fit better
Tweaked: Help text pop-up when opening radio is now aligned to the right
Tweaked: Adjusted the order some code is executed in all of the "in" functions
Fixed: Old Arma VON bug which would block a specific player from being audible
Fixed: "r_f" global variable is reset more reliably on death now
Fixed: Side channel did not process PushToTalk functions properly
Fixed: Cycling channels via keybinds when chOn is true now works properly
Fixed; Functions would break if default setting for r_incap was changed
Fixed: Parameters weren't always being passed to "out2.sqf"
Fixed: Potential script error in "out2.sqf"
Fixed: East faction's RTO channel wasn't using custom variables from "CFG.sqf"
Fixed: Custom channel displays correct text in radio UI, instead of "SUPPORT"
Fixed: Detection of whether player could or couldn't breathe underwater
Fixed: Radio UI and channel switching wasn't fully supported in Zeus
Fixed: Handling of r_incap and r_sideCH variables
Fixed: "Show Chat" option now toggles chat visibility instead of radio messages
Fixed: Arma Radio's Instruction Manual didn't always initialize for JIP
Fixed: Exiting a vehicle would switch you to Group channel
Fixed: Exploit that allowed players to switch channels while in the Escape menu
Optimized: Collection of players in group for 'G_In.sqf' (31% faster)
Optimized: Collection of leaders for 'C_In.sqf' (10% faster)
Optimized: Check if player is in a vehicle for 'V_In.sqf' (10% faster)
Optimized: Removed some extra channel checking code from the next/prev functions
Optimized: Removed excess parenthesis in 'fuzz.sqf'
Optimized: Removed redundant placeholder variable from "Killed" eventHandler
Optimized: Removed redundant font changes in radio interface code
Optimized: Replaced apply with forEach (5% faster)
Optimized: Replaced code for playing more static during rain with simpler code
Optimized: Replaced preprocessFile with loadFile when intializing some scripts
Optimized: Replaced !isServer with didJIP in headless client check
Optimized: Replaced hasInterface&&isNull player with didJIP
Removed: "Next Channel" button from the radio UI
Removed: "Previous Channel" button from the radio UI
Removed: "Put away radio" button from the radio UI
Removed: "fuzz2.sqf"
Removed: "snd.sqf"
Removed: Rain, overcast, and sun interference factors
Removed: All variations of radio noise effects from "SFX.hpp" (Only 1 is used)
Removed: All comments from scripts, except from "init.sqf" and "CFG.sqf"
KNOWN BUGS:
Displays other than 46 and 312 will pause AFAR eventHandlers until it exits

0.95
Added: Allies channel for INDEP to talk directly with Blufor/Opfor, if allied
Added: Option to allow players to use radio while incapacitated
Added: Mouse button inputs now block PushToTalk keybinds
Added: Text advising player to equip a radio, if trying to talk without one
Tweaked: "fuzz.sqf" & "fuzz2.sqf" now takes incapacitation into consideration
Tweaked: Replaced name with getPlayerUID in fuzz functions and "out.sqf"
Fixed: Code didn't block talking in radio channels without a radio equipped
Fixed: Radio UI would pop-up from channel switch keys, when r_chOn is enabled
Fixed: Issues when multiple players connected with the same name
Fixed: Script error upon being killed, due to invalid argument with "r_out2"
Fixed: Possible script error due to inconsistent disabling of Spectator channel
Optimized: N/A
Removed: Text pop-up when pressing channel switch keybinds
KNOWN BUGS:
High ping players, server, or desync can cause effect delays

0.94b
Added: Admins will be forced into Direct channel, if they talk in Global channel
Changed: Clicking the "Mode" button in the radio UI toggles the options menu
Improved: Talking in RTO channel without meeting parameters disables itself
Improved: Efficiency of code for all "in" and "out" scripts
Improved: Radio options within radio UI are now color-coded
Tweaked: CurrentChannel parameter is now passed to "out2.sqf"
Tweaked: "_p" is now a private variable
Tweaked: "_seat" is now a private variable
Fixed: Script error related to storing display 46 as global variable "r_dis"
Fixed: Script errors related to script path typos
Fixed: Client-side RPT errors related to missing ; and } in UI code
Fixed: Script / RPT error from talking on radio while no friendly players on
Fixed: Abrupt ending of transmissions should transmit more reliably now
Fixed: Side channel was using the RTO channel's permission in some cases
Fixed: Talking in the RTO channel while incapacitated would broadcast a squelch
Fixed: Clicking "Mode" button on radio interface would duplicate buttons
Optimized: Talking in radio channels without players to receive won't alert AI
Optimized: Trimmed unnecessary code from "G_in.sqf"
Optimized: Replaced toUpper with toUpperANSI in the AFAR "init.sqf"
Removed: Removed "r_dis" global variable
Removed "V_in.sqf" no longer calls "r_out2"
Removed: Redundant isAbleToBreathe check in some "in" scripts
Replaced: Redundant "_hasBP" local variable in 'M_in.sqf'
KNOWN BUGS:
Mouse button inputs (LMB, MMB, RMB) are not supported

0.94a
Added: "r_RTOBP" global variable to 'CFG.sqf' (Add backpacks to RTO check)
Tweaked: Attempting to open radio UI while it is already opened will close it
Fixed: eventHandlers and "r_dn_" wouldn't reset upon respawn
Fixed: After respawn, unable to switch radio channels via radio interface
Fixed: Radio text showed "true" instead of actual current radio channel
Fixed: Talking in Spectator channel would break PushToTalk eventHandlers
Fixed: Potential script error related to undefined "r_up_" global variable
Optimized: Removed more unnecessary semi-colons
Removed: Suspended code from Respawn eventHandler

0.94
Added: waitUntil in beginning of code init for JIP compatibility
Added: Support for CUP radio backpacks
Added: Side channel support (Optional, disabled by default)
Added: "r_sideCH" global variable to 'CFG.sqf'
Added: "r_mCH" global variable to 'CFG.sqf' (Used for modified "Air Channel")
Added: New function 'hasRadio.sqf' which checks player if they have a radio
Added: If "r_chOn" = FALSE, using cycle channel keybind will open radio UI
Added: Radio interface shows which channel you are currently in
Added: Player is given a radio upon connecting, if no radio equipped
Improved: AFAR briefing information
Changed: Channel switching keybinds are disabled by default
Tweaked: Script no longer initializes on headless clients
Tweaked: "r_CH" global variable is now a publicVariable
Tweaked: "dn.sqf"/"up.sqf" do some basic checks, instead of each channel script
Tweaked: "Air Channel" refers to the new "r_mCH" variable, instead of "r_sCH"
Tweaked: Arma Radio briefing shows info corresponding with 'CFG.sqf' variables
Tweaked: Default "Air Channel" in 'CFG.sqf' is now "Air channel"
Fixed: JIP issues related to player and "r_p" variable
Fixed: Zeus eventHandlers caused leak, gradually degrading FPS
Fixed: Typo in 'S_In.sqf' ("_ap" should now be "_p")
Fixed: "_p" variable was undefined in some scopes
Fixed: All caps TRUE/FALSE values in 'CFG.sqf' are now lower-case
Fixed: Script error related to serialization of "r_dis" variable
Fixed: Script error related to improper admin check
Fixed: 'out2.sqf' was still referencing the outdated "RTO" unitTrait
Fixed: 'noCHS.sqf'
Fixed: 'prevCH.sqf' / 'nextCH.sqf' could switch to own channel
Optimized: Merged check for "ItemRadio" / radio backpack into a small function
Optimized: Method custom radio channels' variables are made into publicVariables
Optimized: Removed many unnecessary semi-colons
Removed: "r_RTO" global variable (Add radio backpack to unit for RTO capability)
Removed: Redundant params["_c"] from 'out2.sqf'
Removed: Redundant exitWith code at beginning of 'sOut.sqf'

0.93
Added: Zeus compatibility
Added: 'r_sCHName' global variable to 'CFG.sqf'
Added: 'r_sCHShort' global variable to 'CFG.sqf'
Changed: Air channel checks for radio backpack, instead of variable/ItemRadio
Changed: r_RTO variable simply adds RTO backpack to player unit on connect
Tweaked: Scripts check for "ItemRadio" or RTO backback equipped
Tweaked: ArmA Radio briefing is visible in map briefing prior to mission start
Tweaked: ArmA Radio briefing also uses custom name for "Air Channel" if set
Tweaked: Air channel's name can be changed via "r_sCHName" in 'CFG.sqf'
Tweaked: Air channel's text by player name can be changed via "r_sCHName" in 'CFG.sqf'

Fixed: Code only executed for channel you had selected, ignoring keybinds
Fixed: Missing ; and } in 'anim.sqf' (Radio Animation)
Fixed: Command channel sender didn't hear his radio squelch in
Fixed: Undefined variable 'ch9' script error, if Spectator template not used
Fixed: Script error in AFAR "Put" and "Take" eventHandlers
Fixed: Serialization script error on script init
Fixed: Channels stay off until respawn if you talk underwater without rebreather
Fixed: Typo in ArmA Radio briefing
Optimized: Replaced execVM with 'compileFinal(preprocessFile"")'
Optimized: Replaced '_dik' with _this in 'noCHS.sqf'
Optimized: 'noCHS.sqf'
Optimized: VON blocker code is called only when pressing the VON keybind
Optimized: Removed redundant code from VON blocker code
Optimized: Removed a redundant alive check in 'g_out.sqf'
Optimized: Removed some redundant publicVariables
Optimized: Removed redundant player==player check in script init
Removed: "RTO" unitTrait variable
Removed: Removed global/publicVariables "ch#Name"
Removed: Unused placeholder code for terrain interference
Removed: 'noVON.sqf'
KNOWN BUGS:
Mouse button inputs (LMB, MMB, RMB) are not supported

0.92
Added: "PlayerViewChanged" missionEventHandler for unit switch compatibility
Tweaked: Increased squelch volume from +7 db to +10 db
Tweaked: Radio squelch-out sound is played, if radio static present
Tweaked: 'r_CH' is defined in the AFAR init, instead of 'CFG.sqf'
Fixed: 'c_out.sqf' was referring to _x in remoteExec'd code, instead of 'r_p'
Fixed: 'c_out.sqf' was adding radio noise, instead of squelching out
Fixed: 'c_out.sqf' had an undefined '_p' variable in an "else" scope
Fixed: Persistent radio static if forced into Direct channel while transmitting
Fixed: Persistent radio static if killed while transmitting
Fixed: Corrected a code syntax in 'g_in.sqf'
Fixed: Spectator & Air channel didn't properly reset upon death/respawn (Again)
Fixed: Pop-up radio is hidden when player releases talk key in Direct channel
Fixed: Undefined variable 'ch9' script error, if Spectator respawn template not used
Optimized: Shortened script name of 'useRadio.sqf' to 'ui.sqf'
Optimized: Removed displayEventHandler's global variable 'r_myRadio'
Optimized: Removed displayEventHandler's global variable 'blockVON'
Removed: Some comments from 'AFAR\f\init.sqf'

0.91
Added: Reload eventHandler; workaround to fix the AFAR reload bug
Added: EventHandler which blocks NextChannel/PrevChannel keybinds
Added: Setting in 'CFG.sqf which can block nextChannel/prevChannel keybinds
Added: 'out2.sqf' : Disables current channel before setting to another channel
Added: Code exits if speaking in Global, Side, or Spectator channel
Tweaked: Enabled radio animation by default
Tweaked: Comments in 'AFAR\f\init.sqf'
Tweaked: Functions are initialized within a forEach, instead of count
Fixed: Transmitting while reloading played radio animation & deleted magazine
Fixed: Pressing any key while transmitting would re-squelch radio
Fixed: r_p variable wasn't properly reset after respawning
Fixed: Script errors & persistent static related to 's_in.sqf'
Fixed: Script error related to non-existent Spectator channel on init
Fixed: Spectator Channel wouldn't properly reset after respawning
Fixed: Direct Channel wouldn't properly reset after respawning
Fixed: Air Channel wouldn't properly reset after respawning
Fixed: Vehicle channel didn't have a squelch "in" sound
Fixed: Vehicle channel is no longer disabled by default in 'CFG.sqf'
Fixed: Wrong custom channel variables referenced
Fixed: Missing fragmented bracket in 'anim.sqf'
Fixed: Typo in 'g_in.sqf'
Optimized: Replaced keyDown/keyUp eventHandlers with 2 to handle all channels
Optimized: disableSerialization command added to 'opt.sqf'
Optimized: Removed some unneeded semicolons in short code blocks
Optimized: Air Channel references in 'prevCH.sqf' and 'nextCH.sqf'
Optimized: Removed unnecessary '_useState' variable/check in code init
Optimized: Removed redundant locality declaration for function global variables
Optimized: Incorporated more of the 'r_p' player variable throughout the scripts
Optimized: Air Channel only checks if pushToTalk keybind is being pressed
Optimized: _ch6, _ch7, _ch8 referenced in 'nextCH.sqf' switch structure
Optimized: Removed currentChannel check from each radio in/out function
Optimized: Removed redundant disableSerialization command from '3DLR.sqf'
Optimized: Removed redundant waitUntil code in called functions
Replaced: inputAction command with actionKeys
Removed: KeyDown/KeyUp eventHandlers for each individual channel
Removed: Support for the "PushToTalkSide" keybinding
Removed: 0 and 1 from 'r_CH' in 'CFG.sqf'
Removed: Unused r_s variable
Removed: CfgRemoteExec code from 'description.ext' to avoid confusion

0.9
ADDITIONS:
• Added: r_RTOs variable to 'CFG.sqf': list of RTO units
• Added: '3DLR.sqf' script to handle pop-up radio
• Added: 'opt.sqf' for new options UI
• Added: Adjustable local script settings in radio UI
• Added: 2 more radio noise sound effects pulled from Arma 3 to add variety
• Added: 20 more variations of radio noise for weather/day conditions
• Added: Global variable 'r_noiz' which stores array of radio noise object(s)
• Added: 'titles.hpp' for pop-up radio interface
• Added: 'snd.sqf' to handle rain interference
• Added: 'opt.sqf' to handle client-side in-game options interface
• Added: RscTitles reference required in Description.ext
• Added: Metalman10 [EXP] to credits for helping optimize code initialization
ADJUSTMENTS:
• Updated: AFAR Instructions Manual in map briefing
• Updated: readMe.txt
• Changed: Pop-up radio when transmitting is now coded as an interface
• Changed: Radio noise intensity increases based on overcast - WIP
• Changed: Radio noise intensity increases based on rain
• Changed: Radio noise intensity increases based on sunOrMoon
• Changed: Vehicle channel no longer broadcasts radio noise
• Changed: Rewrote how radio noise is handled / deleted
• Changed: Renamed "Support Channel" to "Air Channel"
• Changed: Players with "RTO" trait have access to "Air" channel
• Changed: Players in pilot, copilot, or gunner seat get access to "Air" channel
• Changed: Replaced 'incapacitatedState' command with 'lifeState' command
• Reverted: Players can no longer become an RTO by having 2+ radios
• Tweaked: Replaced useless '_x' param in remoteExec with player name
• Tweaked: Improved compatibility with customized radio channel permissions
• Tweaked: Improved compatibility with disabled Vehicle channel (r_vCH)
• Tweaked: Improved readability of titleText pop-up when opening radio UI
• Tweaked: Capitalized all letters in "GUNNER" string, in 'anim.sqf'
FIXES:
• Fixed: Undefined variable "RTO"
• Fixed: Passengers of vehicles without the RTO trait would get Support channel
• Fixed: Player would detect himself when transmitting
• Fixed: Script errors related to enableChannel using bool value, instead of array
• Fixed: Non-default channel permissions weren't taken into consideration
• Fixed: Radio noise can only be deleted by the sender ending transmit
• Fixed: AFAR no longer interferes with hints from mission/mods
• Fixed: Channel(s) would vanish if no other players available to receive message
• Fixed: Persistent static bug, related to talking on radio while incapacitated
• Fixed: If player spawns without a radio, player would hot-mic
OPTIMIZATIONS:
• Optimized: Pop-up radio no longer uses attachTo
• Optimized: Radio noise no longer uses attachTo
• Optimized: Removed conditional checks in 'useRadio.sqf'
• Optimized: Removed distance checks
• Optimized: Removed alive checks
• Optimized: Removed array sorting code
• Optimized: Removed vehicle type check
• Optimized: Removed damage player check in "Put" and "Take" eventHandlers
• Optimized: Removed '_rtoSeat' variable
• Optimized: Removed '_PLR' variable from some eventHandlers
• Optimized: Renamed '_nearP' to '_p'
• Optimized: 'V_In' checks for players in your vehicle only
• Optimized: Removed redundant resetting of local/private variables
• Optimized: Removed redundant 'r_PS' variable
• Optimized: Removed redundant player isKindOf r_PS checks
• Optimized: Removed redundant player condition checks in r_fuzz and r_fuzz2
• Optimized: Removed redundant "ItemRadio" and RTO trait check in 'out' functions
• Optimized: Removed duplicate in and out eventHandlers for Support channel
• Optimized: Vehicle horn check no longer uses BIS_fnc_inString
• Optimized: Code no longer looks for attachedObjects
• Optimized: Code checking for RTO seat simplified into light-weight variable
• Optimized: Improved group leader check in the Command channel functions
• Optimized: Improved civilian vehicle check in the Support channel functions
• Optimized: Improved efficiency of generating players array variables
• Optimized: Improved efficiency of getInMan / getOutMan eventHandlers
• Optimized: Improved efficiency of all in and out functions
• Optimized: Replaced spawned/attached radio object with a 3D interface
• Optimized: Replaced (leader(group(vehicle _x))==_x) with (leader group _x==_x)
• Optimized: Replaced side player with playerSide
• Optimized: Replaced if(then);if(then);if(then); to a switch
• Optimized: Replaced 'r_S' with playerSide - (Test)
• Optimized: Replaced 'r_PS with playerSide - (Test)
• Optimized: Replaced == with isEqualTo in some cases
• Optimized: Replaced select with # in some cases
• Optimized: Replaced ""code"" with 'code' for strings in eventHandlers
• Optimized: Replaced player with r_p missionNamespace variable - (Test)
• Optimized: Renamed '_rtoSeat' to 'seat'
• Optimized: Renamed 'r_Hush' to 'r_out'
• Optimized: Renamed 'Hush.sqf' to 'out.sqf'
• Optimized: Deleted lots of "unneeded" whitespaces


Forum topic:
- BI forums


Steam Workshop:
- Subscribe




Enable javascript to be able to download from Armaholic please!



Tags: Communication,   Effects,   Enhace,   Framework,   Radio,   Scripts,   Simulation,   Sound,   Von