diff --git a/addons/field_rations/functions/fnc_handleEffects.sqf b/addons/field_rations/functions/fnc_handleEffects.sqf
index 6987074227..980454cac7 100644
--- a/addons/field_rations/functions/fnc_handleEffects.sqf
+++ b/addons/field_rations/functions/fnc_handleEffects.sqf
@@ -27,14 +27,24 @@ if ((_thirst > 99.9 || {_hunger > 99.9}) && {random 1 < 0.5}) exitWith {
// Exit if unit is not awake, below are animation based consequences
if !(_player call EFUNC(common,isAwake)) exitWith {};
-// Set unit unconscious with 45s cooldown (chance based on how high thirst/hunger are)
+// Trigger high thirst/hunger consequence
if (
GETEGVAR(medical,enabled,false) &&
- {(CBA_missionTime - XGVAR(lastUnconEvent)) > 45} &&
- {(_thirst > 85 || {_hunger > 85}) && {random 1 < linearConversion [85, 100, _thirst max _hunger, 0.05, 0.1, true]}}
+ {(_thirst > 85 || {_hunger > 85})}
) exitWith {
- [_player, true, 5, true] call EFUNC(medical,setUnconscious);
- XGVAR(lastUnconEvent) = CBA_missionTime;
+ if (XGVAR(nearDepletedConsequence) == 1) then { // Set unit unconscious with a 45s cooldown
+ if (
+ (CBA_missionTime - XGVAR(lastUnconEvent)) > 45 &&
+ {random 1 < linearConversion [85, 100, _thirst max _hunger, 0.05, 0.1, true]}
+ ) then {
+ [_player, true, 5, true] call EFUNC(medical,setUnconscious);
+ XGVAR(lastUnconEvent) = CBA_missionTime;
+ };
+ } else { // Add pain
+ if (ACE_Player getVariable [QEGVAR(medical,pain), 0] < 0.1) then {
+ [ACE_Player, 0.1] call ace_medical_fnc_adjustPainLevel;
+ };
+ };
};
// Make unit fall if moving fast
diff --git a/addons/field_rations/initSettings.inc.sqf b/addons/field_rations/initSettings.inc.sqf
index 16e2d4eb2d..173d5aec16 100644
--- a/addons/field_rations/initSettings.inc.sqf
+++ b/addons/field_rations/initSettings.inc.sqf
@@ -45,6 +45,15 @@
true
] call CBA_fnc_addSetting;
+[
+ QXGVAR(nearDepletedConsequence),
+ "LIST",
+ [LSTRING(NearDepletedConsequence_DisplayName), LSTRING(NearDepletedConsequence_Description)],
+ LSTRING(DisplayName),
+ [[0, 1], [LSTRING(NearDepletedConsequence_Pain), LSTRING(NearDepletedConsequence_Unconsciousness)], 1],
+ true
+] call CBA_fnc_addSetting;
+
[
QXGVAR(waterSourceActions),
"LIST",
diff --git a/addons/field_rations/stringtable.xml b/addons/field_rations/stringtable.xml
index 2b443ccc3c..180dcd80b4 100644
--- a/addons/field_rations/stringtable.xml
+++ b/addons/field_rations/stringtable.xml
@@ -115,6 +115,21 @@
Tiempo sin agua
Susuz Kalma Süresi
+
+ Consequence of extreme thirst/hunger
+ Folge von extremen Durst/Hunger
+ Conseguenze di sete/fame estrema
+
+
+ Pain
+ Schmerzen
+ Dolore
+
+
+ Fainting
+ Ohnmacht
+ Svenimenti
+
How long should a person be able to go without water (hours).
一個單位脫水之前能支撐多久(單位為小時)。