diff --git a/CHANGE LOG 1.0.6.2.txt b/CHANGE LOG 1.0.6.2.txt index 84f7d013d..6f13c8cce 100644 --- a/CHANGE LOG 1.0.6.2.txt +++ b/CHANGE LOG 1.0.6.2.txt @@ -1,6 +1,7 @@ [NEW] Added a few loot positions for Namalsk and Takistan. @skigoggles [NEW] Added DZE_limitPlots so admins can limit plot poles to 1 per UID, disabled by default. @oiad [NEW] Pumpkin, sunflower, and hemp plants spawned with createVehicle can be harvested with a knife now. #1928 @F507DMT +[NEW] The journal and dayz_survived variable now contain actual play time [array] instead of days since the character was created [number]. [UPDATED] Zombie pathing. Zeds should now run more direct to players. [UPDATED] The RIS attachment can be removed from the SA58_RIS_DZ now. @LunaCB @@ -41,4 +42,5 @@ [FIXED] Glitch where group icons scaled very large momentarily while moving off screen. [NEW] Added temporary check for mission file overwrite exploit. This can be removed after Bohemia patches it. +[INFO] HiveExt.dll has been updated to return character_data duration in the 101 call for the dayz_survived stat. Source is available at github.com/vbawol/DayZhiveEpoch/pull/13 @icomrade [INFO] See Documents\CHANGE LOG 1.0.6.txt for the full list of 1.0.5.1 --> 1.0.6 changes. \ No newline at end of file diff --git a/SQF/dayz_code/actions/playerstats/epeen_setText_journal.sqf b/SQF/dayz_code/actions/playerstats/epeen_setText_journal.sqf index ec3b23a91..ef14bd3a8 100644 --- a/SQF/dayz_code/actions/playerstats/epeen_setText_journal.sqf +++ b/SQF/dayz_code/actions/playerstats/epeen_setText_journal.sqf @@ -1,4 +1,4 @@ -private ["_ys","_ms","_ds","_b","_2","_6","_7","_8","_9","_10","_str_left_text","_1","_3","_4","_5","_blood_in_pack","_blood_in_inv","_mag_arr","_backpack","_11","_mags_for_weap","_mssv_cnt","_weapon","_config","_survivors","_moon","_spawnselection","_disabledTemperature"]; +private ["_currentTime","_totalMins","_days","_hours","_mins","_ys","_ms","_ds","_b","_2","_6","_7","_8","_9","_10","_str_left_text","_1","_3","_4","_5","_blood_in_pack","_blood_in_inv","_mag_arr","_backpack","_11","_mags_for_weap","_mssv_cnt","_weapon","_config","_survivors","_moon","_spawnselection","_disabledTemperature"]; _survivors = playersNumber west; _str_left_text = " @@ -20,223 +20,15 @@ _1 = name player; dayz_currentGlobalZombies = count entities "zZombie_Base"; -/* -if (player hasWeapon "ItemWatch") then -{ - if (dayz_Survived == Dayz_logonDate) then // only interested if the same - assume server will only run over one day before restart - { - switch (true) do - { - case (Dayz_logonTime > 20): {_2 = (localize "str_playerstats_journal_1_a")}; - case (Dayz_logonTime > 17): {_2 = (localize "str_playerstats_journal_1_b")}; - case (Dayz_logonTime > 12): {_2 = (localize "str_playerstats_journal_1_c")}; - default {_2 = (localize "str_playerstats_journal_1_d")}; - }; - } else - { - switch (true) do - { - case (Dayz_logonTime > 20): {_2 = (localize "str_playerstats_journal_1_e")}; - case (Dayz_logonTime > 17): {_2 = (localize "str_playerstats_journal_1_f")}; - case (Dayz_logonTime > 12): {_2 = (localize "str_playerstats_journal_1_g")}; - default {_2 = (localize "str_playerstats_journal_1_h")}; - }; - }; -} else -{ - _2 = (localize "str_playerstats_journal_1_i"); -}; - -_3 = Dayz_logonTown; - -_4 = worldName; - -_ys = str (date select 0); -_ms = ""; -_ds = str (date select 2); - -switch (true) do -{ - case (date select 1 == 1):{_ms = (localize "str_playerstats_journal_month_1")}; - case (date select 1 == 2):{_ms = (localize "str_playerstats_journal_month_2")}; - case (date select 1 == 3):{_ms = (localize "str_playerstats_journal_month_3")}; - case (date select 1 == 4):{_ms = (localize "str_playerstats_journal_month_4")}; - case (date select 1 == 5):{_ms = (localize "str_playerstats_journal_month_5")}; - case (date select 1 == 6):{_ms = (localize "str_playerstats_journal_month_6")}; - case (date select 1 == 7):{_ms = (localize "str_playerstats_journal_month_7")}; - case (date select 1 == 8):{_ms = (localize "str_playerstats_journal_month_8")}; - case (date select 1 == 9):{_ms = (localize "str_playerstats_journal_month_9")}; - case (date select 1 == 10):{_ms =(localize "str_playerstats_journal_month_10")}; - case (date select 1 == 11):{_ms =(localize "str_playerstats_journal_month_11")}; - case (date select 1 == 12):{_ms =(localize "str_playerstats_journal_month_12")}; -}; - -_5 = format[localize "str_playerstats_journal_2_date", _ds, _ms, _ys]; - -// can't test dayz_Survived at home - -switch (true) do -{ - case (dayz_Survived == 0): {_6 = (localize "str_playerstats_journal_2_info_1")}; - case (dayz_Survived == 1): {_6 = (localize "str_playerstats_journal_2_info_2")}; - case (dayz_Survived > 1): {_6 = format [localize "str_playerstats_journal_2_info_3", dayz_Survived]}; - default {}; -}; - -switch (true) do -{ - case (!r_fracture_legs and !r_fracture_arms): {_7 = (localize "str_playerstats_journal_3_1")}; - case (r_fracture_legs and r_fracture_arms): {_7 = (localize "str_playerstats_journal_3_2")}; - case (r_fracture_legs): {_7 = (localize "str_playerstats_journal_3_3")}; - case (r_fracture_arms): {_7 = (localize "str_playerstats_journal_3_4")}; - default {}; -}; - -switch (true) do -{ - case (r_player_infected): - { - if (!r_fracture_legs and !r_fracture_arms) then - { - _8 = (localize "str_playerstats_journal_4_1"); - } else - { - _8 = (localize "str_playerstats_journal_4_2"); - }; - }; - default {_8 = ""}; -}; - -if (r_fracture_legs or r_fracture_arms) then -{ - switch (true) do - { - case (r_player_blood < 3000): {_9 = (localize "str_playerstats_journal_5_1")}; - case (r_player_blood < 6000): {_9 = (localize "str_playerstats_journal_5_2")}; - case (r_player_blood < 9000): {_9 = (localize "str_playerstats_journal_5_3")}; - case (r_player_blood < 11000): {_9 = (localize "str_playerstats_journal_5_4")}; - case (r_player_blood == 12000): {_9 = (localize "str_playerstats_journal_5_5")}; - default {_9 = "."}; - }; -}else -{ - switch (true) do - { - case (r_player_blood < 3000): {_9 = (localize "str_playerstats_journal_5_6")}; - case (r_player_blood < 6000): {_9 = (localize "str_playerstats_journal_5_7")}; - case (r_player_blood < 9000): {_9 = (localize "str_playerstats_journal_5_8")}; - case (r_player_blood < 11000): {_9 = (localize "str_playerstats_journal_5_9")}; - case (r_player_blood == 12000): - { - if (r_player_infected) then - { - _9 = (localize "str_playerstats_journal_5_10"); - } else - { - _9 = (localize "str_playerstats_journal_5_11"); - }; - }; - default {_9 = "."}; - }; -}; - -_blood_in_pack = false; -_backpack = unitBackpack player; - -if (!isNull _backpack) then -{ - _mag_arr = getMagazineCargo _backpack; - if ("ItemBloodbag" in (_mag_arr select 0)) then - { - _blood_in_pack = true; - }; -}; -_blood_in_inv = false; - -if ("ItemBloodbag" in (magazines player)) then -{ - _blood_in_inv = true; -}; - -_10 = ""; - -if (r_player_blood < 9000 and (_blood_in_inv or _blood_in_pack)) then -{ - if (_blood_in_inv) then - { - _10 = (localize "str_playerstats_journal_6_1"); - } else - { - _10 = (localize "str_playerstats_journal_6_2"); - }; -}; -if (r_player_blood < 9000 and ! _blood_in_inv and ! _blood_in_pack) then -{ - _10 = (localize "str_playerstats_journal_6_3"); -}; - -_11 = ""; - -_weapon = currentWeapon player; -_config = configFile >> "CfgWeapons"; - -// possibly filter out torch and the dayz_throwweapon thingy too. Need to get feedback.. - -if (_weapon != "" and _weapon != "Throw" and _weapon != "Put" and _weapon != "Flare") then -{ - switch (true) do - { - case (getText (_config >> _weapon >> "melee") == "true"): // used getText as config entry had "" marks around it. - { - _11 = format [localize "str_playerstats_journal_7_1", getText (_config >> _weapon >> "displayName")]; - }; - case (_weapon == "ItemFlashlight" or _weapon == "ItemFlashlightRed"): - { - if (sunOrMoon == 1) then - { - _11 = format [localize "str_playerstats_journal_7_2", getText (_config >> _weapon >> "displayName")]; - } else - { - _11 = format [localize "str_playerstats_journal_7_3", getText (_config >> _weapon >> "displayName")]; - }; - }; - case (_weapon == "Makarov"): - { - _11 = format [localize "str_playerstats_journal_7_4", getText (_config >> _weapon >> "displayName")]; - }; - default - { - _mags_for_weap = getArray (_config >> _weapon >> "magazines"); - - _mssv_cnt = false; - { - if (_x in _mags_for_weap) then - { - _mssv_cnt = true; - }; - } forEach (magazines player); - - if (_mssv_cnt) then - { - if (player ammo _weapon > 0) then - { - _11 = format [localize "str_playerstats_journal_7_5", getText (configFile >> "CfgWeapons" >> _weapon >> "displayName")]; - } else - { - _11 = format [localize "str_playerstats_journal_7_6", getText (configFile >> "CfgWeapons" >> _weapon >> "displayName")]; - }; - } else - { - _11 = format [localize "str_playerstats_journal_7_7", getText (_config >> _weapon >> "displayName")]; - }; - }; - }; -} else -{ - _11 = (localize "str_playerstats_journal_7_8"); -}; - -*/ +//Work out survival time +_currentTime = floor (dayz_sessionTime / 60); +_totalMins = (player getVariable "SurvivalTime") + _currentTime; +_days = floor (_totalMins / 1440); +_totalMins = (_totalMins - (_days * 1440)); +_hours = floor (_totalMins / 60); +_mins = (_totalMins - (_hours * 60)); + +dayz_Survived = [_days,_hours,_mins,_totalMins]; _moon = if (dayz_ForcefullmoonNights) then { "Yes" } else { "No" }; @@ -266,7 +58,7 @@ _disabledTemperature = switch (dayz_temperature_override) do { SpawnSelection: %4
Full Moon: %12

- Survived: %8 Day(s)
+ Survived: %8 Day(s), %15 Hour(s), %16 Minute(s)

Survivors:%9

@@ -279,13 +71,15 @@ _disabledTemperature = switch (dayz_temperature_override) do { (round(dayz_temperatur)), (round(player getVariable['humanity', 0])), (dayz_currentGlobalZombies), - (dayz_Survived), + (dayz_Survived select 0), (_survivors), (round diag_fps), (round diag_fpsmin), (_moon), (_disabledTemperature), - (dayz_presets) + (dayz_presets), + (dayz_Survived select 1), + (dayz_Survived select 2) ]; // right page - blank until humanity is checked diff --git a/SQF/dayz_code/compile/player_humanityMorph.sqf b/SQF/dayz_code/compile/player_humanityMorph.sqf index e170141ae..18fb21543 100644 --- a/SQF/dayz_code/compile/player_humanityMorph.sqf +++ b/SQF/dayz_code/compile/player_humanityMorph.sqf @@ -1,4 +1,4 @@ -private ["_charID","_newmodel","_old","_updates","_humanity","_medical","_worldspace","_zombieKills","_headShots","_humanKills","_combattimeout","_inCombat","_banditKills","_fractures","_wpnType","_ismelee","_coins","_bankCoins","_globalCoins"]; +private ["_charID","_newmodel","_old","_updates","_humanity","_medical","_worldspace","_zombieKills","_headShots","_humanKills","_combattimeout","_inCombat","_banditKills","_fractures","_wpnType","_ismelee","_survivalTime","_coins","_bankCoins","_globalCoins"]; //_playerUID = _this select 0; _charID = _this select 1; _model = _this select 2; @@ -25,6 +25,7 @@ _banditKills = player getVariable ["banditKills",0]; //_achievements = player getVariable ["Achievements",[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]; _combattimeout = player getVariable["combattimeout",0]; _inCombat = player getVariable ["inCombat",false]; +_survivalTime = player getVariable ["SurvivalTime",0]; _ConfirmedHumanKills = player getVariable ["ConfirmedHumanKills",0]; _ConfirmedBanditKills = player getVariable ["ConfirmedBanditKills",0]; _friendlies = player getVariable ["friendlies",[]]; @@ -90,7 +91,7 @@ player setVariable ["worldspace",_worldspace]; //player setVariable ["Achievements",_achievements]; player setVariable ["combattimeout",_combattimeout,false]; player setVariable ["inCombat",_inCombat,true]; - +player setVariable ["SurvivalTime",_survivalTime,false]; player setVariable ["ConfirmedHumanKills",_ConfirmedHumanKills,true]; player setVariable ["ConfirmedBanditKills",_ConfirmedBanditKills,true]; player setVariable ["friendlies",_friendlies,true]; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 682fb8da6..2eff83cbe 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -665,6 +665,7 @@ if (!isDedicated) then { Dayz_freefall = [ time, 0, 0.1 ]; dayz_getoutTime = 0; dayz_hitByTime = 0; + dayz_sessionTime = 0; //Approximate time elapsed since login in seconds skipGearSound = false; TimeOutDisplayed = false; voice_actions = ["voiceOverNet","PushToTalk","PushToTalkAll","PushToTalkCommand","PushToTalkDirect","PushToTalkGroup","PushToTalkSide","PushToTalkVehicle"]; diff --git a/SQF/dayz_code/system/player_monitor.fsm b/SQF/dayz_code/system/player_monitor.fsm index 772209bd8..a1d935213 100644 --- a/SQF/dayz_code/system/player_monitor.fsm +++ b/SQF/dayz_code/system/player_monitor.fsm @@ -846,12 +846,14 @@ class FSM "};" \n "" \n "//Work out survival time" \n - "_totalMins = _survival select 0;" \n + "_totalMins = _survival select 3;" \n "_days = floor (_totalMins / 1440);" \n "_totalMins = (_totalMins - (_days * 1440));" \n "_hours = floor (_totalMins / 60);" \n "_mins = (_totalMins - (_hours * 60));" \n "" \n + "player setVariable [""SurvivalTime"",(_survival select 3),false];" \n + "" \n "//player variables" \n "dayz_characterID = _charID;" \n "dayz_hasFire = objNull; //records players Fireplace object" \n @@ -860,7 +862,7 @@ class FSM "dayz_lastMeal = (_lastAte * 60);" \n "dayz_lastDrink = (_lastDrank * 60);" \n "dayz_zombiesLocal = 0; //Used to record how many local zombies being tracked" \n - "dayz_Survived = _days; //total alive dayz" \n + "dayz_Survived = [_days,_hours,_mins,(_survival select 3)]; //total alive dayz" \n "" \n "//load in medical details" \n "r_player_dead = player getVariable[""USEC_isDead"",false];" \n @@ -1166,7 +1168,7 @@ class FSM "dayz_musicH = [] spawn player_music;" \n "dayz_slowCheck = [] spawn player_spawn_2;" \n "Dayz_logonTime = daytime;" \n - "Dayz_logonDate = dayz_Survived;" \n + "Dayz_logonDate = floor ((_survival select 0) / 1440);" \n "_position = getPosATL player;" \n "_radius = 200;" \n "//Current amounts" \n @@ -1957,7 +1959,7 @@ class FSM "Dayz_logonTown = ""Wilderness"";" \n "if (count _nearestCity > 0) then {Dayz_logonTown = text (_nearestCity select 0)};" \n "" \n - "[_world,Dayz_logonTown,format[localize ""str_player_06"",dayz_Survived]] spawn {uiSleep 5; _this spawn BIS_fnc_infoText;};" \n + "[_world,Dayz_logonTown,format[localize ""str_player_06"",(floor ((_survival select 0) / 1440))]] spawn {uiSleep 5; _this spawn BIS_fnc_infoText;};" \n "" \n "dayz_myPosition = getPosATL player;" \n "Dayz_loginCompleted = true;" \n diff --git a/SQF/dayz_code/system/scheduler/sched_medical.sqf b/SQF/dayz_code/system/scheduler/sched_medical.sqf index acf698a4c..840e7afd0 100644 --- a/SQF/dayz_code/system/scheduler/sched_medical.sqf +++ b/SQF/dayz_code/system/scheduler/sched_medical.sqf @@ -58,6 +58,8 @@ sched_medical = { // 1 second } else { [] spawn fnc_usec_playerHandleBlood; }; + + dayz_sessionTime = dayz_sessionTime + 1; [_unconHdlr] }; diff --git a/SQF/dayz_server/compile/server_playerLogin.sqf b/SQF/dayz_server/compile/server_playerLogin.sqf index 6fa45d8c1..af75c727d 100644 --- a/SQF/dayz_server/compile/server_playerLogin.sqf +++ b/SQF/dayz_server/compile/server_playerLogin.sqf @@ -14,7 +14,7 @@ if (isNil "sm_done") exitWith { diag_log ("Login cancelled, server is not ready. _inventory = []; _backpack = []; -_survival = [0,0,0]; +_survival = [0,0,0,0]; _model = ""; _isInfected = 0; _CharacterCoins = 0;