CBRN – Arma 3

From Bohemia Interactive Community
Revision as of 15:21, 1 August 2019 by DnA (talk | contribs)
Jump to navigation Jump to search

Template:Cfg ref

Overview

There are no engine nor scripted features to simulate Chemical Biological Radiological Nuclear (CBRN) threats, contamination, or decontamination in Arma 3. However, the Contact expansion has added a range of gear and props to utilize in custom content as desired. This page documents a few scripted methods to set them up. Arma 3 logo black.png1.94


Scripting

Hoses & Filters

There are several pieces of CBRN gear (especially Facewear and Backpacks) that require scripting to visually combine correctly. These samples only set the initial state; they will not deal with inventory changes during gameplay. At the moment there is no vanilla module to handle this automatically.

Combination Unit Respirator
//Visibility of the common hose segment
(backpackContainer this) setObjectTexture [1, ""]; //Hide hose segment
(backpackContainer this) setObjectTexture [1, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; //Show hose segment
 
//Visibility of a hose segment intended for the NATO APR (recommended combination)
(backpackContainer this) setObjectTexture [2, ""]; //Hide
(backpackContainer this) setObjectTexture [2, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; //Show
this linkItem "G_AirPurifyingRespirator_01_nofilter_F"; //Replacing a NATO APR with filter for a version without filter
 
//Visibility of a hose segment intended for the Regulator Facepiece
(backpackContainer this) setObjectTexture [3, ""]; //Hide
(backpackContainer this) setObjectTexture [3, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; //Show
 
//Showing an insignia on the CUR
(backpackContainer this) setObjectTexture [4, "\A3\ui_f\data\logos\bi_white_ca.paa"]; //Replace the texture by any insignia texture path
Self-Contained Breathing Apparatus
//Visibility of a hose segment intended for the Regulator Facepiece (recommended combination) 
(backpackContainer this) setObjectTexture [2, ""]; //Hide hose segment
(backpackContainer this) setObjectTexture [2, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; //Show hose segment
 
//Visibility of a hose segment intended for the NATO APR
(backpackContainer this) setObjectTexture [1, ""]; //Hide
(backpackContainer this) setObjectTexture [1, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; //Show
Common Combinations
Item(s) Preview Classes Sample Code
  • Combination Unit Respirator
  • APR [NATO]
  • B_CombinationUnitRespirator_01_F
  • G_AirPurifyingRespirator_01_F
(backpackContainer this) setObjectTexture [1, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; 
(backpackContainer this) setObjectTexture [2, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; 
this linkItem "G_AirPurifyingRespirator_01_nofilter_F";
  • Self-Contained Breathing Apparatus
  • Regulator Facepiece
  • B_SCBA_01_F
  • G_RegulatorMask_F
(backpackContainer this) setObjectTexture [2, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"];

Other combinations are possible, but not all of them would be ideal in the real world:

  • CUR + Regulator Facepiece should work (though only the SCBA part contained within, not the PAPR).
  • SCBA + NATO APR should work, but is not intended.
  • NATO / CSAT APRs can of course be worn without any Backpack (filters attached).
  • The Regular Facepiece should not be worn without Backpack.
  • The CSAT APR was not designed to connect to the SCBA / CUR.



Facewear Overlays

These are currently only available in the optional Contact data (mod contact), but may be moved to the vanilla platform data later.

There are simply 2D IGUI overlays available for the various relevant Facewear items. You can show these by script:

"YourLayerName" cutRsc ["RscCBRN_APR", "PLAIN", -1, false]; //Overlay on
"YourLayerName" cutText ["", "PLAIN"]; //Overlay off
Item(s) Preview Class(es) Overlay Class
  • APR [NATO]
  • G_AirPurifyingRespirator_01_F
  • G_AirPurifyingRespirator_01_nofilter_F (protected scope)
"RscCBRN_APR"
  • APR (Black) [CSAT]
  • APR (Olive) [CSAT]
  • APR (Sand) [CSAT]
  • G_AirPurifyingRespirator_02_black_F
  • G_AirPurifyingRespirator_02_olive_F
  • G_AirPurifyingRespirator_02_sand_F
"RscCBRN_APR_02"
  • Regulator Facepiece
  • G_RegulatorMask_F
"RscCBRN_Regulator"
  • Blindfold (Black)
  • Blindfold (White)
  • G_Blindfold_01_black_F
  • G_Blindfold_01_white_F
"RscBlindfold"


Chemical Detector

These are currently only available in the optional Contact data (mod contact), but may be moved to the vanilla platform data later.

While ultimately not used in the Contact campaign, there is a Chemical Detector variant (uncovered - ChemicalDetector_01_watch_F) that can occupy the watch inventory slot, and use scripted hooks to display a threat value and time. When in the player's watch slot, the watch key (O by default) can be used to show or toggle it on-screen.

"YourLayerName" cutRsc ["RscWeaponChemicalDetector", "PLAIN", 1, false]; //IGUI display on
"YourLayerName" cutText ["", "PLAIN"]; //IGUI display off
 
//Fetching useful UI controls
private _ui = uiNamespace getVariable "RscWeaponChemicalDetector";
private _obj = _ui displayCtrl 101;
 
_obj ctrlAnimateModel ["Threat_Level_Source", 0.5, true]; //Displaying a threat level (value between 0.0 and 1.0)
_obj ctrlShow false; //Hiding the detector when desired


Decon Showers

The regular and large Decon Showers have 3DEN attributes to control their initial state:

  • Turn on sprinklers: starting the VFX / SFX from the scenario start
  • Disable user action: removing the player ability to toggle the sprinklers during gameplay

Alternatively there are the following scripts:

[this, 1.5, 9] spawn BIN_fnc_deconShowerAnim; //Start the regular Decon Shower (use these values)
[this, 5.4, 4,2, true] spawn BIN_fnc_deconShowerAnimLarge; //Start the large Decon Shower (use these values)
[this] call BIN_fnc_deconShowerAnimStop; //Stop either type of Decon Shower
 
this setVariable ["BIN_deconshower_disableAction", true]; //Disables the user actions on either type of Decon Shower
private _state = _deconShower animationSourcePhase "valve_source"; //Detecting whether either type of Decon Shower is on / off (1 / 0)