diff --git a/Changelogs/0.6.0.0.txt b/Changelogs/0.6.0.0.txt index e17ad0e4..4cc1d272 100644 --- a/Changelogs/0.6.0.0.txt +++ b/Changelogs/0.6.0.0.txt @@ -1,35 +1,22 @@ -== WIP == -[Added] Md5 hash function 840 to hive. See use example with EPOCH_fnc_server_hiveMD5 SQF function. - Usage Examples: - _hash = "Hello World" call EPOCH_fnc_server_hiveMD5; - // _hash = "b10a8db164e0754105b7a99be72e3fe5" - or multiple: - _hashes = ["Hello World","Lorem Ipsum"] call EPOCH_fnc_server_hiveMD5; - // _hashes = ["b10a8db164e0754105b7a99be72e3fe5", "6dbd01b4309de2c22b027eb35a3ce18b"] +## [0.6.0.0] - TBA +### Added +- Vector Base Building (uses Arrow keys by default and with SHIFT / ALT you can control the steps). @DirtySanchez & @Ignatz-Heman +- Base Building elements can be detached to walk around the Element before saving. @Ignatz-Heman +- Helper arrow to indicate door-opening direction for Base Building. @Ignatz-Heman +- Option to drink directly from water sources. @Ignatz-HeMan +- Epoch Events 3.0: Allow external events based on server side configs and pbos. New server side events can be added just dropping the pbo into @epochhive/addons folder. To make your own use Dynamic Debris Event as a template. +- Dynamic Debris: Dynamically spawns vehicle and other debris on the roadways. Scans the roads on startup and uses a random seed generator to determine the locations of debris. Debris is spawned using createSimpleObject for best performance and is made to conform with the upper most roadway surface. +- Epoch Dev Libs, See https://github.com/EpochModTeam/Epoch/tree/experimental/Tools/DevFrameWork for more info. @raymix +- Md5 hash function and Unit test to hive. See usage example with EPOCH_fnc_server_hiveMD5 SQF function. -[Added] Option to drink from predetermined sources. @Ignatz-HeMan +### Fixed +- Base Building 90° and 270° Snap was broken. +- Sometimes snapped Base Building elements rotated back on save. +- BE kick since 1.70. -[Added] Epoch Events 3.0: Allow external events based on server side configs and pbos. - -New server side events can be added just dropping the pbo into @epochhive/addons folder. -To make your own use Dynamic Debris Event as a template. - -[Added] Dynamic Debris Epoch Event. Dynamically spawns vehicle and other debris on the roadways. -Scans the roads on startup and uses a random seed generator to determine the locations of debris. -Debris is spawned using createSimpleObject and is made to conform with the upper most roadway surface. - -[Added] Epoch Dev Libs by @raymix - -[Fixed] BE kick since 1.70. - -[Changed] Reworked Basebuilding Script. @DirtySanchez & @Ignatz-Heman - - Added Vecorbuilding (with arrow keys by default) - - Added: Building element can be detached to walk around the Element before saving - - Added: With SHIFT / ALT you can control the steps of building placement while building - - Added: Help-Arrow to indicate door-opening direction - - Added: Max building height now will be checked direcly by building element placement - - Changed: Replaced 0/90/180/270° direction build mode with "Rotate 90°" - - Fixed: 90° and 270° Snap was broken - - Fixed: Sometimes Snapped elements rotate back on save - -[Info] Server requires epochserver(_x64).dll/so hive extension updates. +### Changed +- Base Building: Replaced 0/90/180/270° direction build mode with "Rotate 90°". @Ignatz-Heman +- Base Building: Max building height now will be checked directly at building element placement. @Ignatz-Heman +- Separated Hunger and Thirst loss values to baseHungerLoss/baseThirstLoss and removed baseHTLoss from CfgEpochClient. +- Hunger and Thirst loss rates are now effected by timeMultiplier. +- Bump to hive version 0.6.0.0, Note: this requires epochserver(_x64).dll/so hive extension updates server side. diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server.pbo index ae8c62bf..6d8ddd3b 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo index c410b053..5a5f5eeb 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_debris_event.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_debris_event.pbo index a49894f9..10d3d9aa 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_debris_event.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_debris_event.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_events.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_events.pbo index 6578661f..ee46bebd 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_events.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_events.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo index 1408cdb0..271b3426 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_settings.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Altis.pbo b/Server_Install_Pack/mpmissions/epoch.Altis.pbo index a194ce84..41d2bdb4 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Altis.pbo and b/Server_Install_Pack/mpmissions/epoch.Altis.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Australia.pbo b/Server_Install_Pack/mpmissions/epoch.Australia.pbo index 95d18dad..432d5da8 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Australia.pbo and b/Server_Install_Pack/mpmissions/epoch.Australia.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo index 32889fd6..8cc0f78c 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo index cea19ec5..38742156 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo and b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo index e98c28a4..0691c0cc 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo and b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo index fbdb1185..de453cfd 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo and b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo index 1e7b9399..557d767e 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo and b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo index 8957f21e..84eecdb8 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo and b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo index a8e8118b..16905553 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Napf.pbo b/Server_Install_Pack/mpmissions/epoch.Napf.pbo index 19729579..79c4a9a3 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Napf.pbo and b/Server_Install_Pack/mpmissions/epoch.Napf.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Porto.pbo b/Server_Install_Pack/mpmissions/epoch.Porto.pbo index 3e8922c1..a104236a 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Porto.pbo and b/Server_Install_Pack/mpmissions/epoch.Porto.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo index 028fd23b..66296459 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo and b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Sara.pbo b/Server_Install_Pack/mpmissions/epoch.Sara.pbo index b13dfe0e..8c067bbf 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Sara.pbo and b/Server_Install_Pack/mpmissions/epoch.Sara.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo index 64c56bf2..c08431ee 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo and b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo index 552c8be7..890620d7 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo and b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo index 080ca1bd..77547668 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo and b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo index 3a1a01e0..83f542cb 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo and b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo index 8fe71240..30e038ec 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo and b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo b/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo index 3a3eddf7..f97a7f2e 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo and b/Server_Install_Pack/mpmissions/epoch.Tanoa.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.VR.pbo b/Server_Install_Pack/mpmissions/epoch.VR.pbo index 355a39eb..8c4ff2ef 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.VR.pbo and b/Server_Install_Pack/mpmissions/epoch.VR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo index cd5777b9..d3db17a4 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo and b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo index 98134c67..129f2206 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo and b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.utes.pbo b/Server_Install_Pack/mpmissions/epoch.utes.pbo index c2ee4c0e..5b46602b 100644 Binary files a/Server_Install_Pack/mpmissions/epoch.utes.pbo and b/Server_Install_Pack/mpmissions/epoch.utes.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch_RyanZed.Tanoa.pbo b/Server_Install_Pack/mpmissions/epoch_RyanZed.Tanoa.pbo index 9f6b1ea0..489ff68c 100644 Binary files a/Server_Install_Pack/mpmissions/epoch_RyanZed.Tanoa.pbo and b/Server_Install_Pack/mpmissions/epoch_RyanZed.Tanoa.pbo differ diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf index b0b5cfda..7f72b2f6 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event2.sqf @@ -79,17 +79,21 @@ if !(_attackers isEqualTo[]) then { call EPOCH_fnc_Weather; // Hunger / Thirst -_HTlossRate = _baseHTLoss; +_hungerlossRate = _baseHungerLoss * timeMultiplier; +_thirstlossRate = _baseThirstLoss * timeMultiplier; + +// Increase hunger if player is Fatigued if (EPOCH_playerStamina < 100) then { if ((getFatigue player) > 0) then { - _HTlossRate = _HTlossRate + (_HTlossRate*(getFatigue player)); + _hungerlossRate = _hungerlossRate + (_hungerlossRate*(getFatigue player)); }; } else { - _HTlossRate = (_HTlossRate / 2); + // reduce hunger loss if player stamina is greater than 100 + _hungerlossRate = (_hungerlossRate / 2); }; -EPOCH_playerHunger = (EPOCH_playerHunger - _HTlossRate) max 0; -EPOCH_playerThirst = (EPOCH_playerThirst - _HTlossRate) max 0; +EPOCH_playerHunger = (EPOCH_playerHunger - _hungerlossRate) max 0; +EPOCH_playerThirst = (EPOCH_playerThirst - _thirstlossRate) max 0; call _lootBubble; diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event7.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event7.sqf index 6475d6e0..75657c38 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event7.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event7.sqf @@ -1,13 +1,13 @@ _spawnChance = ((EPOCH_playerNuisance + EPOCH_playerSoiled)/2) max 1; -if (random EPOCH_droneRndChance < _spawnChance) then { +if (random _droneRndChance < _spawnChance) then { "I_UAV_01_F" call EPOCH_unitSpawnIncrease; }; if (EPOCH_mod_Ryanzombies_Enabled) then { - if (random EPOCH_zombieRngChance < _spawnChance) then { + if (random _zombieRngChance < _spawnChance) then { ["EPOCH_RyanZombie_1",12] call EPOCH_unitSpawnIncrease; }; }; -if (random EPOCH_sapperRndChance < _spawnChance) then { +if (random _sapperRndChance < _spawnChance) then { "Epoch_Sapper_F" call EPOCH_unitSpawnIncrease; }; // diag_log format["DEBUG: _spawnChance %1",_spawnChance]; diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index 744bc874..c58938af 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -19,10 +19,11 @@ _panic = false; _prevEnergy = EPOCH_playerEnergy; // init config data -EPOCH_sapperRndChance = ["CfgEpochClient", "sapperRngChance", 100] call EPOCH_fnc_returnConfigEntryV2; -EPOCH_zombieRngChance = ["CfgEpochClient", "zombieRngChance", 50] call EPOCH_fnc_returnConfigEntryV2; -EPOCH_droneRndChance = ["CfgEpochClient", "droneRngChance", 100] call EPOCH_fnc_returnConfigEntryV2; -_baseHTLoss = ["CfgEpochClient", "baseHTLoss", 8] call EPOCH_fnc_returnConfigEntryV2; +_sapperRndChance = ["CfgEpochClient", "sapperRngChance", 100] call EPOCH_fnc_returnConfigEntryV2; +_zombieRngChance = ["CfgEpochClient", "zombieRngChance", 50] call EPOCH_fnc_returnConfigEntryV2; +_droneRndChance = ["CfgEpochClient", "droneRngChance", 100] call EPOCH_fnc_returnConfigEntryV2; +_baseHungerLoss = ["CfgEpochClient", "baseHungerLoss", 2] call EPOCH_fnc_returnConfigEntryV2; +_baseThirstLoss = ["CfgEpochClient", "baseThirstLoss", 2] call EPOCH_fnc_returnConfigEntryV2; _energyCostNV = ["CfgEpochClient", "energyCostNV", 3] call EPOCH_fnc_returnConfigEntryV2; _energyRegenMax = ["CfgEpochClient", "energyRegenMax", 5] call EPOCH_fnc_returnConfigEntryV2; _energyRange = ["CfgEpochClient", "energyRange", 75] call EPOCH_fnc_returnConfigEntryV2; @@ -140,13 +141,13 @@ _EPOCH_BuildTraderMisson = { _taskTitle = getText ( _inGameTasksconfig >> _taskName >> "title"); _taskSQF = getText ( _inGameTasksconfig >> _taskName >> "initsqf"); if !(_taskSQF isequalto '') then { - call compile format ["[_taskName,player,_unit,_taskItem] execVM ""%1""",_taskSQF]; + call compile format ["[_taskName,player,_unit,_taskItem] execVM ""%1""",_taskSQF]; }; _taskCall = getText ( _inGameTasksconfig >> _taskName >> "initcall"); if !(_taskCall isequalto '') then { call compile _taskCall; }; - + _taskDelay = diag_ticktime + (getNumber ( _inGameTasksconfig >> _taskName >> "triggerDelay")); _triggerintervall = getNumber ( _inGameTasksconfig >> _taskName >> "triggerintervall"); _taskItems = getArray ( _inGameTasksconfig >> _taskName >> "items"); @@ -179,7 +180,7 @@ _EPOCH_BuildTraderMisson = { if(_taskMarkerType == 2)then{ _markerPos set [0, (_markerPos select 0) + (floor (random _taskMarkerRad) - (_taskMarkerRad / 2))]; _markerPos set [1, (_markerPos select 1) + (floor (random _taskMarkerRad) - (_taskMarkerRad / 2))]; - }; + }; [[_taskMarkerVis,player],_markerPos,"ELLIPSE","mil_dot",_taskMarkerText,"ColorYellow",[_taskMarkerRad,_taskMarkerRad], "SolidBorder", 42, 0.6,_mkrName] remoteExec ["EPOCH_server_makeMarker",2]; }; _taskDialogues = []; @@ -203,13 +204,13 @@ _EPOCH_BuildTraderMisson = { _taskFailedSQF = getText ( _inGameTasksconfig >> _taskName >> "failedSQF"); _taskFailedCall = compile getText ( _inGameTasksconfig >> _taskName >> "failedCall"); _nextTask = getArray ( _inGameTasksconfig >> _taskName >> "failedTask"); - + _taskCompleteCond = compile getText ( _inGameTasksconfig >> _taskName >> "completeCondition"); _taskReward = getArray ( _inGameTasksconfig >> _taskName >> "reward"); _taskCompleteDiags = getArray ( _inGameTasksconfig >> _taskName >> "completedialogues"); _taskCompleteCall = compile getText ( _inGameTasksconfig >> _taskName >> "completedCALL"); _taskNextTrigger = getArray ( _inGameTasksconfig >> _taskName >> "nextTask"); - + _missionCleanUpCall = compile getText ( _inGameTasksconfig >> _taskName >> "cleanUpCall"); _taskCleanup = getNumber ( _inGameTasksconfig >> _taskName >> "cleanUp"); _return = [ diff --git a/Sources/epoch_code/init/client_init.sqf b/Sources/epoch_code/init/client_init.sqf index e4b10a48..fc377461 100644 --- a/Sources/epoch_code/init/client_init.sqf +++ b/Sources/epoch_code/init/client_init.sqf @@ -62,10 +62,6 @@ rmx_var_dynamicHUD_groupCTRL = []; ["EPOCH_onEachFrame", "onEachFrame", EPOCH_onEachFrame] call BIS_fnc_addStackedEventHandler; -EPOCH_droneRndChance = 100; -EPOCH_sapperRndChance = 100; -EPOCH_zombieRngChance = 50; - // Custom Keys EPOCH_keysActionPressed = false; //prevents EH spam 0 call EPOCH_clientKeyMap; diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index 848b2dc9..6801646a 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -20,6 +20,9 @@ class CfgEpochClient droneRngChance = 100; // increase number to reduce chances and reduce to increase. Default 100 zombieRngChance = 50; // increase number to reduce chances and reduce to increase. Default 50 + baseHungerLoss = 2; // increase number to speed up rate of Hunger loss + baseThirstLoss = 2; // increase number to speed up rate of Thirst loss + buildingNearbyMilitary = 0; //1 to allow building nearby buildingNearbyMilitaryRange = 300; //Define radius of blocked area buildingNearbyMilitaryClasses[] = {"Cargo_Tower_base_F","Cargo_HQ_base_F","Cargo_Patrol_base_F","Cargo_House_base_F"}; diff --git a/Sources/epoch_config/build.hpp b/Sources/epoch_config/build.hpp index 35e7aee9..bf31a6ab 100644 --- a/Sources/epoch_config/build.hpp +++ b/Sources/epoch_config/build.hpp @@ -1 +1 @@ -build=777; +build=780; diff --git a/Sources/epoch_server/build.hpp b/Sources/epoch_server/build.hpp index 35e7aee9..bf31a6ab 100644 --- a/Sources/epoch_server/build.hpp +++ b/Sources/epoch_server/build.hpp @@ -1 +1 @@ -build=777; +build=780; diff --git a/Sources/epoch_server/treeView.txt b/Sources/epoch_server/treeView.txt index 5eed3d1b..0bc92b8a 100644 Binary files a/Sources/epoch_server/treeView.txt and b/Sources/epoch_server/treeView.txt differ diff --git a/Sources/epoch_server_core/build.hpp b/Sources/epoch_server_core/build.hpp index da965143..bf31a6ab 100644 --- a/Sources/epoch_server_core/build.hpp +++ b/Sources/epoch_server_core/build.hpp @@ -1 +1 @@ -build=778; +build=780; diff --git a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveMD5.sqf b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveMD5.sqf index 6afedbcd..dc9df70c 100644 --- a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveMD5.sqf +++ b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveMD5.sqf @@ -12,6 +12,14 @@ Github: https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveMD5.sqf + + Usage Examples: + _hash = "Hello World" call EPOCH_fnc_server_hiveMD5; + // _hash = "b10a8db164e0754105b7a99be72e3fe5" + or multiple: + _hashes = ["Hello World","Lorem Ipsum"] call EPOCH_fnc_server_hiveMD5; + // _hashes = ["b10a8db164e0754105b7a99be72e3fe5", "6dbd01b4309de2c22b027eb35a3ce18b"] + */ params ["_val"]; if (_this isEqualType []) then { diff --git a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveUnitTest.sqf b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveUnitTest.sqf index eaf7a720..75bc7186 100644 --- a/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveUnitTest.sqf +++ b/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveUnitTest.sqf @@ -13,7 +13,7 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_core/compile/epoch_hive/fn_server_hiveUnitTest.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_charCheck","_expires","_payload","_payload_64k","_payload_64k_count","_response","_startTime","_testID"]; +private ["_charCheck","_expires","_hashes","_payload","_payload_64k","_payload_64k_count","_response","_startTime","_testID"]; //[[[end]]] _testID = "1234567890"; _payload = "32D1ECB8511569B43A5CC39DF4261CACDA912C798B066EE1E1EE06E2F09D02073C1B3FC638F091D58E7691DA7D0F7E1F01371CB58346572A015F6F93429F3BDC"; @@ -147,3 +147,9 @@ diag_log format ["Epoch UnitTest: EPOCH_fnc_server_hiveLog Time: %2 : %1 ", _res _startTime = diag_tickTime; _response = ['TEST_LOG', _payload_64k] call EPOCH_fnc_server_hiveLog; diag_log format ["Epoch UnitTest: EPOCH_fnc_server_hiveLog 64k Time: %2 : %1 ", _response, (diag_tickTime-_startTime)]; + +// MD5 HASH +_hashes = ["Hello World","Lorem Ipsum"] call EPOCH_fnc_server_hiveMD5; +// _hashes = ["b10a8db164e0754105b7a99be72e3fe5", "6dbd01b4309de2c22b027eb35a3ce18b"] +_charCheck = _hashes isEqualTo ["b10a8db164e0754105b7a99be72e3fe5", "6dbd01b4309de2c22b027eb35a3ce18b"]; +diag_log format ["Epoch UnitTest: EPOCH_fnc_server_hiveMD5 Time: %2 : %1 ", ["isOK:",_charCheck], (diag_tickTime-_startTime)]; diff --git a/Sources/epoch_server_debris_event/EpochEvents/DynamicDebris.sqf b/Sources/epoch_server_debris_event/EpochEvents/DynamicDebris.sqf index 2ced8bf9..8fe1f035 100644 --- a/Sources/epoch_server_debris_event/EpochEvents/DynamicDebris.sqf +++ b/Sources/epoch_server_debris_event/EpochEvents/DynamicDebris.sqf @@ -9,9 +9,9 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server_settings/EpochEvents/DebrisSpawner.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_allRoads","_debris","_debrisCounter","_debrisLocations","_debrisLocationsKey","_expiresDebris","_export","_hiveKey","_instanceID","_intersections","_marker","_maxDebrisLimit","_object","_offsetX","_offsetY","_position","_response","_rng","_seed","_selectedDebris","_worldSize"]; +private ["_allRoads","_allowDebris","_debris","_debrisCounter","_debrisLocations","_debrisLocationsKey","_debrisLocationsTMP","_debug","_expiresDebris","_export","_instanceID","_intersections","_marker","_maxDebrisLimit","_newDebrisCounter","_object","_offsetX","_offsetY","_position","_response","_rng","_rngChance","_scriptHiveKey","_seed","_selectedDebris","_worldSize"]; //[[[end]]] - +_debug = true; _expiresDebris = 604800; _debris = [ "Land_GarbageBags_F", @@ -35,76 +35,82 @@ _debris = [ "Land_Wreck_HMMWV_F" ]; _debrisCounter = 0; +_newDebrisCounter = 0; _worldSize = worldSize/2; _instanceID = call EPOCH_fn_InstanceID; -_maxDebrisLimit = 500; +_maxDebrisLimit = 500; // max total objects to spawn +_rngChance = 0.95; // Lower this to spawn more positions +_scriptHiveKey = "EPOCH:DynamicDebris456"; // change this to force a new seed to be generated. _debrisLocationsKey = format ["%1:%2", _instanceID, worldname]; -_response = ["DebrisLocations", _debrisLocationsKey] call EPOCH_fnc_server_hiveGETRANGE; +_response = [_scriptHiveKey, _debrisLocationsKey] call EPOCH_fnc_server_hiveGETRANGE; _response params [["_status",0],["_data",[]] ]; _debrisLocations = []; +_debrisLocationsTMP = []; if (_status == 1 && _data isEqualType [] && !(_data isEqualTo [])) then { _debrisLocations = _data; } else { diag_log format["DEBUG: Generating new Debris Locations... this is only done once every %1 days.",(_expiresDebris/86400)]; _allRoads = [_worldSize,_worldSize] nearRoads _worldSize; + _allRoads = _allRoads call BIS_fnc_arrayShuffle; + _seed = random 999999; - diag_log format["DEBUG: Generating new Debris Locations... with seed %1",_seed]; + diag_log format["DEBUG: Generating new Debris Locations... with seed %1.",_seed]; { + if (_newDebrisCounter >= _maxDebrisLimit) exitWith {}; _position = getPosWorld _x; _position params ["_posX","_posY"]; _rng = _seed random [_posX,_posY]; - if (_rng > 0.95) then { - _debrisLocations pushBack _position; + if (_rng > _rngChance) then { + if (_debug) then { + _marker = createMarker[str(_position), _position]; + _marker setMarkerShape "ICON"; + _marker setMarkerType "waypoint"; + _marker setMarkerColor "ColorGreen"; + }; + _selectedDebris = selectRandom _debris; + _offsetX = (random 10) - 5; + _offsetY = (random 10) - 5; + _position set [0,(_position select 0) + _offsetX]; + _position set [1,(_position select 1) + _offsetY]; + _position set [2,0]; + _intersections = lineIntersectsSurfaces [[_position select 0,_position select 1,1000], _position, objNull, objNull, true, 1]; + if !(_intersections isEqualTo []) then { + (_intersections select 0) params ["_intersectPosASL","_surfaceNormal","_intersectObject","_parentObject"]; + _allowDebris = true; + if !(isNull _intersectObject) then { + _allowDebris = !((typeOf _intersectObject) in _debris); + }; + if (_allowDebris) then { + _object = createSimpleObject [_selectedDebris, _intersectPosASL]; + _object setDir random 360; + _object setVectorUp _surfaceNormal; + _object setPosASL _intersectPosASL; + _export = [_selectedDebris,getPosWorld _object, vectorDir _object, vectorUp _object]; + _debrisLocationsTMP pushBack _export; + _newDebrisCounter = _newDebrisCounter + 1; + }; + }; }; } forEach _allRoads; - ["DebrisLocations", _debrisLocationsKey, _expiresDebris, _debrisLocations] call EPOCH_fnc_server_hiveSETEX; + [_scriptHiveKey, _debrisLocationsKey, _expiresDebris, _debrisLocationsTMP] call EPOCH_fnc_server_hiveSETEX; }; -for "_i" from 1 to _maxDebrisLimit do { - - _hiveKey = format ["%1:%2", _instanceID, _i]; - _response = ["Debris", _hiveKey] call EPOCH_fnc_server_hiveGETRANGE; - _response params [["_status",0],["_data",[]] ]; - - if (_status == 1 && _data isEqualType [] && !(_data isEqualTo [])) then { - - _data params ["_selectedDebris","_posWorld", "_vectorDir", "_vectorUp"]; +{ + if (_debrisCounter >= _maxDebrisLimit) exitWith {}; + if (_x isEqualType [] && !(_x isEqualTo [])) then { + _x params ["_selectedDebris","_posWorld", "_vectorDir", "_vectorUp"]; _object = createSimpleObject [_selectedDebris, _posWorld]; _object setVectorDirAndUp [_vectorDir,_vectorUp]; _object setPosWorld _posWorld; _debrisCounter = _debrisCounter + 1; + }; +} forEach _debrisLocations; - } else { - - _position = selectRandom _debrisLocations; - _debrisLocations = _debrisLocations - _position; - - _marker = createMarker[str(_position), _position]; - _marker setMarkerShape "ICON"; - _marker setMarkerType "waypoint"; - _marker setMarkerColor "ColorGreen"; - - _selectedDebris = selectRandom _debris; - _offsetX = (random 10) - 5; - _offsetY = (random 10) - 5; - _position set [0,(_position select 0) + _offsetX]; - _position set [1,(_position select 1) + _offsetY]; - _position set [2,0]; - - _intersections = lineIntersectsSurfaces [[_position select 0,_position select 1,1000], _position, objNull, objNull, true, 1]; - if !(_intersections isEqualTo []) then { - (_intersections select 0) params ["_intersectPosASL","_surfaceNormal","_intersectObject","_parentObject"]; - _object = createSimpleObject [_selectedDebris, _intersectPosASL]; - _object setDir random 360; - _object setVectorUp _surfaceNormal; - _object setPosASL _intersectPosASL; - _export = [_selectedDebris,getPosWorld _object, vectorDir _object, vectorUp _object]; - ["Debris", _hiveKey, _expiresDebris, _export] call EPOCH_fnc_server_hiveSETEX; - _debrisCounter = _debrisCounter + 1; - }; +if (_debug) then { + diag_log format["DEBUG: Spawned %1 Existing Debris",_debrisCounter]; + if (_newDebrisCounter > 0) then { + diag_log format["DEBUG: Spawned %1 New Debris.",_newDebrisCounter]; }; }; - -EP = _debrisCounter; diff --git a/Sources/epoch_server_debris_event/build.hpp b/Sources/epoch_server_debris_event/build.hpp index 35e7aee9..bf31a6ab 100644 --- a/Sources/epoch_server_debris_event/build.hpp +++ b/Sources/epoch_server_debris_event/build.hpp @@ -1 +1 @@ -build=777; +build=780; diff --git a/Sources/epoch_server_debris_event/treeView.txt b/Sources/epoch_server_debris_event/treeView.txt index 505e057c..07354a72 100644 Binary files a/Sources/epoch_server_debris_event/treeView.txt and b/Sources/epoch_server_debris_event/treeView.txt differ diff --git a/Sources/epoch_server_events/build.hpp b/Sources/epoch_server_events/build.hpp index 35e7aee9..bf31a6ab 100644 --- a/Sources/epoch_server_events/build.hpp +++ b/Sources/epoch_server_events/build.hpp @@ -1 +1 @@ -build=777; +build=780; diff --git a/Sources/epoch_server_settings/build.hpp b/Sources/epoch_server_settings/build.hpp index 35e7aee9..bf31a6ab 100644 --- a/Sources/epoch_server_settings/build.hpp +++ b/Sources/epoch_server_settings/build.hpp @@ -1 +1 @@ -build=777; +build=780; diff --git a/Sources/mpmissions/epoch.Esseker/treeView.txt b/Sources/mpmissions/epoch.Esseker/treeView.txt index 3f96e71f..30a049ab 100644 Binary files a/Sources/mpmissions/epoch.Esseker/treeView.txt and b/Sources/mpmissions/epoch.Esseker/treeView.txt differ diff --git a/build.txt b/build.txt index daeba049..59d8089a 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -778 +780