From ae934b0ff1bf02dbbdbb3bda5d554733c31515af Mon Sep 17 00:00:00 2001 From: Ghostrider-DbD- Date: Sun, 4 Dec 2016 18:20:22 -0500 Subject: [PATCH] Updated the Kill Feed. --- .../addons/custom_server/init/build.sqf | 4 +- MPMissions/Exile.Altis/debug/blckClient.sqf | 55 ++++++++++++++++--- MPMissions/Exile.Altis/debug/spawnMarker.sqf | 13 +++-- MPMissions/epoch.Altis/debug/blckClient.sqf | 55 ++++++++++++++++--- MPMissions/epoch.Altis/debug/spawnMarker.sqf | 13 +++-- changeLog.sqf | 20 +++++++ 6 files changed, 132 insertions(+), 28 deletions(-) diff --git a/@epochhive/addons/custom_server/init/build.sqf b/@epochhive/addons/custom_server/init/build.sqf index c6107ee..c96918a 100644 --- a/@epochhive/addons/custom_server/init/build.sqf +++ b/@epochhive/addons/custom_server/init/build.sqf @@ -1,3 +1,3 @@ private ["_version","_versionDate"]; -_blck_version = "6.45 Build 17"; -_blck_versionDate = "12-1-16 11:00 PM"; +_blck_version = "6.45 Build 19"; +_blck_versionDate = "12-4-16 11:00 PM"; diff --git a/MPMissions/Exile.Altis/debug/blckClient.sqf b/MPMissions/Exile.Altis/debug/blckClient.sqf index 748fc45..ee16c5f 100644 --- a/MPMissions/Exile.Altis/debug/blckClient.sqf +++ b/MPMissions/Exile.Altis/debug/blckClient.sqf @@ -1,6 +1,6 @@ //////////////////////////////////////////// // Start Server-side functions and Create, Display Mission Messages for blckeagls mission system for Arma 3 Epoch -// Last Updated 8/14/16 +// Last Updated 11/20/16 // by Ghostrider-DbD- ////////////////////////////////////////// @@ -8,10 +8,11 @@ if (hasInterface) then { //diag_log "[blckeagls] initializing client variables"; blck_MarkerPeristTime = 300; - blck_useHint = true; + blck_useHint = false; blck_useSystemChat = true; - blck_useTitleText = true; - blck_useDynamic = false; + blck_useTitleText = false; + blck_useDynamic = true; + blck_useToast = false; // Exile only blck_aiKilluseSystemChat = true; blck_aiKilluseDynamic = false; blck_aiKilluseTitleText = false; @@ -19,6 +20,34 @@ if (hasInterface) then blck_processingKill = -1; blck_message = ""; + fn_killScoreNotification = { + params["_bonus","_distanceBonus","_killStreak"]; + //diag_log format["fn_killScoreNotification:: -- >> _bonus = %1 | _distanceBonus = %2 | _killStreak = %3",_bonus,_distanceBonus,_killStreak]; + _msg2 = format["AI Killed
"]; + if (typeName _bonus isEqualTo "SCALAR") then // add message for the bonus + { + if (_bonus > 0) then + { + _msg2 = _msg2 + format["Bonus +%1
",_bonus]; + }; + }; + if (typeName _distanceBonus isEqualTo "SCALAR") then // Add message for distance bonus + { + if (_distanceBonus > 0) then + { + _msg2 = _msg2 + format["Dist Bonus +%1
",_distanceBonus]; + }; + }; + if (typeName _killStreak isEqualTo "SCALAR") then + { + if (_killStreak > 0) then + { + _msg2 = _msg2 + format["Killstreak %1X
",_killStreak]; + }; + }; + [parseText _msg2,[0.0823437 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.0812109 * safezoneW,0.253 * safezoneH], nil, 7, 0.3, 0] spawn BIS_fnc_textTiles; + }; + fn_dynamicNotification = { private["_text","_screentime","_xcoord","_ycoord"]; params["_mission","_message"]; @@ -61,12 +90,13 @@ if (hasInterface) then titleText [_msg, "PLAIN DOWN",5];uiSleep 5; titleText ["", "PLAIN DOWN",5] }; }; + if (blck_useToast) then + { + ["InfoTitleAndText", [_mission, _message]] call ExileClient_gui_toaster_addTemplateToast; + }; //diag_log format["_fn_missionNotification ====] Paremeters _event %1 _message %2 _mission %3",_event,_message,_mission]; }; - fn_reinforcementsNotification = { - - }; fn_AI_KilledNotification = { private["_message","_text","_screentime","_xcoord","_ycoord"]; _message = _this select 0; @@ -92,9 +122,10 @@ if (hasInterface) then fn_handleMessage = { //private["_event","_msg","_mission"]; diag_log format["blck_Message ====] Paremeters = _this = %1",_this]; - params["_event","_message","_mission"]; + params["_event","_message",["_mission",""]]; diag_log format["blck_Message ====] Paremeters _event %1 _message %2 paramter #3 %3",_event,_message,_mission]; + diag_log format["blck_Message ====] _message isEqualTo %1",_message]; switch (_event) do { @@ -128,9 +159,15 @@ if (hasInterface) then }; case "IED": { - ["IED","Bandits targeted your vehicle with an IED"] call fn_dynamicNotification; + [1] call BIS_fnc_Earthquake; + //["IED","Bandits targeted your vehicle with an IED"] call fn_dynamicNotification; + ["Bandits targeted your vehicle with an IED.", 5] call Epoch_message; for "_i" from 1 to 3 do {playSound "BattlefieldExplosions3_3D";uiSleep 0.3;}; }; + case "showScore": + { + [_message select 0, _message select 1, _message select 2] call fn_killScoreNotification; + }; }; }; diff --git a/MPMissions/Exile.Altis/debug/spawnMarker.sqf b/MPMissions/Exile.Altis/debug/spawnMarker.sqf index 7dc3102..3c6bd4d 100644 --- a/MPMissions/Exile.Altis/debug/spawnMarker.sqf +++ b/MPMissions/Exile.Altis/debug/spawnMarker.sqf @@ -64,7 +64,7 @@ _blck_fn_configureRoundMarker = { _blck_fn_configureIconMarker = { private["_MainMarker"]; params["_name","_pos",["_color","ColorBlack"],["_text",""],["_icon","mil_triangle"]]; - //diag_log format["_blck_fn_configureIconMarker: _name=%1; _pos=%2; _color=%3; _text=%4",_name,_pos,_color,_text]; + diag_log format["_blck_fn_configureIconMarker: _name=%1; _pos=%2; _color=%3; _text=%4",_name,_pos,_color,_text]; _name = "label" + _name; _MainMarker = createMarker [_name, _pos]; @@ -74,14 +74,19 @@ _blck_fn_configureIconMarker = { _MainMarker setMarkerText _text; }; -//diag_log format["spawnMarker:: -- >> _this = %1",_this]; +if (isServer && (blck_debugLevel isEqualTo 3)) then +{ + diag_log format["spawnMarker:: -- >> _this = %1",_this]; +}; // _this = [[""BlueMarker"",[12524.1,18204.7,0],""Bandit Patrol"",""center"",""ColorBlue"",[""ELIPSE"",[175,175]]],""ColorBlue"",""BlueMarker""]" params["_mArray"]; - _mArray params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"]; _markerType params["_mShape","_mSize","_mBrush"]; -//diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType]; +if (isServer && (blck_debugLevel isEqualTo 3)) then +{ + diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType]; +}; if ((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then // not an Icon .... { switch (_missionType) do { diff --git a/MPMissions/epoch.Altis/debug/blckClient.sqf b/MPMissions/epoch.Altis/debug/blckClient.sqf index 748fc45..ee16c5f 100644 --- a/MPMissions/epoch.Altis/debug/blckClient.sqf +++ b/MPMissions/epoch.Altis/debug/blckClient.sqf @@ -1,6 +1,6 @@ //////////////////////////////////////////// // Start Server-side functions and Create, Display Mission Messages for blckeagls mission system for Arma 3 Epoch -// Last Updated 8/14/16 +// Last Updated 11/20/16 // by Ghostrider-DbD- ////////////////////////////////////////// @@ -8,10 +8,11 @@ if (hasInterface) then { //diag_log "[blckeagls] initializing client variables"; blck_MarkerPeristTime = 300; - blck_useHint = true; + blck_useHint = false; blck_useSystemChat = true; - blck_useTitleText = true; - blck_useDynamic = false; + blck_useTitleText = false; + blck_useDynamic = true; + blck_useToast = false; // Exile only blck_aiKilluseSystemChat = true; blck_aiKilluseDynamic = false; blck_aiKilluseTitleText = false; @@ -19,6 +20,34 @@ if (hasInterface) then blck_processingKill = -1; blck_message = ""; + fn_killScoreNotification = { + params["_bonus","_distanceBonus","_killStreak"]; + //diag_log format["fn_killScoreNotification:: -- >> _bonus = %1 | _distanceBonus = %2 | _killStreak = %3",_bonus,_distanceBonus,_killStreak]; + _msg2 = format["AI Killed
"]; + if (typeName _bonus isEqualTo "SCALAR") then // add message for the bonus + { + if (_bonus > 0) then + { + _msg2 = _msg2 + format["Bonus +%1
",_bonus]; + }; + }; + if (typeName _distanceBonus isEqualTo "SCALAR") then // Add message for distance bonus + { + if (_distanceBonus > 0) then + { + _msg2 = _msg2 + format["Dist Bonus +%1
",_distanceBonus]; + }; + }; + if (typeName _killStreak isEqualTo "SCALAR") then + { + if (_killStreak > 0) then + { + _msg2 = _msg2 + format["Killstreak %1X
",_killStreak]; + }; + }; + [parseText _msg2,[0.0823437 * safezoneW + safezoneX,0.379 * safezoneH + safezoneY,0.0812109 * safezoneW,0.253 * safezoneH], nil, 7, 0.3, 0] spawn BIS_fnc_textTiles; + }; + fn_dynamicNotification = { private["_text","_screentime","_xcoord","_ycoord"]; params["_mission","_message"]; @@ -61,12 +90,13 @@ if (hasInterface) then titleText [_msg, "PLAIN DOWN",5];uiSleep 5; titleText ["", "PLAIN DOWN",5] }; }; + if (blck_useToast) then + { + ["InfoTitleAndText", [_mission, _message]] call ExileClient_gui_toaster_addTemplateToast; + }; //diag_log format["_fn_missionNotification ====] Paremeters _event %1 _message %2 _mission %3",_event,_message,_mission]; }; - fn_reinforcementsNotification = { - - }; fn_AI_KilledNotification = { private["_message","_text","_screentime","_xcoord","_ycoord"]; _message = _this select 0; @@ -92,9 +122,10 @@ if (hasInterface) then fn_handleMessage = { //private["_event","_msg","_mission"]; diag_log format["blck_Message ====] Paremeters = _this = %1",_this]; - params["_event","_message","_mission"]; + params["_event","_message",["_mission",""]]; diag_log format["blck_Message ====] Paremeters _event %1 _message %2 paramter #3 %3",_event,_message,_mission]; + diag_log format["blck_Message ====] _message isEqualTo %1",_message]; switch (_event) do { @@ -128,9 +159,15 @@ if (hasInterface) then }; case "IED": { - ["IED","Bandits targeted your vehicle with an IED"] call fn_dynamicNotification; + [1] call BIS_fnc_Earthquake; + //["IED","Bandits targeted your vehicle with an IED"] call fn_dynamicNotification; + ["Bandits targeted your vehicle with an IED.", 5] call Epoch_message; for "_i" from 1 to 3 do {playSound "BattlefieldExplosions3_3D";uiSleep 0.3;}; }; + case "showScore": + { + [_message select 0, _message select 1, _message select 2] call fn_killScoreNotification; + }; }; }; diff --git a/MPMissions/epoch.Altis/debug/spawnMarker.sqf b/MPMissions/epoch.Altis/debug/spawnMarker.sqf index 7dc3102..3c6bd4d 100644 --- a/MPMissions/epoch.Altis/debug/spawnMarker.sqf +++ b/MPMissions/epoch.Altis/debug/spawnMarker.sqf @@ -64,7 +64,7 @@ _blck_fn_configureRoundMarker = { _blck_fn_configureIconMarker = { private["_MainMarker"]; params["_name","_pos",["_color","ColorBlack"],["_text",""],["_icon","mil_triangle"]]; - //diag_log format["_blck_fn_configureIconMarker: _name=%1; _pos=%2; _color=%3; _text=%4",_name,_pos,_color,_text]; + diag_log format["_blck_fn_configureIconMarker: _name=%1; _pos=%2; _color=%3; _text=%4",_name,_pos,_color,_text]; _name = "label" + _name; _MainMarker = createMarker [_name, _pos]; @@ -74,14 +74,19 @@ _blck_fn_configureIconMarker = { _MainMarker setMarkerText _text; }; -//diag_log format["spawnMarker:: -- >> _this = %1",_this]; +if (isServer && (blck_debugLevel isEqualTo 3)) then +{ + diag_log format["spawnMarker:: -- >> _this = %1",_this]; +}; // _this = [[""BlueMarker"",[12524.1,18204.7,0],""Bandit Patrol"",""center"",""ColorBlue"",[""ELIPSE"",[175,175]]],""ColorBlue"",""BlueMarker""]" params["_mArray"]; - _mArray params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"]; _markerType params["_mShape","_mSize","_mBrush"]; -//diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType]; +if (isServer && (blck_debugLevel isEqualTo 3)) then +{ + diag_log format["spawnMarker.sqf:: -- >> _missionType %1 | _markerPos %2 | _markerLabel %3 | _markerLabelType %4 | _markerColor %5 | _markerType %6",_missionType,_markerPos,_markerLabel,_markerLabelType,_markerColor,_markerType]; +}; if ((_markerType select 0) in ["ELIPSE","RECTANGLE"]) then // not an Icon .... { switch (_missionType) do { diff --git a/changeLog.sqf b/changeLog.sqf index d0ca8d8..6c1923d 100644 --- a/changeLog.sqf +++ b/changeLog.sqf @@ -4,6 +4,26 @@ Loosely based on the AI mission system by blckeagls ver 2.0.2 Contributions by Narines: bug fixes, testing, 'fired' event handler Ideas or code from that by Vampire and KiloSwiss have been used for certain functions. +12/4-16 Version 6.45 Build 19 +Added Option to display mission information in Toasts (Exile Only). +Fixed several issues related to the update to Arma 1.66 +Known Issues: Need a patch so you can loot AI bodies in Epoch. + +11/16/16 Version 6.44 Build 15 +Added parameters + blck_blacklistTraderCities=true; // the locations of the Epoch/Exile trader cities will be pulled from the config and added to the location blacklist for the mission system. + blcklistConcreteMixerZones = true; // Locations of the concrete mixers will be pulled from the configs; no missions will be spawned within 1000 m of these locations. + blck_blacklistSpawns = true; // Locations of Exile spawns will be pulled from the config. No missions will spawn within 1000 m of these locations. +Added: the main thread now runs a function that checks for empty groups. +Fixed: The mission system would hang on epoch after a while because createGroup returned nullGroup. this appeared to occur because the maximum number of active groups had been reached. Deleting empty groups periodically solved the issue on a test machine. +Teaked: code to check whether a possible mission spawn location is near a flag or plot pole. Still needs work. +Added: Completed adding EDEN weapons, optics, bipods, optics to AI configurations and mission loot crates. +Added APEX headgear and uniforms. (Note, you would need to add any of these you wished for players to sell to Epoch\\epoch_config\CfgPricing.hpp on Epoch) +Changed: Definitions of blacklist locations such as spawns moved from GMS_findWorld.sqf to the blck_configs_(epoch|exile). +Changed: Divided rifles and optics into subcategories to better enable assigning weapons to AI difficulties in a sort of class-based way, e.g., 556, 6.5, or LMG are separate classes. +Changed: DLS crate loader (not publically available yet) now uses blck_fnc_loadLootItemsFromArray rather than the prior approach for which specific crate loading functions were called depending on the loadout type (weapons, building supplies, foord etc). +Fixed: You can now loot AI bodies in Epoch. + 11/16/16 Version 6.44 Build 15 Added parameters blck_blacklistTraderCities=true; // the locations of the Epoch/Exile trader cities will be pulled from the config and added to the location blacklist for the mission system.