From ef247a3384338a01ccc9e052a0e678ddf025a20e Mon Sep 17 00:00:00 2001 From: TomDraal Date: Sun, 1 Dec 2024 18:56:28 +0100 Subject: [PATCH 01/11] Advanced Chemical Warfare Settings --- .../core/def/mission.sqf | 4 +++- .../core/def/param.hpp | 14 +++++++++++++- .../core/fnc/cache/create.sqf | 8 ++++---- .../core/fnc/db/load.sqf | 2 +- .../core/fnc/db/load_old.sqf | 2 +- =BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml | 8 ++++++++ 6 files changed, 30 insertions(+), 8 deletions(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf index 5f8df6a77..ce4ea5a89 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf @@ -85,6 +85,8 @@ btc_p_civ_max_veh = "btc_p_civ_max_veh" call BIS_fnc_getParamValue; //<< Gameplay options >> btc_p_sea = ("btc_p_sea" call BIS_fnc_getParamValue) isEqualTo 1; btc_p_chem = ("btc_p_chem" call BIS_fnc_getParamValue) isEqualTo 1; +btc_p_chem_sides = ("btc_p_chem_sides" call BIS_fnc_getParamValue) isEqualTo 1; +btc_p_chem_cache_probability = ("btc_p_chem_cache_probability" call BIS_fnc_getParamValue)/100; btc_p_spect = ("btc_p_spect" call BIS_fnc_getParamValue) isEqualTo 1; btc_p_side_mission_cycle = "btc_p_side_mission_cycle" call BIS_fnc_getParamValue; @@ -231,7 +233,7 @@ if (isServer) then { btc_side_ID = 0; btc_side_list = ["supply", "mines", "vehicle", "get_city", "tower", "civtreatment", "checkpoint", "convoy", "rescue", "capture_officer", "hostage", "hack", "kill", "EMP", "removeRubbish", "massacre"]; // On ground (Side "convoy" and "capture_officer" are not design for map with different islands. Start and end city can be on different islands.) if (btc_p_sea) then {btc_side_list append ["civtreatment_boat", "underwater_generator"]}; // On sea - if (btc_p_chem) then {btc_side_list append ["chemicalLeak", "pandemic"]}; + if (btc_p_chem && btc_p_chem_sides) then {btc_side_list append ["chemicalLeak", "pandemic"]}; btc_side_list_use = []; btc_type_tower = ["Land_Communication_F", "Land_TTowerBig_1_F", "Land_TTowerBig_2_F"]; btc_type_barrel = ["Land_GarbageBarrel_01_F", "Land_BarrelSand_grey_F", "MetalBarrel_burning_F", "Land_BarrelWater_F", "Land_MetalBarrel_F", "Land_MetalBarrel_empty_F"]; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp index 77c7efc2b..d7edfa9f9 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp @@ -401,12 +401,24 @@ class Params { texts[] = {$STR_DISABLED,$STR_ENABLED}; default = 1; }; - class btc_p_chem { // Chemical warfare + class btc_p_chem { // Chemical warfare ON / OFF title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_GAMEPLAY_CHEM"]); values[] = {0,1}; texts[] = {$STR_DISABLED,$STR_ENABLED}; default = 1; }; + class btc_p_chem_sides { // Advanced Chemical warfare setting to activate / deactivate chemical side missions + title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_GAMEPLAY_CHEM_SIDES"]); + values[] = {0,1}; + texts[] = {$STR_DISABLED,$STR_ENABLED}; + default = 1; + }; + class btc_p_chem_cache_probability { // Advanced Chemical warfare setting to change probability of a chemical weapon cache + title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_GAMEPLAY_CHEM_CACHE_PROBABILITY"]); + values[]={10,20,30,40,50,60,70,80,90,100}; + texts[]={"10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"}; + default = 50; + }; class btc_p_spect { // Spectrum devices title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_GAMEPLAY_SPECT"]); values[] = {0,1}; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf index 11e028676..5002f5900 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf @@ -8,7 +8,7 @@ Description: Parameters: _cache_pos - Position of the cache. [Array] _p_chem - Allow chemical cache. [Boolean] - _probabilityNotChemical - Probability to not create a chemical cache. [Number] + _probabilityChemical - Probability to create a chemical cache. [Number] Returns: @@ -28,13 +28,13 @@ Author: params [ ["_cache_pos", btc_cache_pos, [[]]], - ["_p_chem", btc_p_chem, [true]], - ["_probabilityNotChemical", 0.5, [0]] + ["_p_chem", btc_p_chem && (btc_p_chem_cache_probability > 0), [true]], + ["_probabilityChemical", btc_p_chem_cache_probability, [0]] ]; private _isChem = false; if (_p_chem) then { - _isChem = random 1 > _probabilityNotChemical; + _isChem = random 1 < _probabilityChemical; }; private _cacheType = selectRandom (btc_cache_type select 0); btc_cache_obj = _cacheType createVehicle _cache_pos; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf index 2cab7efce..565fe1242 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf @@ -102,7 +102,7 @@ btc_cache_pos = _cache_pos; btc_cache_n = _cache_n; btc_cache_info = _cache_info; -[_cache_pos, btc_p_chem, [1, 0] select _isChem] call btc_cache_fnc_create; +[_cache_pos, btc_p_chem && (btc_p_chem_cache_probability > 0), [1, 0] select _isChem] call btc_cache_fnc_create; btc_cache_obj setVariable ["btc_cache_unitsSpawned", _cache_unitsSpawned]; btc_cache_markers = []; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf index acb9d5544..532928f05 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf @@ -100,7 +100,7 @@ btc_cache_pos = _cache_pos; btc_cache_n = _cache_n; btc_cache_info = _cache_info; -[_cache_pos, btc_p_chem, [1, 0] select _isChem] call btc_cache_fnc_create; +[_cache_pos, btc_p_chem && (btc_p_chem_cache_probability > 0), [1, 0] select _isChem] call btc_cache_fnc_create; btc_cache_obj setVariable ["btc_cache_unitsSpawned", _cache_unitsSpawned]; btc_cache_markers = []; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml b/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml index 61af7b9c2..992c73844 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml +++ b/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml @@ -961,6 +961,14 @@ Guerre chimique: Chemická válka: + + Chemical side missions: + Missions secondaires chimiques: + + + Chemical weapon cache probability: + Probabilité de cache d'armes chimique: + Spectrum devices: Appareils à spectre: From ade1d28924f86cc3dc39d2c376d431a80b1ef5ca Mon Sep 17 00:00:00 2001 From: TomDraal Date: Sun, 1 Dec 2024 19:37:28 +0100 Subject: [PATCH 02/11] Update param.hpp to allow 0% Chemical Cache Proba --- =BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp index d7edfa9f9..3e1b9f00f 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp @@ -415,8 +415,8 @@ class Params { }; class btc_p_chem_cache_probability { // Advanced Chemical warfare setting to change probability of a chemical weapon cache title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_GAMEPLAY_CHEM_CACHE_PROBABILITY"]); - values[]={10,20,30,40,50,60,70,80,90,100}; - texts[]={"10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"}; + values[]={0,10,20,30,40,50,60,70,80,90,100}; + texts[]={"0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"}; default = 50; }; class btc_p_spect { // Spectrum devices From 4b648dae9d022d1535bfc7e9a884873c05ab9874 Mon Sep 17 00:00:00 2001 From: TomDraal Date: Sun, 15 Dec 2024 16:38:12 +0100 Subject: [PATCH 03/11] Remove btc_p_chem for consistency btc_p_chem becomes useless with the introduction of btc_p_sides and btc_p_chem_cache_probability. --- =BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf | 3 +-- =BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp | 6 ------ =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf | 2 +- .../core/fnc/chem/checkLoop.sqf | 4 +++- .../core/fnc/chem/handleShower.sqf | 4 +++- .../core/fnc/civ/create_patrol.sqf | 3 +-- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf | 2 +- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf | 2 +- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf | 4 +++- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf | 5 ++++- 10 files changed, 18 insertions(+), 17 deletions(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf index ce4ea5a89..f98843bd6 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf @@ -84,7 +84,6 @@ btc_p_civ_max_veh = "btc_p_civ_max_veh" call BIS_fnc_getParamValue; //<< Gameplay options >> btc_p_sea = ("btc_p_sea" call BIS_fnc_getParamValue) isEqualTo 1; -btc_p_chem = ("btc_p_chem" call BIS_fnc_getParamValue) isEqualTo 1; btc_p_chem_sides = ("btc_p_chem_sides" call BIS_fnc_getParamValue) isEqualTo 1; btc_p_chem_cache_probability = ("btc_p_chem_cache_probability" call BIS_fnc_getParamValue)/100; btc_p_spect = ("btc_p_spect" call BIS_fnc_getParamValue) isEqualTo 1; @@ -233,7 +232,7 @@ if (isServer) then { btc_side_ID = 0; btc_side_list = ["supply", "mines", "vehicle", "get_city", "tower", "civtreatment", "checkpoint", "convoy", "rescue", "capture_officer", "hostage", "hack", "kill", "EMP", "removeRubbish", "massacre"]; // On ground (Side "convoy" and "capture_officer" are not design for map with different islands. Start and end city can be on different islands.) if (btc_p_sea) then {btc_side_list append ["civtreatment_boat", "underwater_generator"]}; // On sea - if (btc_p_chem && btc_p_chem_sides) then {btc_side_list append ["chemicalLeak", "pandemic"]}; + if (btc_p_chem_sides) then {btc_side_list append ["chemicalLeak", "pandemic"]}; btc_side_list_use = []; btc_type_tower = ["Land_Communication_F", "Land_TTowerBig_1_F", "Land_TTowerBig_2_F"]; btc_type_barrel = ["Land_GarbageBarrel_01_F", "Land_BarrelSand_grey_F", "MetalBarrel_burning_F", "Land_BarrelWater_F", "Land_MetalBarrel_F", "Land_MetalBarrel_empty_F"]; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp index 3e1b9f00f..4ef4708a1 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp @@ -401,12 +401,6 @@ class Params { texts[] = {$STR_DISABLED,$STR_ENABLED}; default = 1; }; - class btc_p_chem { // Chemical warfare ON / OFF - title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_GAMEPLAY_CHEM"]); - values[] = {0,1}; - texts[] = {$STR_DISABLED,$STR_ENABLED}; - default = 1; - }; class btc_p_chem_sides { // Advanced Chemical warfare setting to activate / deactivate chemical side missions title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_GAMEPLAY_CHEM_SIDES"]); values[] = {0,1}; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf index 5002f5900..70f8d360a 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf @@ -28,7 +28,7 @@ Author: params [ ["_cache_pos", btc_cache_pos, [[]]], - ["_p_chem", btc_p_chem && (btc_p_chem_cache_probability > 0), [true]], + ["_p_chem", (btc_p_chem_cache_probability > 0), [true]], ["_probabilityChemical", btc_p_chem_cache_probability, [0]] ]; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/checkLoop.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/checkLoop.sqf index 433edce3b..f0bbf3207 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/checkLoop.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/checkLoop.sqf @@ -19,7 +19,9 @@ Author: ---------------------------------------------------------------------------- */ -if !(btc_p_chem) exitWith {}; +private _isChem = (btc_p_chem_sides || (btc_p_chem_cache_probability > 0)); + +if !(_isChem) exitWith {}; private _bodyParts = ["head","body","hand_l","hand_r","leg_l","leg_r"]; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/handleShower.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/handleShower.sqf index ea462006c..c46729570 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/handleShower.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/handleShower.sqf @@ -20,7 +20,9 @@ Author: ---------------------------------------------------------------------------- */ -if !(btc_p_chem) exitWith {}; +private _isChem = (btc_p_chem_sides || (btc_p_chem_cache_probability > 0)); + +if !(_isChem) exitWith {}; params [ ["_minDistance", 5, [2]] diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/civ/create_patrol.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/civ/create_patrol.sqf index 4459a20fa..77c9e51bc 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/civ/create_patrol.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/civ/create_patrol.sqf @@ -26,8 +26,7 @@ Author: params [ ["_group", grpNull, [grpNull]], ["_active_city", objNull, [objNull]], - ["_area", btc_patrol_area, [0]], - ["_p_chem", btc_p_chem, [false]] + ["_area", btc_patrol_area, [0]] ]; if (isNil "btc_civilian_id") then {btc_civilian_id = -1;}; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf index 565fe1242..9bc34ab01 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf @@ -102,7 +102,7 @@ btc_cache_pos = _cache_pos; btc_cache_n = _cache_n; btc_cache_info = _cache_info; -[_cache_pos, btc_p_chem && (btc_p_chem_cache_probability > 0), [1, 0] select _isChem] call btc_cache_fnc_create; +[_cache_pos, (btc_p_chem_cache_probability > 0), [1, 0] select _isChem] call btc_cache_fnc_create; btc_cache_obj setVariable ["btc_cache_unitsSpawned", _cache_unitsSpawned]; btc_cache_markers = []; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf index 532928f05..92d75dfb2 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf @@ -100,7 +100,7 @@ btc_cache_pos = _cache_pos; btc_cache_n = _cache_n; btc_cache_info = _cache_info; -[_cache_pos, btc_p_chem && (btc_p_chem_cache_probability > 0), [1, 0] select _isChem] call btc_cache_fnc_create; +[_cache_pos, (btc_p_chem_cache_probability > 0), [1, 0] select _isChem] call btc_cache_fnc_create; btc_cache_obj setVariable ["btc_cache_unitsSpawned", _cache_unitsSpawned]; btc_cache_markers = []; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf index 2259f947a..1658457ac 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf @@ -71,7 +71,9 @@ _player addEventHandler ["WeaponAssembled", { _this remoteExecCall ["btc_log_fnc_init", 2]; }] call CBA_fnc_addEventHandler; -if (btc_p_chem) then { +private _isChem = (btc_p_chem_sides || (btc_p_chem_cache_probability > 0)); + +if (_isChem) then { // Add biopsy [missionNamespace, "probingEnded", btc_chem_fnc_biopsy] call BIS_fnc_addScriptedEventHandler; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf index 2feead69d..c3f1c15de 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf @@ -85,7 +85,10 @@ if (btc_p_auto_db) then { }; }]; }; -if (btc_p_chem) then { + +private _isChem = (btc_p_chem_sides || (btc_p_chem_cache_probability > 0)); + +if (_isChem) then { ["ace_cargoLoaded", btc_chem_fnc_propagate] call CBA_fnc_addEventHandler; ["AllVehicles", "GetIn", {[_this select 0, _this select 2] call btc_chem_fnc_propagate}] call CBA_fnc_addClassEventHandler; ["DeconShower_01_F", "init", { From 6eb1adc2984e5e244bdfc1c0853c58d227fb2650 Mon Sep 17 00:00:00 2001 From: TomDraal <122184262+TomDraal@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:28:31 +0100 Subject: [PATCH 04/11] Update =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf Co-authored-by: Vdauphin --- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf index 70f8d360a..361aeb5cb 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf @@ -28,7 +28,7 @@ Author: params [ ["_cache_pos", btc_cache_pos, [[]]], - ["_p_chem", (btc_p_chem_cache_probability > 0), [true]], + ["_p_chem", btc_p_chem_cache_probability > 0, [true]], ["_probabilityChemical", btc_p_chem_cache_probability, [0]] ]; From a8c9a604cf9c6600a0f3ed3e2f62eee8097b2b14 Mon Sep 17 00:00:00 2001 From: TomDraal <122184262+TomDraal@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:28:41 +0100 Subject: [PATCH 05/11] Update =BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp Co-authored-by: Vdauphin --- =BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp index 4ef4708a1..b048ffb6b 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp @@ -401,7 +401,7 @@ class Params { texts[] = {$STR_DISABLED,$STR_ENABLED}; default = 1; }; - class btc_p_chem_sides { // Advanced Chemical warfare setting to activate / deactivate chemical side missions + class btc_p_chem_sides { // Toggle chemical side missions: title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_GAMEPLAY_CHEM_SIDES"]); values[] = {0,1}; texts[] = {$STR_DISABLED,$STR_ENABLED}; From 2bd691e8e4fadfc7de5f3f3006aed7b787732710 Mon Sep 17 00:00:00 2001 From: TomDraal <122184262+TomDraal@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:28:51 +0100 Subject: [PATCH 06/11] Update =BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp Co-authored-by: Vdauphin --- =BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp index b048ffb6b..319b1a36e 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp @@ -407,7 +407,7 @@ class Params { texts[] = {$STR_DISABLED,$STR_ENABLED}; default = 1; }; - class btc_p_chem_cache_probability { // Advanced Chemical warfare setting to change probability of a chemical weapon cache + class btc_p_chem_cache_probability { // Chemical weapon cache probability: title = __EVAL(format [" %1", localize "STR_BTC_HAM_PARAM_GAMEPLAY_CHEM_CACHE_PROBABILITY"]); values[]={0,10,20,30,40,50,60,70,80,90,100}; texts[]={"0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"}; From a91cd3807aff1a36a51bffcd856913a612e7fe91 Mon Sep 17 00:00:00 2001 From: TomDraal <122184262+TomDraal@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:29:26 +0100 Subject: [PATCH 07/11] Update =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf Co-authored-by: Vdauphin --- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf index 9bc34ab01..0671ba7d2 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf @@ -102,7 +102,7 @@ btc_cache_pos = _cache_pos; btc_cache_n = _cache_n; btc_cache_info = _cache_info; -[_cache_pos, (btc_p_chem_cache_probability > 0), [1, 0] select _isChem] call btc_cache_fnc_create; +[_cache_pos, btc_p_chem_cache_probability > 0, [1, 0] select _isChem] call btc_cache_fnc_create; btc_cache_obj setVariable ["btc_cache_unitsSpawned", _cache_unitsSpawned]; btc_cache_markers = []; From 944a7563b72dc3ffc63a5d0c1fd4d694e0aa013d Mon Sep 17 00:00:00 2001 From: TomDraal <122184262+TomDraal@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:29:31 +0100 Subject: [PATCH 08/11] Update =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf Co-authored-by: Vdauphin --- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf index 92d75dfb2..3e0c1e7c8 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf @@ -100,7 +100,7 @@ btc_cache_pos = _cache_pos; btc_cache_n = _cache_n; btc_cache_info = _cache_info; -[_cache_pos, (btc_p_chem_cache_probability > 0), [1, 0] select _isChem] call btc_cache_fnc_create; +[_cache_pos, btc_p_chem_cache_probability > 0, [1, 0] select _isChem] call btc_cache_fnc_create; btc_cache_obj setVariable ["btc_cache_unitsSpawned", _cache_unitsSpawned]; btc_cache_markers = []; From 373ba99db8e56782c9eb710f119dd363a059c267 Mon Sep 17 00:00:00 2001 From: TomDraal Date: Mon, 16 Dec 2024 00:40:09 +0100 Subject: [PATCH 09/11] VDauphin's suggestions --- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/checkLoop.sqf | 4 +--- .../core/fnc/chem/handleShower.sqf | 4 +--- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf | 4 +--- =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/checkLoop.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/checkLoop.sqf index f0bbf3207..81d859865 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/checkLoop.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/checkLoop.sqf @@ -19,9 +19,7 @@ Author: ---------------------------------------------------------------------------- */ -private _isChem = (btc_p_chem_sides || (btc_p_chem_cache_probability > 0)); - -if !(_isChem) exitWith {}; +if !(btc_p_chem_sides || (btc_p_chem_cache_probability > 0)) exitWith {}; private _bodyParts = ["head","body","hand_l","hand_r","leg_l","leg_r"]; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/handleShower.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/handleShower.sqf index c46729570..e96b82927 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/handleShower.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/chem/handleShower.sqf @@ -20,9 +20,7 @@ Author: ---------------------------------------------------------------------------- */ -private _isChem = (btc_p_chem_sides || (btc_p_chem_cache_probability > 0)); - -if !(_isChem) exitWith {}; +if !(btc_p_chem_sides || (btc_p_chem_cache_probability > 0)) exitWith {}; params [ ["_minDistance", 5, [2]] diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf index 1658457ac..4c866c226 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf @@ -71,9 +71,7 @@ _player addEventHandler ["WeaponAssembled", { _this remoteExecCall ["btc_log_fnc_init", 2]; }] call CBA_fnc_addEventHandler; -private _isChem = (btc_p_chem_sides || (btc_p_chem_cache_probability > 0)); - -if (_isChem) then { +if (btc_p_chem_sides || (btc_p_chem_cache_probability > 0)) then { // Add biopsy [missionNamespace, "probingEnded", btc_chem_fnc_biopsy] call BIS_fnc_addScriptedEventHandler; diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf index c3f1c15de..315f0ad2b 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf +++ b/=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf @@ -86,9 +86,7 @@ if (btc_p_auto_db) then { }]; }; -private _isChem = (btc_p_chem_sides || (btc_p_chem_cache_probability > 0)); - -if (_isChem) then { +if (btc_p_chem_sides || (btc_p_chem_cache_probability > 0)) then { ["ace_cargoLoaded", btc_chem_fnc_propagate] call CBA_fnc_addEventHandler; ["AllVehicles", "GetIn", {[_this select 0, _this select 2] call btc_chem_fnc_propagate}] call CBA_fnc_addClassEventHandler; ["DeconShower_01_F", "init", { From 76406a885f2ca10695f67c677eaba3f8e17cd2c8 Mon Sep 17 00:00:00 2001 From: TomDraal <122184262+TomDraal@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:36:18 +0100 Subject: [PATCH 10/11] Update =BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml Co-authored-by: Vdauphin --- =BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml b/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml index 992c73844..77b031b4d 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml +++ b/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml @@ -967,7 +967,7 @@ Chemical weapon cache probability: - Probabilité de cache d'armes chimique: + Probabilité de cache d'armes chimiques : Spectrum devices: From 4341a99922a06396ca22edd80e552081fe36da9f Mon Sep 17 00:00:00 2001 From: TomDraal <122184262+TomDraal@users.noreply.github.com> Date: Wed, 18 Dec 2024 20:36:35 +0100 Subject: [PATCH 11/11] Update =BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml Co-authored-by: Vdauphin --- =BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml b/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml index 77b031b4d..15a41dbfa 100644 --- a/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml +++ b/=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml @@ -963,7 +963,7 @@ Chemical side missions: - Missions secondaires chimiques: + Missions secondaires chimiques : Chemical weapon cache probability: