diff --git a/@ExileServer/addons/a3_dms/config.sqf b/@ExileServer/addons/a3_dms/config.sqf index b1d8dee..00f18e6 100644 --- a/@ExileServer/addons/a3_dms/config.sqf +++ b/@ExileServer/addons/a3_dms/config.sqf @@ -14,6 +14,7 @@ DMS_DEBUG = false; DMS_StaticMission = false; // Enable/disable static missions DMS_TimeBetweenMissions = [600,900]; // [Minimum,Maximum] time between missions (if mission limit is not reached) | DEFAULT: 10-15 mins DMS_MissionTimeOut = [900,1800]; // [Minimum,Maximum] time it will take for a mission to timeout | Default: 15-30 mins + DMS_AI_KillPercent = 100; // The percent amount of AI that need to be killed for "killPercent" mission requirement DMS_MissionMarkerWinDot = true; // Keep the mission marker dot with a "win" message after mission is over DMS_MissionMarkerLoseDot = true; // Keep the mission marker dot with a "lose" message after mission is over @@ -41,7 +42,9 @@ DMS_DEBUG = false; DMS_MinServerFPS = 10; // Minimum server FPS for missions to start //Mission notification settings - DMS_PlayerNotificationTypes = ["standardHintRequest"]; // Notification types. Supported values are: ["advancedHintRequest","dynamicTextRequest","standardHintRequest","systemChatRequest"] + DMS_PlayerNotificationTypes = [ // Notification types. Supported values are: ["advancedHintRequest","dynamicTextRequest","standardHintRequest","systemChatRequest"] + "standardHintRequest" + ]; DMS_dynamicText_Size = 0.55; // Dynamic Text size for "dynamicTextRequest" notification type. DMS_dynamicText_Color = "#FFCC00"; // Dynamic Text color for "dynamicTextRequest" notification type. @@ -140,7 +143,15 @@ DMS_DEBUG = false; DMS_assault_optic_chance = 75; // Percentage chance that an Assault Class AI will get an optic DMS_assault_bipod_chance = 25; // Percentage chance that an Assault Class AI will get a bipod DMS_assault_suppressor_chance = 25; // Percentage chance that an Assault Class AI will get a suppressor - DMS_assault_items = ["ItemGPS"]; + + DMS_assault_items = [ // Items for Assault Class AI (Loot stuff that goes in uniform/vest/backpack) + "Exile_Item_InstaDoc", + "Exile_Item_BBQSandwich", + "Exile_Item_Energydrink" + ]; + DMS_assault_equipment = [ // Equipment for Assault Class AI (stuff that goes in toolbelt slots) + "ItemGPS" + ]; DMS_assault_helmets = [ // Helmets for Assault Class "H_HelmetSpecB_paint1", "H_HelmetIA_camo", @@ -208,7 +219,16 @@ DMS_DEBUG = false; DMS_MG_optic_chance = 50; // Percentage chance that an MG Class AI will get an optic DMS_MG_bipod_chance = 90; // Percentage chance that an MG Class AI will get a bipod DMS_MG_suppressor_chance = 10; // Percentage chance that an MG Class AI will get a suppressor - DMS_MG_items = ["Binocular"]; + + DMS_MG_items = [ // Items for MG Class AI (Loot stuff that goes in uniform/vest/backpack) + "Exile_Item_InstaDoc", + "Exile_Item_Catfood_Cooked", + "Exile_Item_PlasticBottleFreshWater", + "Exile_Item_CookingPot" + ]; + DMS_MG_equipment = [ // Equipment for MG Class AI (stuff that goes in toolbelt slots) + "Binocular" + ]; DMS_MG_helmets = [ // Helmets for MG Class "H_PilotHelmetHeli_I", "H_PilotHelmetHeli_O", @@ -284,7 +304,18 @@ DMS_DEBUG = false; DMS_sniper_optic_chance = 100; // Percentage chance that a Sniper Class AI will get an optic DMS_sniper_bipod_chance = 90; // Percentage chance that a Sniper Class AI will get a bipod DMS_sniper_suppressor_chance = 15; // Percentage chance that a Sniper Class AI will get a suppressor - DMS_sniper_items = ["Rangefinder","ItemGPS"]; + + DMS_sniper_items = [ // Items for Sniper Class AI (Loot stuff that goes in uniform/vest/backpack) + "Exile_Item_InstaDoc", + "Exile_Item_Surstromming_Cooked", + "Exile_Item_PlasticBottleFreshWater", + "Exile_Item_PlasticBottleFreshWater", + "Exile_Item_Matches" + ]; + DMS_sniper_equipment = [ // Equipment for Sniper Class AI (stuff that goes in toolbelt slots) + "Rangefinder", + "ItemGPS" + ]; DMS_sniper_helmets = [ // Helmets for Sniper Class "H_HelmetSpecB_paint1", "H_HelmetIA_camo", diff --git a/@ExileServer/addons/a3_dms/missions/MM10.sqf b/@ExileServer/addons/a3_dms/missions/MM10.sqf deleted file mode 100644 index 0282877..0000000 --- a/@ExileServer/addons/a3_dms/missions/MM10.sqf +++ /dev/null @@ -1,35 +0,0 @@ -private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"]; - -// associate pos with find safe pos -_pos = call DMS_findSafePos; - - -_missname = "Main Mission 10"; -diag_log format ["DMS :: Main Mission 10 started at (%1)",_pos]; - -["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast; - - -// Spawn Marker -[_pos,_missname] call DMS_CreateMarker; - -// Spawn Box -_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"]; -[1,_crate] call DMS_createBox; - -uiSleep 2; - -// spawn AI -[_pos,5,4] call DMS_SpawnAI; - - - waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0}; - - -["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; - -// Run Cleanup -[_pos,_crate] call DMS_CleanUp; - - -[] call DMS_SelectMission; diff --git a/@ExileServer/addons/a3_dms/missions/MM2.sqf b/@ExileServer/addons/a3_dms/missions/MM2.sqf deleted file mode 100644 index 05aa3c6..0000000 --- a/@ExileServer/addons/a3_dms/missions/MM2.sqf +++ /dev/null @@ -1,34 +0,0 @@ -private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"]; - -// associate pos with find safe pos -_pos = call DMS_findSafePos; - - -_missname = "Main Mission 2"; -diag_log format ["DMS :: Main Mission 2 started at (%1)",_pos]; - -["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast; - -// Spawn Marker -[_pos,_missname] call DMS_CreateMarker; - -// Spawn Box -_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"]; -[1,_crate] call DMS_createBox; - -uiSleep 2; - -// spawn AI -[_pos,5,4] call DMS_SpawnAI; - - - waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0}; - - -["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; - -// Run Cleanup -[_pos,_crate] call DMS_CleanUp; - - -[] call DMS_SelectMission; diff --git a/@ExileServer/addons/a3_dms/missions/MM3.sqf b/@ExileServer/addons/a3_dms/missions/MM3.sqf deleted file mode 100644 index 30ba86c..0000000 --- a/@ExileServer/addons/a3_dms/missions/MM3.sqf +++ /dev/null @@ -1,33 +0,0 @@ -private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"]; - -// associate pos with find safe pos -_pos = call DMS_findSafePos; - -_missname = "Main Mission 3"; -diag_log format ["DMS :: Main Mission 3 started at (%1)",_pos]; - -["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast; - -// Spawn Marker -[_pos,_missname] call DMS_CreateMarker; - -// Spawn Box -_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"]; -[1,_crate] call DMS_createBox; - -uiSleep 2; - -[_pos,5,4] call DMS_SpawnAI; - - - waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0}; - - -["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; - - -// Run Cleanup -[_pos,_crate] call DMS_CleanUp; - - -[] call DMS_SelectMission; diff --git a/@ExileServer/addons/a3_dms/missions/MM4.sqf b/@ExileServer/addons/a3_dms/missions/MM4.sqf deleted file mode 100644 index f4f56c8..0000000 --- a/@ExileServer/addons/a3_dms/missions/MM4.sqf +++ /dev/null @@ -1,37 +0,0 @@ -private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"]; - -// associate pos with find safe pos -_pos = call DMS_findSafePos; - - - - _missname = "Main Mission 4"; -diag_log format ["DMS :: Main Mission 4 started at (%1)",_pos]; - -["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast; - - - -// Spawn Marker -[_pos,_missname] call DMS_CreateMarker; - -// Spawn Box -_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"]; -[1,_crate] call DMS_createBox; - -uiSleep 2; - -[_pos,5,4] call DMS_SpawnAI; - - - - waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0}; - - -["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; - -// Run Cleanup -[_pos,_crate] call DMS_CleanUp; - - -[] call DMS_SelectMission; diff --git a/@ExileServer/addons/a3_dms/missions/MM5.sqf b/@ExileServer/addons/a3_dms/missions/MM5.sqf deleted file mode 100644 index ef2ee56..0000000 --- a/@ExileServer/addons/a3_dms/missions/MM5.sqf +++ /dev/null @@ -1,36 +0,0 @@ -private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"]; - - -// associate pos with find safe pos -_pos = call DMS_findSafePos; - - -_missname = "Main Mission 5"; -diag_log format ["DMS :: Main Mission 5 started at (%1)",_pos]; - -["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast; - - -// Spawn Marker -[_pos,_missname] call DMS_CreateMarker; - -// Spawn Box -_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"]; -[1,_crate] call DMS_createBox; - -uiSleep 2; - -//[_pos, amount of ai ] call DMS_SpawnAI; -[_pos,4,5] call DMS_SpawnAI; - - - - waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0}; - - -["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; - -// Run Cleanup -[_pos,_crate] call DMS_CleanUp; - -[] call DMS_SelectMission; diff --git a/@ExileServer/addons/a3_dms/missions/MM6.sqf b/@ExileServer/addons/a3_dms/missions/MM6.sqf deleted file mode 100644 index 6925196..0000000 --- a/@ExileServer/addons/a3_dms/missions/MM6.sqf +++ /dev/null @@ -1,33 +0,0 @@ -private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"]; - -// associate pos with find safe pos -_pos = call DMS_findSafePos; - - -_missname = "Main Mission 6"; -diag_log format ["DMS :: Main Mission 6 started at (%1)",_pos]; - -["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast; - -// Spawn Marker -[_pos,_missname] call DMS_CreateMarker; - -// Spawn Box -_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"]; -[1,_crate] call DMS_createBox; - -uiSleep 2; - -[_pos,5,4] call DMS_SpawnAI; - - -waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0}; - - -["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; - -// Run Cleanup -[_pos,_crate] call DMS_CleanUp; - - -[] call DMS_SelectMission; diff --git a/@ExileServer/addons/a3_dms/missions/MM7.sqf b/@ExileServer/addons/a3_dms/missions/MM7.sqf deleted file mode 100644 index 1b86156..0000000 --- a/@ExileServer/addons/a3_dms/missions/MM7.sqf +++ /dev/null @@ -1,32 +0,0 @@ -private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"]; - -// associate pos with find safe pos -_pos = call DMS_findSafePos; - - -_missname = "Main Mission 7"; -diag_log format ["DMS :: Main Mission 7 started at (%1)",_pos]; - -["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast; - -// Spawn Marker -[_pos,_missname] call DMS_CreateMarker; - -// Spawn Box -_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"]; -[1,_crate] call DMS_createBox; - -uiSleep 2; - -[_pos,5,4] call DMS_SpawnAI; - - -waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0}; - -["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; - -// Run Cleanup -[_pos,_crate] call DMS_CleanUp; - - -[] call DMS_SelectMission; diff --git a/@ExileServer/addons/a3_dms/missions/MM8.sqf b/@ExileServer/addons/a3_dms/missions/MM8.sqf deleted file mode 100644 index 445d99a..0000000 --- a/@ExileServer/addons/a3_dms/missions/MM8.sqf +++ /dev/null @@ -1,33 +0,0 @@ -private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"]; - -// associate pos with find safe pos -_pos = call DMS_findSafePos; - - - _missname = "Main Mission 8"; -diag_log format ["DMS :: Main Mission 8 started at (%1)",_pos]; - -["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast; - - -// Spawn Marker -[_pos,_missname] call DMS_CreateMarker; - -// Spawn Box -_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"]; -[1,_crate] call DMS_createBox; - -uiSleep 2; - -[_pos,5,4] call DMS_SpawnAI; - - - waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0}; - - -["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; - -// Run Cleanup -[_pos,_crate] call DMS_CleanUp; - -[] call DMS_SelectMission; diff --git a/@ExileServer/addons/a3_dms/missions/MM9.sqf b/@ExileServer/addons/a3_dms/missions/MM9.sqf deleted file mode 100644 index 984516d..0000000 --- a/@ExileServer/addons/a3_dms/missions/MM9.sqf +++ /dev/null @@ -1,30 +0,0 @@ -private ["_crate","_pos","_missname","_aiAmmount","_misText","_missEnd","_group"]; - -// associate pos with find safe pos -_pos = call DMS_findSafePos; - -_missname = "Main Mission 9"; -diag_log format ["DMS :: Main Mission 9 started at (%1)",_pos]; - -["standardHintRequest",["Mission starting! Check your map"]] call ExileServer_system_network_send_broadcast; - -// Spawn Marker -[_pos,_missname] call DMS_CreateMarker; - -// Spawn Box -_crate = createVehicle ["Box_NATO_Wps_F",[(_pos select 0) - 10, _pos select 1,0],[], 0, "CAN_COLLIDE"]; -[1,_crate] call DMS_createBox; - -uiSleep 2; - -[_pos,5,4] call DMS_SpawnAI; - -waitUntil{sleep 1; {(isPlayer _x) && (_x distance _pos < 30) } count playableUnits > 0}; - - -["standardHintRequest",["Mission has ended, good job!"]] call ExileServer_system_network_send_broadcast; - -// Run Cleanup -[_pos,_crate] call DMS_CleanUp; - -[] call DMS_SelectMission; diff --git a/@ExileServer/addons/a3_dms/missions/mission_init.sqf b/@ExileServer/addons/a3_dms/missions/mission_init.sqf index d28ed27..00ef1bd 100644 --- a/@ExileServer/addons/a3_dms/missions/mission_init.sqf +++ b/@ExileServer/addons/a3_dms/missions/mission_init.sqf @@ -5,7 +5,7 @@ Initializes variables for DMS */ -diag_log "DMS :: Initializing"; +diag_log "DMS :: Initializing Mission Variables"; // Initialize Variables DMS_Mission_Arr = []; diff --git a/@ExileServer/addons/a3_dms/scripts/AddMissionToMonitor.sqf b/@ExileServer/addons/a3_dms/scripts/AddMissionToMonitor.sqf index 5c4ea28..78822ac 100644 --- a/@ExileServer/addons/a3_dms/scripts/AddMissionToMonitor.sqf +++ b/@ExileServer/addons/a3_dms/scripts/AddMissionToMonitor.sqf @@ -47,7 +47,7 @@ "_completionInfo", "_timeOutInfo", "_inputUnits", "_missionObjs", "_messages", "_markers", "_side", "_timeStarted", "_timeUntilFail" */ -private ["_added", "_pos", "_OK", "_completionInfo", "_timeOutInfo", "_inputUnits", "_missionObjs", "_messages", "_markers", "_timeStarted", "_timeUntilFail", "_buildings", "_loot", "_crate_loot_values", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_side"]; +private ["_added", "_pos", "_OK", "_completionInfo", "_timeOutInfo", "_inputUnits", "_missionObjs", "_messages", "_markers", "_timeStarted", "_timeUntilFail", "_buildings", "_loot", "_crate_loot_values", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_side","_arr"]; _added = false; @@ -138,7 +138,7 @@ try throw format["_markers |%1|",_markers]; }; - DMS_Mission_Arr pushBack + _arr = [ _pos, _completionInfo, @@ -162,7 +162,13 @@ try ], _side ]; + DMS_Mission_Arr pushBack _arr; _added = true; + + if (DMS_DEBUG) then + { + diag_log format ["DMS_DEBUG AddMissionToMonitor :: Added |%1| to DMS_Mission_Arr!",_arr]; + }; } catch { diff --git a/@ExileServer/addons/a3_dms/scripts/RemoveMarkers.sqf b/@ExileServer/addons/a3_dms/scripts/RemoveMarkers.sqf index 50ff052..8ce72e7 100644 --- a/@ExileServer/addons/a3_dms/scripts/RemoveMarkers.sqf +++ b/@ExileServer/addons/a3_dms/scripts/RemoveMarkers.sqf @@ -21,9 +21,10 @@ _status = _this select 1; if (DMS_DEBUG) then { - diag_log format["DMS_DEBUG RemoveMarkers :: Calling DMS_RemoveMarkers with parameters %1.",_this]; + diag_log format ["DMS_DEBUG RemoveMarkers :: Calling DMS_RemoveMarkers with parameters %1.",_this]; }; + deleteMarker _markerCircle; if (_status == "win") then @@ -36,7 +37,7 @@ if (_status == "win") then [DMS_MissionMarkerWinDotTime, {deleteMarker _this;}, _markerDot, false] call ExileServer_system_thread_addTask; if (DMS_DEBUG) then { - diag_log format["DMS_DEBUG RemoveMarkers :: %1 Marker will be removed in %2 seconds!",DMS_MissionMarkerWinDotTime,_markerDot]; + diag_log format ["DMS_DEBUG RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerWinDotTime]; }; } else @@ -49,6 +50,6 @@ else [DMS_MissionMarkerLoseDotTime, {deleteMarker _this;}, _markerDot, false] call ExileServer_system_thread_addTask; if (DMS_DEBUG) then { - diag_log format["DMS_DEBUG RemoveMarkers :: %1 Marker will be removed in %2 seconds!",DMS_MissionMarkerLoseDotTime,_markerDot]; + diag_log format ["DMS_DEBUG RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerLoseDotTime]; }; }; \ No newline at end of file diff --git a/@ExileServer/addons/a3_dms/scripts/SpawnAISoldier.sqf b/@ExileServer/addons/a3_dms/scripts/SpawnAISoldier.sqf index 8dab5ae..7856b62 100644 --- a/@ExileServer/addons/a3_dms/scripts/SpawnAISoldier.sqf +++ b/@ExileServer/addons/a3_dms/scripts/SpawnAISoldier.sqf @@ -99,8 +99,12 @@ if (!_useCustomGear) then diag_log format ["DMS ERROR :: DMS_SpawnAISoldier called with unsupported _type: %1 | _this: %2",_type,_this]; };// No more idiot-proofing for the following configs - // Items - {_unit linkItem _x;false;} count (missionNamespace getVariable [format ["DMS_%1_items",_type],[]]); + // Equipment (Stuff that goes in the toolbelt slots) + {_unit linkItem _x;false;} count (missionNamespace getVariable [format ["DMS_%1_equipment",_type],[]]); + + // Items (Loot stuff that goes in uniform/vest/backpack) + {_unit addItem _x;false;} count (missionNamespace getVariable [format ["DMS_%1_items",_type],[]]); + // Clothes _unit addHeadgear ((missionNamespace getVariable [format ["DMS_%1_helmets",_type],[]]) call BIS_fnc_selectRandom);