diff --git a/SQF/dayz_code/Configs/CfgWeapons/Tools/APSI.hpp b/SQF/dayz_code/Configs/CfgWeapons/Tools/APSI.hpp index ddf596358..b0294d96e 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Tools/APSI.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Tools/APSI.hpp @@ -4,6 +4,15 @@ class ItemAPSI_DZE : ItemCore displayName = $STR_EQUIP_APSI; picture = "\dayz_epoch_c\icons\tools\ItemAPSI.paa"; descriptionShort = $STR_EQUIP_APSI_DESC; + + class ItemActions + { + class Power + { + text = $STR_APSI_STATE; + script = "call fnc_apsiState;"; + }; + }; }; class ItemAPSIBroken_DZE : ItemCore diff --git a/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp b/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp index 3892cb186..0e5bd8ff3 100644 --- a/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp +++ b/SQF/dayz_code/Configs/RscDisplay/RscPlayerUI.hpp @@ -951,4 +951,87 @@ class RscTitles text="\nst\textures\skrabanec.paa"; }; }; + class RscAPSI + { + idd = -1; + duration = 10; + fadein = 0; + movingEnable = 0; + enableSimulation = 0; + enableDisplay = 0; + class controls + { + class APSILog: RscTextAPSI + { + text = $STR_EVR_ACTIVITY; + ColorText[] = {1,0.2,0.1,1}; + }; + }; + }; + class RscAPSI_Detected: RscAPSI + { + class controls + { + class APSILog: RscTextAPSI + { + text = $STR_EVR_DETECT; + ColorText[] = {1,0,0.2,1}; + }; + }; + }; + class RscAPSI_Protected: RscAPSI + { + class controls + { + class APSILog: RscTextAPSI + { + text = $STR_EVR_PROTECT; + ColorText[] = {0,1,0.2,1}; + }; + }; + }; + class RscAPSI_On: RscAPSI + { + class controls + { + class APSILog: RscTextAPSI + { + text = $STR_EVR_ENABLED; + ColorText[] = {0,1,0.2,1}; + }; + }; + }; + class RscAPSI_Off: RscAPSI + { + class controls + { + class APSILog: RscTextAPSI + { + text = $STR_EVR_DISABLED; + ColorText[] = {0,1,0.2,1}; + }; + }; + }; + class RscAPSI_Start: RscAPSI + { + class controls + { + class APSILog: RscTextAPSI + { + text = $STR_EVR_START; + ColorText[] = {1,0,0.2,1}; + }; + }; + }; + class RscAPSI_End: RscAPSI + { + class controls + { + class APSILog: RscTextAPSI + { + text = $STR_EVR_END; + ColorText[] = {0,1,0.2,1}; + }; + }; + }; }; diff --git a/SQF/dayz_code/Configs/rscTitles.hpp b/SQF/dayz_code/Configs/rscTitles.hpp index 6ed295674..8554de73f 100644 --- a/SQF/dayz_code/Configs/rscTitles.hpp +++ b/SQF/dayz_code/Configs/rscTitles.hpp @@ -792,6 +792,20 @@ class bloodTest }; }; +class RscTextAPSI : RscText +{ + x = 0.5; + y = 1; + h = 0.03; + w = 0.5; + style = 2; + font = "BitStream"; + SizeEx = 0.025; + colorText[] = {0.1,0.1,0.1,1}; + colorBackground[] = {0.5,0.5,0.5,0.4}; + lineSpacing = 1; +}; + #include "RscDisplay\includes.hpp" //Override BIS Loadscreen diff --git a/SQF/dayz_code/actions/apsiState.sqf b/SQF/dayz_code/actions/apsiState.sqf new file mode 100644 index 000000000..fe0472579 --- /dev/null +++ b/SQF/dayz_code/actions/apsiState.sqf @@ -0,0 +1,42 @@ +/* + This function simulates turning "ItemAPSI_DZE" on and off to protect against EVR storms. + Players need to have post-processing effects enabled in order to see the film grain effects. +*/ + +// Create the particle effect +if (isNil "DZE_APSI_SFX") then { + DZE_APSI_SFX = ppEffectCreate ["filmGrain", 2001]; + DZE_APSI_SFX ppEffectAdjust [0.15, 1, 1, 0.1, 1, false]; + DZE_APSI_SFX ppEffectCommit 0; +}; + +closeDialog 0; + +if (player getVariable["APSIState",false]) then { + player setVariable["APSIState",false]; + playSound "ns_apsi_off"; + DZE_APSI_SFX ppEffectEnable false; + cutRsc ["RscAPSI_Off","PLAIN"]; +} else { + player setVariable["APSIState",true]; + playSound "ns_apsi_on"; + DZE_APSI_SFX ppEffectEnable true; + cutRsc ["RscAPSI_On","PLAIN"]; + + // monitor the player's inventory and turn the effect off if the APSI is removed. + [] spawn { + while {true} do { + uiSleep 1; + if !(player getVariable["APSIState",false]) exitWith { + //diag_log "Player has turned the APSI off"; + }; + if !(player hasWeapon "ItemAPSI_DZE") exitWith { + DZE_APSI_SFX ppEffectEnable false; + playSound "ns_apsi_off"; + player setVariable["APSIState",false]; + //diag_log "Player has removed the APSI from inventory"; + }; + }; + }; +}; + diff --git a/SQF/dayz_code/compile/client_evr.sqf b/SQF/dayz_code/compile/client_evr.sqf new file mode 100644 index 000000000..a33025c42 --- /dev/null +++ b/SQF/dayz_code/compile/client_evr.sqf @@ -0,0 +1,459 @@ +/* + * EVR Storms Client Side Script for DayZ Epoch 1.0.7+ by JasonTM + * Original Blowout Module for Nightstalkers: Shadow of Namalsk by Sumrak + * sumraknightstalkers.cz + * Players must have post processing effects enabled in video options in order to experience the visual effects in this script. +*/ + +fnc_evr = { + local _hasAPSI = (player hasWeapon "ItemAPSI_DZE" && {player getVariable ["APSIState", false]}); + + call { + if (_this == "Stage1") exitWith { + playSound "ns_drone2"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + + uiSleep 4; + + playSound "ns_drone1"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + uiSleep 4; + playSound "ns_misc4"; + }; + + if (_this == "Stage2") exitWith { + if (_hasAPSI) then { + playSound "ns_evrDetect"; + uiSleep 0.2; + playSound "ns_evrDetect"; + uiSleep 0.2; + cutRsc ["RscAPSI","PLAIN"]; + } else { + uiSleep 0.4; + }; + + playSound "ns_drone2"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + + uiSleep 10; + + playSound "ns_drone1"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + }; + + if (_this == "Stage3") exitWith { + if (_hasAPSI) then { + playSound "ns_evrDetect"; + uiSleep 0.2; + playSound "ns_evrDetect"; + uiSleep 0.2; + cutRsc ["RscAPSI_Detected","PLAIN"]; + } else { + uiSleep 0.4; + }; + + playSound "ns_drone2"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + + uiSleep 10; + + playSound "ns_drone1"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + }; + + if (_this == "Stage4") exitWith { + if (_hasAPSI) then { + playSound "ns_evrDetect"; + uiSleep 0.2; + playSound "ns_evrDetect"; + uiSleep 0.2; + //cutRsc ["RscAPSI_Protected","PLAIN"]; + } else { + uiSleep 0.4; + }; + + playSound "ns_drone2"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + + uiSleep 7; + + playSound "ns_drone1"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + }; + + if (_this == "Stage5") exitWith { + if (_hasAPSI) then { + playSound "ns_evrDetect"; + uiSleep 0.2; + playSound "ns_evrDetect"; + uiSleep 0.2; + cutRsc ["RscAPSI_Protected","PLAIN"]; + } else { + uiSleep 0.4; + }; + + playSound "ns_drone2"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + + uiSleep 5; + + playSound "ns_drone1"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + }; + + if (_this == "Stage6") exitWith { + if (_hasAPSI) then { + playSound "ns_evrDetect"; + uiSleep 0.2; + playSound "ns_evrDetect"; + uiSleep 0.2; + } else { + uiSleep 0.4; + }; + + playSound "ns_misc4"; + playSound "ns_drone2"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + + uiSleep 3; + + playSound "ns_drone1"; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.2; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.1; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.25; + "chromAberration" ppEffectEnable false; + }; + + if (_this == "Stage7") exitWith { + + if (_hasAPSI) then { + playSound "ns_evrDetect"; + cutRsc ["RscAPSI_Start","PLAIN"]; + }; + + player setVariable["startcombattimer", 1]; + + playSound "ns_evrBegin"; + "dynamicBlur" ppEffectAdjust [8]; + "dynamicBlur" ppEffectEnable true; + "dynamicBlur" ppEffectCommit 0; + "dynamicBlur" ppEffectAdjust [0.1]; + "dynamicBlur" ppEffectCommit 0.75; + "chromAberration" ppEffectAdjust [0.25,0,true]; + "chromAberration" ppEffectEnable true; + "chromAberration" ppEffectCommit 0.5; + uiSleep 0.5; + "chromAberration" ppEffectAdjust [-0.15,0,true]; + "chromAberration" ppEffectCommit 0.35; + uiSleep 0.5; + "chromAberration" ppEffectAdjust [-0.05,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 0.20; + "chromAberration" ppEffectAdjust [0,0,true]; + "chromAberration" ppEffectCommit 0.20; + uiSleep 1; + "chromAberration" ppEffectEnable false; + "dynamicBlur" ppEffectAdjust [3]; + "dynamicBlur" ppEffectCommit 2.75; + /* + local _effect = ppEffectCreate ["colorCorrections", 1555]; + _effect ppEffectEnable true; + _effect ppEffectAdjust [1.0, 1.0, -0.1, [1.0, 0.2, 0.2, 0.0], [1.0, 0.4, 0.0, 0.1],[1.0,0.3,0.3, 0.5]]; + _effect ppEffectCommit 2; + */ + + uiSleep 5; + + // Define arrays of sound effects + local _hit = ["ns_evrHit1","ns_evrHit2","ns_evrHit3"]; + local _wave = ["ns_evrWave1","ns_evrWave2","ns_evrWave3"]; + #define FLASH titleText["","WHITE OUT",1]; titleText["","WHITE IN",1]; uiSleep 0.25; + + FLASH + playSound (_hit select (round (random 2))); + "dynamicBlur" ppEffectAdjust [3]; + "dynamicBlur" ppEffectCommit 5; + uiSleep 1; + + FLASH + playSound (_hit select (round (random 2))); + "dynamicBlur" ppEffectAdjust [2.4]; + "dynamicBlur" ppEffectCommit 6; + uiSleep 4; + + local _effect = ppEffectCreate ["colorCorrections", 1555]; + _effect ppEffectEnable true; + _effect ppEffectAdjust [1.0, 1.0, -0.1, [1.0, 0.2, 0.2, 0.0], [1.0, 0.4, 0.0, 0.1],[1.0,0.3,0.3, 0.5]]; + _effect ppEffectCommit 2; + + playSound (_wave select (round (random 2))); + uiSleep 0.3; + + FLASH + playSound (_hit select (round (random 2))); + uiSleep 1; + + playSound (_wave select (round (random 2))); + uiSleep 2; + + FLASH + playSound (_hit select (round (random 2))); + uiSleep 1; + + FLASH + playSound (_wave select (round (random 2))); + + if (!_hasAPSI) then { + playSound "ns_evrPsy"; // This is the voices sound file + }; + + uiSleep 4; + FLASH + playSound (_wave select (round (random 2))); + + _effect ppEffectAdjust [1.0, 1.0, -0.1, [1.0, 0.1, 0.1, 0.0], [1.0, 0.1, 0.0, 0.1],[1.0,0.1,0.0, 0.5]]; + _effect ppEffectCommit 6; + uiSleep 1; + + playSound (_hit select (round (random 2))); + uiSleep 3; + + FLASH + playSound (_wave select (round (random 2))); + + _effect ppEffectAdjust [1.0, 1.0, -0.1, [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 5.0],[0.4,0.0,0.0, 0.7]]; + _effect ppEffectCommit 1; + + _hasAPSI = (player hasWeapon "ItemAPSI_DZE" && {player getVariable ["APSIState", false]}); // A player can enable the APSI last minute, so we check just before the knockout. + + // Using this technique from fn_unconscious + disableUserInput true; disableUserInput true; + disableUserInput false; disableUserInput false; + disableUserInput true; disableUserInput true; + + if (player == vehicle player) then { + if (_hasAPSI) then { + player switchMove ""; + [objNull, player, rswitchMove, ""] call RE; + } else { + player switchMove "AcinPercMrunSnonWnonDf_agony"; // knockout animation + [objNull, player, rSwitchMove, "AcinPercMrunSnonWnonDf_agony"] call RE; + }; + }; + + uiSleep 0.1; + playSound "ns_evrFullWave"; + uiSleep 0.1; + titleText["","BLACK OUT",1]; + + if (!_hasAPSI) then { + r_player_inpain = true; + player setVariable["USEC_inPain",true,true]; + if (!dayz_inside) then { + local _blood = r_player_blood - ((DZE_EVRBloodLoss select 0) max random(DZE_EVRBloodLoss select 1)); // Player is not inside a building so reduce blood. + r_player_blood = [_blood,1000] select (_blood < 1000); // Player will have at least 1000 blood. + }; + }; + + uiSleep 1; + 4 fadeSound 0; + uiSleep 10; + 6 fadeSound 1; + titleText["","BLACK IN",10]; + ppEffectDestroy _effect; + + if (DZE_EVRDamageItemsChance > 0) then { + local _items = []; + { + local _tool = _x select 0; + if (player hasWeapon _tool) then { + if (random 1 <= DZE_EVRDamageItemsChance) then { + player removeWeapon _tool; + if !(player hasWeapon (_x select 1)) then { // prevent duplicates + player addWeapon (_x select 1); + }; + _items set [count _items, (getText(configFile >> "CfgWeapons" >> _tool >> "displayName"))]; + }; + }; + } count DZE_EVRDamageItems; + + if (count _items > 0) then { + format[localize "STR_EVR_DAMAGED_ITEMS",_items] call dayz_rollingMessages; + }; + }; + + "dynamicBlur" ppEffectAdjust [0]; + "dynamicBlur" ppEffectCommit 16; + + if (!_hasAPSI) then { + if (player == vehicle player) then { + uiSleep 10; // 10 second knockout. + player switchMove ""; + [objNull, player, rSwitchMove, ""] call RE; + }; + } else { + cutRsc ["RscAPSI_End","PLAIN"]; + }; + + // Using this technique from fn_unconscious + disableUserInput false; disableUserInput false; + disableUserInput true; disableUserInput true; + disableUserInput false; disableUserInput false; + }; + }; +}; + +"PVDZE_EVR" addPublicVariableEventHandler {(_this select 1) spawn fnc_evr;}; \ No newline at end of file diff --git a/SQF/dayz_code/compile/player_humanityMorph.sqf b/SQF/dayz_code/compile/player_humanityMorph.sqf index c4f5b213f..1e52542e7 100644 --- a/SQF/dayz_code/compile/player_humanityMorph.sqf +++ b/SQF/dayz_code/compile/player_humanityMorph.sqf @@ -28,6 +28,7 @@ local _ConfirmedBanditKills = player getVariable ["ConfirmedBanditKills",0]; local _friendlies = player getVariable ["friendlies",[]]; local _tagSetting = player getVariable ["DZE_display_name",false]; local _radiostate = player getVariable ["radiostate",false]; +local _apsiState = player getVariable["APSIState",false]; local _dayz_onBack = player getVariable ["dayz_onBack",""]; local _coins = 0; local _bankCoins = 0; @@ -98,6 +99,7 @@ player setVariable ["ConfirmedBanditKills",_ConfirmedBanditKills,true]; player setVariable ["friendlies",_friendlies,true]; player setVariable ["DZE_display_name",_tagSetting,true]; player setVariable ["radiostate",_radiostate]; +player setVariable ["APSIState",_apsiState]; player setVariable ["dayz_onBack",_dayz_onBack,true]; if (Z_SingleCurrency) then { diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index 50c7f1d54..568a10d3c 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -57,6 +57,9 @@ dayz_groupSystem = false; // Enable group system // Bloodsuckers DZE_Bloodsuckers = false; // Enable bloodsucker spawning. +// EVR Storms +DZE_EVR = false; // Enable EVR storms. + // Bury and Butcher Bodies DZE_Bury_Body = false; // Enable Bury Bodies DZE_Butcher_Body = false; // Enable Butcher Bodies @@ -132,6 +135,12 @@ if (isServer) then { vg_clearAmmo = true; // Clear the ammo of vehicles spawned during the same restart they are stored? (stops users storing a vehicle for a free rearm) vg_sortColumn = 0; //0 or an out of range value sorts by the default column 'DisplayName', otherwise 1 = 'DateStored', 2 = 'id', 3 = 'Name' (of storing player), 4 = 'DateMaintained' }; + + // EVR Storms + if (DZE_EVR) then { + DZE_EVRFirstTime = [15, 60]; // Random time in minutes after server restart to begin the first EVR storm [min, max]. + DZE_EVRTimer = [45, 180]; // Random time in minutes between additional EVR storms [min, max]. + }; }; // Client @@ -520,6 +529,13 @@ if (!isDedicated) then { DZE_MutantHeartProtect = true; // Disables targeting and attack if the player has a mutant heart in inventory. DZE_MutantHumanity = 20; }; + + // EVR Storms + if (DZE_EVR) then { + DZE_EVRDamageItemsChance = .20; // Chance that an EVR storm will damage items in inventory. From 0 to 1. Chance applies to each item. Set to 0 to disable. + DZE_EVRDamageItems = [["Binocular_Vector","Binocular_VectorBroken"],["NVGoggles_DZE","ItemNVGFullBroken_DZE"],["NVGoggles","ItemNVGBroken_DZE"],["ItemGPS","ItemGPSBroken_DZE"],["ItemRadio","ItemRadioBroken_DZE"],["Smartphone_DZE","SmartphoneBroken_DZE"]]; // [item (input), damaged item (output)]. Items that have a chance to be damaged by EMP. + DZE_EVRBloodLoss = [4000,8000]; // Random number of blood loss if a player does not have an APSI and/or is not inside a building [min, max]. Player will not die, there is a minimum of 1000 after the calculation + }; // Garage Door Opener DZE_GarageDoor_Opener = false; // Enables the option to open Garage Doors from the inside of a vehicle. diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index e9d7abb4b..b28b8e92e 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -195,6 +195,8 @@ if (!isDedicated) then { fnc_radioState = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\radioState.sqf"; // Toggle radio on and off fnc_localizeMessage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_localizeMessage.sqf"; fnc_remoteMessage = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_remoteMessage.sqf"; + fnc_apsiState = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\apsiState.sqf"; // Toggle APSI on and off + if (DZE_EVR) then {call compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\client_evr.sqf";}; if (DZE_Remote_Vehicle) then { remoteVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\remoteVehicle\remoteVehicle.sqf"; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 53dbfb223..3bd06132b 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -36973,6 +36973,35 @@ Street Sign + + + + APSI On/Off + + + APSI: Stronger activity of flux field has been detected.. + + + APSI: EVR sequence detected.. + + + APSI: EM and PSI protection enabled.. + + + APSI: Enabled... + + + APSI: Disabled.. + + + APSI: EVR sequence start.. + + + APSI: EVR sequence end.. + + + %1 damaged by the EMP +