CBRN – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<br />" to "<br>")
m (Some wiki formatting)
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Arma 3: Editing|CBRN]]
{{TOC|side}}
{{Cfg ref|abc}}
{{GVI|arma3|1.94}}
{{SideTOC}}


= Overview =
There are no engine nor scripted features to simulate Chemical Biological Radiological Nuclear (CBRN) threats, contamination, or decontamination in {{GameCategory|arma3|link= y}}.
There are no engine nor scripted features to simulate Chemical Biological Radiological Nuclear (CBRN) threats, contamination, or decontamination in [[{{arma3}}]]. 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.
However, the [[Arma 3 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.
{{GVI|arma3|1.94|category}}




== Hoses and Filters ==


= Scripting =
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. However, there's quick function to set the hoses and filters to an unit.
 
<sqf>[unit] call BIN_fnc_CBRNHoseInit;</sqf>
 
=== Combination Unit Respirator ===
 
<sqf>
// visibility of the common hose segment
(backpackContainer this) setObjectTexture [1, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; // show hose segment
(backpackContainer this) setObjectTexture [1, ""]; // hide hose segment
 
// visibility of a hose segment intended for the NATO APR (recommended combination)
(backpackContainer this) setObjectTexture [2, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; // show
(backpackContainer this) setObjectTexture [2, ""]; // hide
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, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; // show
(backpackContainer this) setObjectTexture [3, ""]; // hide
 
// 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
</sqf>
 
=== Self-Contained Breathing Apparatus ===
 
<sqf>
// visibility of a hose segment intended for the Regulator Facepiece (recommended combination)
(backpackContainer this) setObjectTexture [2, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; // show hose segment
(backpackContainer this) setObjectTexture [2, ""]; // hide hose segment
 
// visibility of a hose segment intended for the NATO APR
(backpackContainer this) setObjectTexture [1, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; // show
(backpackContainer this) setObjectTexture [1, ""]; // hide
</sqf>
 
=== Common Combinations ===


== 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. However, there's quick function to set the hoses and filters to an unit.
<syntaxhighlight lang="cpp">
[unit] call BIN_fnc_CBRNHoseInit
</syntaxhighlight>
=== Manual scripting ===
===== Combination Unit Respirator =====
<syntaxhighlight lang="cpp">
//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
</syntaxhighlight>
===== Self-Contained Breathing Apparatus =====
<syntaxhighlight lang="cpp">
//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
</syntaxhighlight>
===== Common Combinations =====
{| class="wikitable"
{| class="wikitable"
!Item(s)
! Item(s)
!Preview
! Preview
! colspan="1" |Classes
! Classes
!Sample Code
! Sample Code
|-
|-
|
|
* Combination Unit Respirator
* Combination Unit Respirator
* APR [NATO]  
* APR [NATO]
|  
|
<gallery>
<gallery>
File:Contact CUR NATO APR.jpg|CUR with NATO APR attached
File:Contact CUR NATO APR.jpg|CUR with NATO APR attached
</gallery>
</gallery>
| colspan="1" |
* <code>B_CombinationUnitRespirator_01_F</code>
* <code>G_AirPurifyingRespirator_01_F</code>
|
|
<syntaxhighlight lang="cpp">
B_CombinationUnitRespirator_01_F
(backpackContainer this) setObjectTexture [1, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"];  
G_AirPurifyingRespirator_01_F
(backpackContainer this) setObjectTexture [2, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"];  
|
<sqf>
(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";
this linkItem "G_AirPurifyingRespirator_01_nofilter_F";
</syntaxhighlight>
</sqf>
|-
|-
| colspan="1" |
|
* Self-Contained Breathing Apparatus
* Self-Contained Breathing Apparatus
* Regulator Facepiece
* Regulator Facepiece
| colspan="1" |
|
<gallery>
<gallery>
File:Contact SCBA Regulator Facepiece.jpg|SCBA with Regulator Facepiece attached
File:Contact SCBA Regulator Facepiece.jpg|SCBA with Regulator Facepiece attached
</gallery>
</gallery>
| colspan="1" |
|
* <code>B_SCBA_01_F</code>
B_SCBA_01_F
* <code>G_RegulatorMask_F</code>
G_RegulatorMask_F
| colspan="1" |
| <sqf>(backpackContainer this) setObjectTexture [2, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"];</sqf>
<syntaxhighlight lang="cpp">
(backpackContainer this) setObjectTexture [2, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"];
</syntaxhighlight>
|}
|}
Other combinations are possible, but not all of them would be ideal in the real world:
Other combinations are possible, but not all of them would be ideal in the real world:
Line 90: Line 89:
* NATO / CSAT APRs can of course be worn without any Backpack (filters attached).
* NATO / CSAT APRs can of course be worn without any Backpack (filters attached).
* The Regular Facepiece should not be worn without Backpack.
* The Regular Facepiece should not be worn without Backpack.
* The CSAT APR doesn't need and was not designed to connect to the SCBA / CUR (As CSAT Combat Fatigue has already built-in “air-conditioning” units, and wearing both of Fatigue and APR is CBRN-protected ''canonically'' [[https://forums.bohemia.net/forums/topic/223445-contact-expansion-asset-feedback/?tab=comments#comment-3358042 Source]]).
* The CSAT APR does not need and was not designed to connect to the SCBA / CUR (As CSAT Combat Fatigue has already built-in "air-conditioning" units, and wearing both of Fatigue and APR is canonically CBRN-protected {{Link|https://forums.bohemia.net/forums/topic/223445-contact-expansion-asset-feedback/?tab{{=}}comments#comment-3358042|Source}}).


<br>


== Facewear Overlays ==
== Facewear Overlays ==
There are simply 2D IGUI overlays available for the various relevant Facewear items. You can show these by script:
There are simply 2D IGUI overlays available for the various relevant Facewear items. You can show these by script:
<syntaxhighlight lang="cpp">
<sqf>
"YourLayerName" cutRsc ["RscCBRN_APR", "PLAIN", -1, false]; //Overlay on
"YourLayerName" cutRsc ["RscCBRN_APR", "PLAIN", -1, false]; // overlay on
"YourLayerName" cutText ["", "PLAIN"]; //Overlay off
"YourLayerName" cutText ["", "PLAIN"]; // overlay off
</syntaxhighlight>
</sqf>
{| class="wikitable"
{| class="wikitable"
!Item(s)
! Item(s)
! colspan="1" |Preview
! Preview
!Class(es)
! Class(es)
!Overlay Class
! Overlay Class
|-
|-
|
|
* APR [NATO]
* APR [NATO]
| colspan="1" |
|
<gallery>
<gallery>
File:Contact NATO APR Black.jpg|APR [NATO]
File:Contact NATO APR Black.jpg|APR [NATO]
</gallery>
</gallery>
|
|
* <code>G_AirPurifyingRespirator_01_F</code>
G_AirPurifyingRespirator_01_F
* <code>G_AirPurifyingRespirator_01_nofilter_F</code> (protected scope)
G_AirPurifyingRespirator_01_nofilter_F (protected scope)
|<code>"RscCBRN_APR"</code>
|
"RscCBRN_APR"
|-
|-
| colspan="1" |
|
* APR (Black) [CSAT]
* APR (Black) [CSAT]
* APR (Olive) [CSAT]
* APR (Olive) [CSAT]
* APR (Sand) [CSAT]
* APR (Sand) [CSAT]
| colspan="1" |
|
<gallery>
<gallery>
File:Contact CSAT APR Black.jpg|APR (Black) [CSAT]
File:Contact CSAT APR Black.jpg|APR (Black) [CSAT]
Line 127: Line 127:
File:Contact CSAT APR Sand.jpg|APR (Sand) [CSAT]
File:Contact CSAT APR Sand.jpg|APR (Sand) [CSAT]
</gallery>
</gallery>
| colspan="1" |
|
* <code>G_AirPurifyingRespirator_02_black_F</code>
G_AirPurifyingRespirator_02_black_F
* <code>G_AirPurifyingRespirator_02_olive_F</code>
G_AirPurifyingRespirator_02_olive_F
* <code>G_AirPurifyingRespirator_02_sand_F</code>
G_AirPurifyingRespirator_02_sand_F
| colspan="1" |<code>"RscCBRN_APR_02"</code>
|
"RscCBRN_APR_02"
|-
|-
| colspan="1" |
|
* Regulator Facepiece
* Regulator Facepiece
| colspan="1" |
|
<gallery>
<gallery>
File:Contact Regulator Facepiece.jpg|Regulator Facepiece
File:Contact Regulator Facepiece.jpg|Regulator Facepiece
</gallery>
</gallery>
| colspan="1" |
|
* <code>G_RegulatorMask_F</code>
G_RegulatorMask_F
| colspan="1" |<code>"RscCBRN_Regulator"</code>
|
"RscCBRN_Regulator"
|-
|-
| colspan="1" |
|
* Blindfold (Black)
Blindfold (Black)
* Blindfold (White)
Blindfold (White)
| colspan="1" |
|
<gallery>
<gallery>
File:Contact Blindfold Black.jpg|Blindfold (Black)  
File:Contact Blindfold Black.jpg|Blindfold (Black)
File:Contact Blindfold White.jpg|Blindfold (White)
File:Contact Blindfold White.jpg|Blindfold (White)
</gallery>
</gallery>
| colspan="1" |
|
* <code>G_Blindfold_01_black_F</code>
G_Blindfold_01_black_F
* <code>G_Blindfold_01_white_F</code>
G_Blindfold_01_white_F
| colspan="1" |<code>"RscBlindfold"</code>
|
"RscBlindfold"
|}
|}




== Chemical Detector ==
== Chemical Detector ==
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.
 
While ultimately not used in the Contact campaign, there is a Chemical Detector variant (uncovered - {{hl|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 "Show watch" key ({{Controls|O}} by default) can be used to show or toggle it on-screen.
<gallery>
<gallery>
File:Contact Chemical Detector.jpg|Chemical Detector
File:Contact Chemical Detector.jpg|Chemical Detector
Line 165: Line 170:
</gallery>
</gallery>


<syntaxhighlight lang="cpp">
<sqf>
"YourLayerName" cutRsc ["RscWeaponChemicalDetector", "PLAIN", 1, false]; //IGUI display on
"YourLayerName" cutRsc ["RscWeaponChemicalDetector", "PLAIN", 1, false]; // IGUI display on
"YourLayerName" cutText ["", "PLAIN"]; //IGUI display off
"YourLayerName" cutText ["", "PLAIN"]; // IGUI display off
 
//Fetching useful UI controls
// fetching useful UI controls
private _ui = uiNamespace getVariable "RscWeaponChemicalDetector";
private _ui = uiNamespace getVariable "RscWeaponChemicalDetector";
private _obj = _ui displayCtrl 101;
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 ctrlAnimateModel ["Threat_Level_Source", 0.5, true]; // display a threat level (value between 0.00 and 9.99)
_obj ctrlShow false; //Hiding the detector when desired
_obj ctrlShow false; // hide the detector when desired
</syntaxhighlight>
</sqf>




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


Line 185: Line 191:


Alternatively there are the following scripts:
Alternatively there are the following scripts:
<syntaxhighlight lang="cpp">
<sqf>
[this, 1.5, 9] spawn BIN_fnc_deconShowerAnim; //Start the regular Decon Shower (use these values)
[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, 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] 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
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)
private _state = _deconShower animationSourcePhase "valve_source"; // detecting whether either type of Decon Shower is on / off (1 / 0)
</syntaxhighlight>
</sqf>
 
 
{{GameCategory|arma3|Editing}}
[[Category:Introduced with Arma 3 version 1.94]]

Latest revision as of 17:18, 13 September 2024

Arma 3 logo black.png1.94

There are no engine nor scripted features to simulate Chemical Biological Radiological Nuclear (CBRN) threats, contamination, or decontamination in Arma 3. However, the Arma 3 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.


Hoses and 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. However, there's quick function to set the hoses and filters to an unit.

Combination Unit Respirator

// visibility of the common hose segment (backpackContainer this) setObjectTexture [1, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; // show hose segment (backpackContainer this) setObjectTexture [1, ""]; // hide hose segment // visibility of a hose segment intended for the NATO APR (recommended combination) (backpackContainer this) setObjectTexture [2, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; // show (backpackContainer this) setObjectTexture [2, ""]; // hide 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, "a3\supplies_f_enoch\bags\data\b_cur_01_co.paa"]; // show (backpackContainer this) setObjectTexture [3, ""]; // hide // 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, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; // show hose segment (backpackContainer this) setObjectTexture [2, ""]; // hide hose segment // visibility of a hose segment intended for the NATO APR (backpackContainer this) setObjectTexture [1, "a3\supplies_f_enoch\bags\data\b_scba_01_co.paa"]; // show (backpackContainer this) setObjectTexture [1, ""]; // hide

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 does not need and was not designed to connect to the SCBA / CUR (As CSAT Combat Fatigue has already built-in "air-conditioning" units, and wearing both of Fatigue and APR is canonically CBRN-protected Source).


Facewear Overlays

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

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 "Show 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]; // display a threat level (value between 0.00 and 9.99) _obj ctrlShow false; // hide 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)