mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
Readme changes, new debug fnc, fixes, tweaks
Created disclaimer for DMS. Now mentioning that HC for DMS isn't that good. Some structure stuff in readme (let's see if it works lol) * **NEW CONFIG VALUE: DMS_Use_Map_Config** * You can now overwrite "main config values" with map-specific config values located in the new "map_configs" folder. This should allow you to use one DMS PBO if you have multiple servers with different maps. Included examples for Altis, Bornholm, Esseker, and Tavi (Taviana). * Because of the above implementation, DMS by default will not include the salt flats blacklist for findSafePos. In addition, it is preconfigured to the hilly terrains in Esseker and Taviana, as well as reducing all of the blacklist distances due to the smaller map size in Esseker. * Created new function "DMS_fnc_DebugLog". All DMS files (that produced debug logs) have been changed, including mission files. However, updating them is not important (and completely pointless if you don't even use DMS_DEBUG). * Fixed a few locations where it said "sized" instead of "seized". Thanks to [icomrade](https://github.com/icomrade) for pointing them out. * DMS now utilizes the "ARMA_LOG" DLL (if it exists) by infiSTAR to produce debug logs (if enabled). All debug logs now also include server uptime (in seconds) and server FPS. * The FSM no longer produces debug logs. * AI Locality manager will now run every minute. * Debug logs for "DMS_fnc_MissionsMonitor" will only output the mission name and the position, instead of all of the parameters. * "DMS_fnc_IsNearWater" will now check the provided position itself for water. * "DMS_fnc_IsValidPosition" will now do a surfaceNormal check within a 5 meter radius of the provided position as well. * "_customGearSet" should now actually work for "DMS_fnc_SpawnAISoldier", and the function title comment has been updated for the slightly tweaked syntax.
This commit is contained in:
parent
c0cf7fce84
commit
0544cfe9e7
@ -18,7 +18,7 @@ item13[] = {"PREPARE",2,250,763.528931,-107.864372,853.528931,-57.864372,0.00000
|
|||||||
item14[] = {"___min_loop",4,218,838.578918,171.729218,928.578918,221.729218,3.000000,"1 min loop"};
|
item14[] = {"___min_loop",4,218,838.578918,171.729218,928.578918,221.729218,3.000000,"1 min loop"};
|
||||||
item15[] = {"Select_Mission",2,250,839.279602,248.118042,929.279663,298.118042,0.000000,"Select Mission"};
|
item15[] = {"Select_Mission",2,250,839.279602,248.118042,929.279663,298.118042,0.000000,"Select Mission"};
|
||||||
item16[] = {"",7,210,880.582092,366.639160,888.582092,374.639160,0.000000,""};
|
item16[] = {"",7,210,880.582092,366.639160,888.582092,374.639160,0.000000,""};
|
||||||
item17[] = {"__min_loop",4,218,975.237671,175.934219,1065.237793,225.934219,0.000000,"5min loop"};
|
item17[] = {"___min_loop__AI",4,4314,975.237671,175.934219,1065.237793,225.934219,0.000000,"1 min loop (AI)"};
|
||||||
item18[] = {"Set_AI_Ownership",2,250,975.237732,250.921417,1065.237305,300.921417,0.000000,"Set AI Ownership"};
|
item18[] = {"Set_AI_Ownership",2,250,975.237732,250.921417,1065.237305,300.921417,0.000000,"Set AI Ownership"};
|
||||||
item19[] = {"",7,210,1016.540222,366.725281,1024.540283,374.725281,0.000000,""};
|
item19[] = {"",7,210,1016.540222,366.725281,1024.540283,374.725281,0.000000,""};
|
||||||
link0[] = {0,10};
|
link0[] = {0,10};
|
||||||
@ -44,8 +44,8 @@ link19[] = {16,0};
|
|||||||
link20[] = {17,18};
|
link20[] = {17,18};
|
||||||
link21[] = {18,19};
|
link21[] = {18,19};
|
||||||
link22[] = {19,16};
|
link22[] = {19,16};
|
||||||
globals[] = {0.000000,0,0,0,0,640,480,2,454,6316128,1,70.838631,1581.788208,823.258911,-305.297394,1217,909,1};
|
globals[] = {0.000000,0,0,0,0,640,480,2,454,6316128,1,432.812775,1219.813965,504.306030,-50.239235,799,563,1};
|
||||||
window[] = {2,-1,-1,-1,-1,890,156,1450,156,3,1235};
|
window[] = {0,-1,-1,-1,-1,1045,285,1579,311,1,817};
|
||||||
*//*%FSM</HEAD>*/
|
*//*%FSM</HEAD>*/
|
||||||
class FSM
|
class FSM
|
||||||
{
|
{
|
||||||
@ -118,14 +118,14 @@ class FSM
|
|||||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||||
};
|
};
|
||||||
/*%FSM</LINK>*/
|
/*%FSM</LINK>*/
|
||||||
/*%FSM<LINK "__min_loop">*/
|
/*%FSM<LINK "___min_loop__AI">*/
|
||||||
class __min_loop
|
class ___min_loop__AI
|
||||||
{
|
{
|
||||||
itemno = 17;
|
itemno = 17;
|
||||||
priority = 0.000000;
|
priority = 0.000000;
|
||||||
to="Set_AI_Ownership";
|
to="Set_AI_Ownership";
|
||||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _aiLocality) > 300)"/*%FSM</CONDITION""">*/;
|
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _aiLocality) > 60)"/*%FSM</CONDITION""">*/;
|
||||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||||
};
|
};
|
||||||
/*%FSM</LINK>*/
|
/*%FSM</LINK>*/
|
||||||
@ -137,9 +137,7 @@ class FSM
|
|||||||
{
|
{
|
||||||
name = "Check_Mission_Running";
|
name = "Check_Mission_Running";
|
||||||
itemno = 6;
|
itemno = 6;
|
||||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_MissionsMonitor""]) call DMS_fnc_DebugLog;" \n
|
||||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_MissionsMonitor""];" \n
|
|
||||||
"};" \n
|
|
||||||
"" \n
|
"" \n
|
||||||
"_missionsMonitor = diag_tickTime;" \n
|
"_missionsMonitor = diag_tickTime;" \n
|
||||||
"call DMS_fnc_MissionsMonitor;"/*%FSM</STATEINIT""">*/;
|
"call DMS_fnc_MissionsMonitor;"/*%FSM</STATEINIT""">*/;
|
||||||
@ -165,9 +163,7 @@ class FSM
|
|||||||
{
|
{
|
||||||
name = "Mission_Cleanup";
|
name = "Mission_Cleanup";
|
||||||
itemno = 11;
|
itemno = 11;
|
||||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_CleanUpManager""]) call DMS_fnc_DebugLog;" \n
|
||||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_CleanUpManager""];" \n
|
|
||||||
"};" \n
|
|
||||||
"" \n
|
"" \n
|
||||||
"_cleanupTime = diag_tickTime;" \n
|
"_cleanupTime = diag_tickTime;" \n
|
||||||
"call DMS_fnc_CleanUpManager;"/*%FSM</STATEINIT""">*/;
|
"call DMS_fnc_CleanUpManager;"/*%FSM</STATEINIT""">*/;
|
||||||
@ -222,9 +218,7 @@ class FSM
|
|||||||
{
|
{
|
||||||
name = "Select_Mission";
|
name = "Select_Mission";
|
||||||
itemno = 15;
|
itemno = 15;
|
||||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_SelectMission""]) call DMS_fnc_DebugLog;" \n
|
||||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_SelectMission""];" \n
|
|
||||||
"};" \n
|
|
||||||
"" \n
|
"" \n
|
||||||
"_selectMission = diag_tickTime;" \n
|
"_selectMission = diag_tickTime;" \n
|
||||||
"call DMS_fnc_SelectMission;"/*%FSM</STATEINIT""">*/;
|
"call DMS_fnc_SelectMission;"/*%FSM</STATEINIT""">*/;
|
||||||
@ -250,9 +244,7 @@ class FSM
|
|||||||
{
|
{
|
||||||
name = "Set_AI_Ownership";
|
name = "Set_AI_Ownership";
|
||||||
itemno = 18;
|
itemno = 18;
|
||||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_AILocalityManager""]) call DMS_fnc_DebugLog;" \n
|
||||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_AILocalityManager""];" \n
|
|
||||||
"};" \n
|
|
||||||
"" \n
|
"" \n
|
||||||
"_aiLocality = diag_tickTime;" \n
|
"_aiLocality = diag_tickTime;" \n
|
||||||
"call DMS_fnc_AILocalityManager;"/*%FSM</STATEINIT""">*/;
|
"call DMS_fnc_AILocalityManager;"/*%FSM</STATEINIT""">*/;
|
||||||
|
@ -35,6 +35,7 @@ class CfgFunctions
|
|||||||
class CleanUp {};
|
class CleanUp {};
|
||||||
class CleanUpManager {};
|
class CleanUpManager {};
|
||||||
class CreateMarker {};
|
class CreateMarker {};
|
||||||
|
class DebugLog {};
|
||||||
class FillCrate {};
|
class FillCrate {};
|
||||||
class FindSafePos {};
|
class FindSafePos {};
|
||||||
class FindSuppressor {};
|
class FindSuppressor {};
|
||||||
|
@ -5,12 +5,21 @@
|
|||||||
Created by eraser1
|
Created by eraser1
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// Enables debug logging in DMS functions. This will also make missions spawn and timeout more quickly (for testing purposes).
|
// Enables debug logging in DMS functions. This will also make missions spawn and timeout more quickly (for testing purposes).
|
||||||
// Disable this on live servers, unless you know what you're doing.
|
// Disable this on live servers, unless you know what you're doing.
|
||||||
DMS_DEBUG = false;
|
DMS_DEBUG = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DMS_Use_Map_Config = true; // Whether or not to use config overwrites specific to the map.
|
||||||
|
/*
|
||||||
|
If you are using a map other than Altis, Bornholm, Esseker, or Tavi (Taviana) you should set this to false OR create a new file within the map_configs folder for the map so that you don't get a missing file error.
|
||||||
|
To share your map-specific config, please create a merge request on GitHub and/or leave a message on the DMS thread in the Exile forums.
|
||||||
|
For any questions regarding map-specific configs, please leave a reply in the DMS thread on the Exile forums.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Mission System Settings */
|
/* Mission System Settings */
|
||||||
/*General settings for dynamic missions*/
|
/*General settings for dynamic missions*/
|
||||||
DMS_DynamicMission = true; // Enable/disable dynamic mission system
|
DMS_DynamicMission = true; // Enable/disable dynamic mission system
|
||||||
@ -61,7 +70,7 @@ DMS_DEBUG = false;
|
|||||||
DMS_TraderZoneNearBlacklist = 2500; // Missions won't spawn in a position this many meters close to a trader zone
|
DMS_TraderZoneNearBlacklist = 2500; // Missions won't spawn in a position this many meters close to a trader zone
|
||||||
DMS_MissionNearBlacklist = 2500; // Missions won't spawn in a position this many meters close to another mission
|
DMS_MissionNearBlacklist = 2500; // Missions won't spawn in a position this many meters close to another mission
|
||||||
DMS_WaterNearBlacklist = 500; // Missions won't spawn in a position this many meters close to water
|
DMS_WaterNearBlacklist = 500; // Missions won't spawn in a position this many meters close to water
|
||||||
DMS_MaxSurfaceNormal = 0.95; // Missions won't spawn if the surface normal of the location is less than this amount. The lower the value, the steeper the location. Greater values means flatter locations
|
DMS_MaxSurfaceNormal = 0.95; // Missions won't spawn if the surface normal of the location is less than this amount. The lower the value, the steeper the location. Greater values means flatter locations. Values can range from 0-1, with 0 being sideways, and 1 being perfectly flat. For reference: SurfaceNormal of about 0.7 is when you are forced to walk up a surface.
|
||||||
/*Mission spawn location settings*/
|
/*Mission spawn location settings*/
|
||||||
|
|
||||||
DMS_MinWaterDepth = 20; // Minimum depth of water that an underwater mission can spawn at.
|
DMS_MinWaterDepth = 20; // Minimum depth of water that an underwater mission can spawn at.
|
||||||
@ -145,8 +154,8 @@ DMS_DEBUG = false;
|
|||||||
["mercbase",5]
|
["mercbase",5]
|
||||||
];
|
];
|
||||||
|
|
||||||
DMS_findSafePosBlacklist = [ // For BIS_fnc_findSafePos position blacklist info refer to: https://community.bistudio.com/wiki/BIS_fnc_findSafePos
|
DMS_findSafePosBlacklist = [ // For BIS_fnc_findSafePos position blacklist info refer to: https://community.bistudio.com/wiki/BIS_fnc_findSafePos
|
||||||
[[22500,19420],[24870,16725]] // Salt flats
|
// An example is given in the altis_config.sqf (it blacklists the salt flats).
|
||||||
];
|
];
|
||||||
/* Mission System Settings */
|
/* Mission System Settings */
|
||||||
|
|
||||||
|
@ -6,10 +6,18 @@
|
|||||||
DMS_HC_Object = objNull;
|
DMS_HC_Object = objNull;
|
||||||
|
|
||||||
|
|
||||||
//Load config
|
//Load main config
|
||||||
call compileFinal preprocessFileLineNumbers "\x\addons\dms\config.sqf";
|
call compileFinal preprocessFileLineNumbers "\x\addons\dms\config.sqf";
|
||||||
|
|
||||||
|
|
||||||
|
//Load map-specific configs. Should make it easier for people with multiple servers/maps. One PBO to rule them all...
|
||||||
|
if (DMS_Use_Map_Config) then
|
||||||
|
{
|
||||||
|
call compileFinal preprocessFileLineNumbers (format ["\x\addons\dms\map_configs\%1_config.sqf",toLower worldName]);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Original Functions from
|
Original Functions from
|
||||||
http://maca134.co.uk/portfolio/m3editor-arma-3-map-editor/
|
http://maca134.co.uk/portfolio/m3editor-arma-3-map-editor/
|
||||||
|
20
@ExileServer/addons/a3_dms/map_configs/altis_config.sqf
Normal file
20
@ExileServer/addons/a3_dms/map_configs/altis_config.sqf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Custom configs for Altis.
|
||||||
|
Sample by eraser1
|
||||||
|
|
||||||
|
All of these configs exist in the main config. The configs below will simply override any config from the main config (although the majority of them are the same).
|
||||||
|
Explanations to all of these configs also exist in the main config.
|
||||||
|
*/
|
||||||
|
|
||||||
|
DMS_findSafePosBlacklist =
|
||||||
|
[
|
||||||
|
[[22500,19420],[24870,16725]] // Salt flats are blacklisted for Altis by default.
|
||||||
|
];
|
||||||
|
|
||||||
|
// These configs are the default values from the main config. Just included here as an example.
|
||||||
|
DMS_PlayerNearBlacklist = 2000;
|
||||||
|
DMS_SpawnZoneNearBlacklist = 2500;
|
||||||
|
DMS_TraderZoneNearBlacklist = 2500;
|
||||||
|
DMS_MissionNearBlacklist = 2500;
|
||||||
|
DMS_WaterNearBlacklist = 500;
|
||||||
|
DMS_MaxSurfaceNormal = 0.95;
|
20
@ExileServer/addons/a3_dms/map_configs/bornholm_config.sqf
Normal file
20
@ExileServer/addons/a3_dms/map_configs/bornholm_config.sqf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
Custom configs for Bornholm.
|
||||||
|
Sample by eraser1
|
||||||
|
|
||||||
|
All of these configs exist in the main config. The configs below will simply override any config from the main config (although the majority of them are the same).
|
||||||
|
Explanations to all of these configs also exist in the main config.
|
||||||
|
*/
|
||||||
|
|
||||||
|
DMS_findSafePosBlacklist =
|
||||||
|
[
|
||||||
|
//Insert position blacklists here.
|
||||||
|
];
|
||||||
|
|
||||||
|
// These configs are the default values from the main config. Just included here as an example.
|
||||||
|
DMS_PlayerNearBlacklist = 2000;
|
||||||
|
DMS_SpawnZoneNearBlacklist = 2500;
|
||||||
|
DMS_TraderZoneNearBlacklist = 2500;
|
||||||
|
DMS_MissionNearBlacklist = 2500;
|
||||||
|
DMS_WaterNearBlacklist = 500;
|
||||||
|
DMS_MaxSurfaceNormal = 0.95;
|
23
@ExileServer/addons/a3_dms/map_configs/esseker_config.sqf
Normal file
23
@ExileServer/addons/a3_dms/map_configs/esseker_config.sqf
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
Custom configs for Esseker.
|
||||||
|
Sample by eraser1
|
||||||
|
Credit goes to "Flowrider" and "Darth Rogue" for providing tested configs.
|
||||||
|
|
||||||
|
All of these configs exist in the main config. The configs below will simply override any config from the main config.
|
||||||
|
Explanations to all of these configs also exist in the main config.
|
||||||
|
*/
|
||||||
|
|
||||||
|
DMS_findSafePosBlacklist =
|
||||||
|
[
|
||||||
|
//Insert position blacklists here.
|
||||||
|
];
|
||||||
|
|
||||||
|
// Reduce the blacklist range since Esseker is a smaller map.
|
||||||
|
DMS_PlayerNearBlacklist = 750;
|
||||||
|
DMS_SpawnZoneNearBlacklist = 1250;
|
||||||
|
DMS_TraderZoneNearBlacklist = 1250;
|
||||||
|
DMS_MissionNearBlacklist = 1250;
|
||||||
|
DMS_WaterNearBlacklist = 250;
|
||||||
|
|
||||||
|
// Esseker is a hilly map, so reduced surfaceNormal so all the missions don't spawn in the south.
|
||||||
|
DMS_MaxSurfaceNormal = 0.9;
|
23
@ExileServer/addons/a3_dms/map_configs/tavi_config.sqf
Normal file
23
@ExileServer/addons/a3_dms/map_configs/tavi_config.sqf
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
Custom configs for Tavi (Taviana).
|
||||||
|
Sample by eraser1
|
||||||
|
|
||||||
|
All of these configs exist in the main config. The configs below will simply override any config from the main config (although the majority of them are the same).
|
||||||
|
Explanations to all of these configs also exist in the main config.
|
||||||
|
*/
|
||||||
|
|
||||||
|
DMS_findSafePosBlacklist =
|
||||||
|
[
|
||||||
|
//Insert position blacklists here.
|
||||||
|
];
|
||||||
|
|
||||||
|
// These configs are the default values from the main config. Just included here as an example.
|
||||||
|
DMS_PlayerNearBlacklist = 2000;
|
||||||
|
DMS_SpawnZoneNearBlacklist = 2500;
|
||||||
|
DMS_TraderZoneNearBlacklist = 2500;
|
||||||
|
DMS_MissionNearBlacklist = 2500;
|
||||||
|
DMS_WaterNearBlacklist = 500;
|
||||||
|
|
||||||
|
|
||||||
|
// Taviana is a pretty hilly/mountainous map, so we should be a little more lenient for surfaceNormal on it
|
||||||
|
DMS_MaxSurfaceNormal = 0.9;
|
@ -148,7 +148,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -159,7 +159,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -152,7 +152,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -152,7 +152,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -75,7 +75,7 @@ _msgStart = ['#FFFF00',"We got a Blackhawk down, Super 6-1 is down, secure the p
|
|||||||
_msgWIN = ['#0080ff',"Convicts have secured the blackhawk and claimed the remaining loot!"];
|
_msgWIN = ['#0080ff',"Convicts have secured the blackhawk and claimed the remaining loot!"];
|
||||||
|
|
||||||
// Define Mission Lose message
|
// Define Mission Lose message
|
||||||
_msgLOSE = ['#FF0000',"The blackhawk has been sized by the enemy and the loot has been destroyed!"];
|
_msgLOSE = ['#FF0000',"The blackhawk has been seized by the enemy and the loot has been destroyed!"];
|
||||||
|
|
||||||
// Define mission name (for map marker and logging)
|
// Define mission name (for map marker and logging)
|
||||||
_missionName = "Blackhawk Down";
|
_missionName = "Blackhawk Down";
|
||||||
@ -152,7 +152,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -163,7 +163,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -155,7 +155,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -166,7 +166,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -69,7 +69,7 @@ _missionObjs =
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Define Mission Start message
|
// Define Mission Start message
|
||||||
_msgStart = ['#FFFF00',"A food supply truck has been sized by ruthless bandits. Stop them!"];
|
_msgStart = ['#FFFF00',"A food supply truck has been seized by ruthless bandits. Stop them!"];
|
||||||
|
|
||||||
// Define Mission Win message
|
// Define Mission Win message
|
||||||
_msgWIN = ['#0080ff',"Convicts have successfully claimed the food supplies!"];
|
_msgWIN = ['#0080ff',"Convicts have successfully claimed the food supplies!"];
|
||||||
@ -152,7 +152,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -152,7 +152,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -69,7 +69,7 @@ _missionObjs =
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Define Mission Start message
|
// Define Mission Start message
|
||||||
_msgStart = ['#FFFF00',"A truck carrying humanitarian supplies has been sized by bandits. Stop them!"];
|
_msgStart = ['#FFFF00',"A truck carrying humanitarian supplies has been seized by bandits. Stop them!"];
|
||||||
|
|
||||||
// Define Mission Win message
|
// Define Mission Win message
|
||||||
_msgWIN = ['#0080ff',"Convicts have successfully claimed the humanitarian supplies for themselves!"];
|
_msgWIN = ['#0080ff',"Convicts have successfully claimed the humanitarian supplies for themselves!"];
|
||||||
@ -152,7 +152,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -150,7 +150,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
||||||
|
@ -152,7 +152,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -183,7 +183,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -150,7 +150,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -150,7 +150,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -197,7 +197,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -143,7 +143,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -151,7 +151,4 @@ if !(_added) exitWith
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MISSION: (%1) :: Mission #%2 started at %3 with %4 AI units and %5 difficulty at time %6",_missionName,_num,_pos,_AICount,_difficulty,_time];
|
|
||||||
};
|
|
@ -18,10 +18,8 @@ if (!DMS_ai_offload_to_client && {isNull DMS_HC_Object}) exitWith {};
|
|||||||
{
|
{
|
||||||
if (isNull DMS_HC_Object) then
|
if (isNull DMS_HC_Object) then
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
|
||||||
{
|
(format ["AILocalityManager :: DMS_HC_Object is null! Finding owner for group: %1",_group]) call DMS_fnc_DebugLog;
|
||||||
diag_log format ["DMS_DEBUG AILocalityManager :: DMS_HC_Object is null! Finding owner for group: %1",_group];
|
|
||||||
};
|
|
||||||
_owner = objNull;
|
_owner = objNull;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -41,10 +39,7 @@ if (!DMS_ai_offload_to_client && {isNull DMS_HC_Object}) exitWith {};
|
|||||||
if !((groupOwner _group) isEqualTo (owner DMS_HC_Object)) then
|
if !((groupOwner _group) isEqualTo (owner DMS_HC_Object)) then
|
||||||
{
|
{
|
||||||
_transferSuccess = _group setGroupOwner (owner DMS_HC_Object);
|
_transferSuccess = _group setGroupOwner (owner DMS_HC_Object);
|
||||||
if (DMS_DEBUG) then
|
(format ["AILocalityManager :: Setting ownership of group %1 to HC (%2). Success: %3",_group,DMS_HC_Object,_transferSuccess]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG AILocalityManager :: Setting ownership of group %1 to HC (%2). Success: %3",_group,DMS_HC_Object,_transferSuccess];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -193,14 +193,11 @@ try
|
|||||||
_markerDot setMarkerText (format ["%1 (%2 %3 remaining)",markerText _markerDot,count _units,DMS_MarkerText_AIName]);
|
_markerDot setMarkerText (format ["%1 (%2 %3 remaining)",markerText _markerDot,count _units,DMS_MarkerText_AIName]);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["AddMissionToMonitor :: Added |%1| to DMS_Mission_Arr!",_arr]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG AddMissionToMonitor :: Added |%1| to DMS_Mission_Arr!",_arr];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
diag_log format ["DMS_AddMissionToMonitor ERROR :: Invalid parameter: %1",_exception];
|
diag_log format ["DMS ERROR :: Calling DMS_AddMissionToMonitor with invalid parameter: %1",_exception];
|
||||||
};
|
};
|
||||||
|
|
||||||
_added
|
_added
|
@ -34,10 +34,7 @@ _messageInfo params
|
|||||||
["_message","",[""]]
|
["_message","",[""]]
|
||||||
];
|
];
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format["BroadcastMissionStatus :: Notification types: |%1| for broadcasting mission status: %2",DMS_PlayerNotificationTypes,_message]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format["DMS_DEBUG BroadcastMissionStatus :: Notification types: |%1| for broadcasting mission status: %2",DMS_PlayerNotificationTypes,_message];
|
|
||||||
};
|
|
||||||
|
|
||||||
if ((typeName _message) != "STRING") then
|
if ((typeName _message) != "STRING") then
|
||||||
{
|
{
|
||||||
|
@ -15,10 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["CleanUp :: CLEANING UP: %1",_this]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log ("DMS_DEBUG CleanUp :: CLEANING UP: "+str _this);
|
|
||||||
};
|
|
||||||
|
|
||||||
if !((typeName _this) == "ARRAY") then
|
if !((typeName _this) == "ARRAY") then
|
||||||
{
|
{
|
||||||
@ -62,10 +59,7 @@ _clean =
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_skippedObjects pushBack _x;
|
_skippedObjects pushBack _x;
|
||||||
if (DMS_DEBUG) then
|
(format ["CleanUp :: Skipping cleanup for |%1|, player within %2 meters!",_x,DMS_CleanUp_PlayerNearLimit]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG CleanUp :: Skipping cleanup for |%1|, player within %2 meters!",_x,DMS_CleanUp_PlayerNearLimit];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -91,10 +85,7 @@ _clean =
|
|||||||
};
|
};
|
||||||
if ((typeName _x) == "ARRAY") exitWith
|
if ((typeName _x) == "ARRAY") exitWith
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
(format ["CleanUp :: Doing recursive call for ARRAY: %1",_x]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG CleanUp :: Doing recursive call for ARRAY: %1",_x];
|
|
||||||
};
|
|
||||||
_x call DMS_fnc_CleanUp;
|
_x call DMS_fnc_CleanUp;
|
||||||
};
|
};
|
||||||
diag_log format ["DMS ERROR :: Attempted to call DMS_fnc_CleanUp on non- group or object %1 from array %2",_x,_this];
|
diag_log format ["DMS ERROR :: Attempted to call DMS_fnc_CleanUp on non- group or object %1 from array %2",_x,_this];
|
||||||
|
@ -20,10 +20,7 @@
|
|||||||
if (DMS_CleanUpList isEqualTo []) exitWith {}; // Empty array, no objects to clean :)
|
if (DMS_CleanUpList isEqualTo []) exitWith {}; // Empty array, no objects to clean :)
|
||||||
|
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
(format ["CleanUpManager :: Checking Cleaning Status for: %1",_x]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG CleanUpManager :: Checking Cleaning Status for: %1",_x];
|
|
||||||
};
|
|
||||||
|
|
||||||
private ["_objs","_timeAddedToList","_timeUntilClean"];
|
private ["_objs","_timeAddedToList","_timeUntilClean"];
|
||||||
|
|
||||||
@ -45,9 +42,6 @@ if (DMS_CleanUpList isEqualTo []) exitWith {}; // Empty array, no objects to cl
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
(format ["CleanUpManager :: %1 is not yet ready to clean!",_x]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG CleanUpManager :: %1 is not yet ready to clean!",_x];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} forEach DMS_CleanUpList;
|
} forEach DMS_CleanUpList;
|
@ -83,16 +83,10 @@ if (_randomMarker) then
|
|||||||
_dot setMarkerPos _npos;
|
_dot setMarkerPos _npos;
|
||||||
_circle setMarkerBrush DMS_RandomMarkerBrush;
|
_circle setMarkerBrush DMS_RandomMarkerBrush;
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["CreateMarker :: Moving markers %1 from %2 to %3 (%4m away)",[_dot,_circle],_pos,_npos,_dis]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["Moving markers %1 from %2 to %3 (%4m away)",[_dot,_circle],_pos,_npos,_dis];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["CreateMarker :: Created markers |%1| at %2 with text |%3| colored %4",[_dot,_circle],_pos,_text,_color]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG CreateMarker :: Created markers |%1| at %2 with text |%3| colored %4",[_dot,_circle],_pos,_text,_color];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
[_dot,_circle];
|
[_dot,_circle];
|
16
@ExileServer/addons/a3_dms/scripts/fn_DebugLog.sqf
Normal file
16
@ExileServer/addons/a3_dms/scripts/fn_DebugLog.sqf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
DMS_fnc_DebugLog
|
||||||
|
Created by eraser1
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
_anyValue call DMS_fnc_DebugLog;
|
||||||
|
|
||||||
|
If DMS_DEBUG is true, then it will write the passed parameter to RPT. If you have infistar, then it will also utilize the "ARMA_LOG" dll to write debug info.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (DMS_DEBUG) then
|
||||||
|
{
|
||||||
|
_this = format ["%1 |::|::| (UpTime: %2 | %3 FPS)",_this,time,diag_fps];
|
||||||
|
"ARMA_LOG" callExtension format ["DMS_DEBUG:%1",_this];
|
||||||
|
diag_log format ["DMS_DEBUG :: %1",_this];
|
||||||
|
};
|
@ -90,10 +90,7 @@ if ((typeName _lootValues)=="ARRAY") then
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if(DMS_DEBUG) then
|
(format["FillCrate :: Filling %4 with %1 guns, %2 items and %3 backpacks",_wepCount,_itemCount,_backpackCount,_crate]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format["DMS_DEBUG FillCrate :: Filling %4 with %1 guns, %2 items and %3 backpacks",_wepCount,_itemCount,_backpackCount,_crate];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
if ((_wepCount>0) && {count _weps>0}) then
|
if ((_wepCount>0) && {count _weps>0}) then
|
||||||
|
@ -64,20 +64,14 @@ while{!_validspot} do
|
|||||||
_missionNearLimit = (DMS_ThrottleCoefficient * _missionNearLimit) max DMS_MinThrottledDistance;
|
_missionNearLimit = (DMS_ThrottleCoefficient * _missionNearLimit) max DMS_MinThrottledDistance;
|
||||||
_playerNearLimit = (DMS_ThrottleCoefficient * _playerNearLimit) max DMS_MinThrottledDistance;
|
_playerNearLimit = (DMS_ThrottleCoefficient * _playerNearLimit) max DMS_MinThrottledDistance;
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["FindSafePos :: Throttling _missionNearLimit to %1 and _playerNearLimit to %2 after %3 failed attempts to find a safe position! FPS: %4",_missionNearLimit,_playerNearLimit,_attempts,diag_fps]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG FindSafePos :: Throttling _missionNearLimit to %1 and _playerNearLimit to %2 after %3 failed attempts to find a safe position! FPS: %4",_missionNearLimit,_playerNearLimit,_attempts,diag_fps];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_validspot = [_pos, _waterNearLimit, _maxSurfaceNormal, _spawnZoneNearLimit, _traderZoneNearLimit, _missionNearLimit, _playerNearLimit] call DMS_fnc_IsValidPosition;
|
_validspot = [_pos, _waterNearLimit, _maxSurfaceNormal, _spawnZoneNearLimit, _traderZoneNearLimit, _missionNearLimit, _playerNearLimit] call DMS_fnc_IsValidPosition;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if(DMS_DEBUG) then
|
(format["FindSafePos :: Found mission position %1 with %2 params in %3 attempts. _this: %4",_pos,_safePosParams,_attempts,_this]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format["DMS_DEBUG FindSafePos :: Found mission position %1 with %2 params in %3 attempts. _this: %4",_pos,_safePosParams,_attempts,_this];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
_pos set [2, 0];
|
_pos set [2, 0];
|
||||||
|
@ -13,12 +13,19 @@
|
|||||||
|
|
||||||
private["_result","_position","_radius"];
|
private["_result","_position","_radius"];
|
||||||
|
|
||||||
_result = false;
|
|
||||||
_position = _this select 0;
|
_position = _this select 0;
|
||||||
_radius = _this select 1;
|
_radius = _this select 1;
|
||||||
|
|
||||||
|
|
||||||
|
_result = false;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (surfaceIsWater _position) then
|
||||||
|
{
|
||||||
|
throw true;
|
||||||
|
};
|
||||||
|
|
||||||
for "_i" from 0 to 359 step 45 do
|
for "_i" from 0 to 359 step 45 do
|
||||||
{
|
{
|
||||||
if (surfaceIsWater ([_position,_radius,_i] call DMS_fnc_SelectOffsetPos)) then
|
if (surfaceIsWater ([_position,_radius,_i] call DMS_fnc_SelectOffsetPos)) then
|
||||||
|
@ -40,10 +40,7 @@ try
|
|||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
_isNear = true;
|
_isNear = true;
|
||||||
if (DMS_DEBUG) then
|
(format ["IsPlayerNearby :: %1 is within %2 meters of %3!",_exception,_dis,_pos]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG IsPlayerNearby :: %1 is within %2 meters of %3!",_exception,_dis,_pos];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_pos", "_waterNearLimit", "_maxSurfaceNormal", "_spawnZoneNearLimit", "_traderZoneNearLimit", "_missionNearLimit", "_playerNearLimit"];
|
private ["_pos", "_waterNearLimit", "_maxSurfaceNormal", "_spawnZoneNearLimit", "_traderZoneNearLimit", "_missionNearLimit", "_playerNearLimit", "_dir"];
|
||||||
|
|
||||||
_OK = params
|
_OK = params
|
||||||
[
|
[
|
||||||
@ -51,6 +51,15 @@ else
|
|||||||
if (((surfaceNormal _pos) select 2)<_maxSurfaceNormal) then
|
if (((surfaceNormal _pos) select 2)<_maxSurfaceNormal) then
|
||||||
{
|
{
|
||||||
throw ("a steep location");
|
throw ("a steep location");
|
||||||
|
|
||||||
|
// Check the surrounding area (within 5 meters)
|
||||||
|
for "_dir" from 0 to 359 step 45 do
|
||||||
|
{
|
||||||
|
if (((surfaceNormal ([_position,5,_dir] call DMS_fnc_SelectOffsetPos)) select 2)<_maxSurfaceNormal) then
|
||||||
|
{
|
||||||
|
throw ("a nearby steep location");
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -89,10 +98,7 @@ else
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
(format ["IsValidPosition :: Exception in attempt %1 | Position %2 is too close to %3!",_attempts,_pos,_exception]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG IsValidPosition :: Exception in attempt %1 | Position %2 is too close to %3!",_attempts,_pos,_exception];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,10 +53,7 @@ _exit = false;
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["MissionSuccessState :: Checking completion type ""%1"" with argument |%2|. Absolute: %3",_completionType,_completionArgs,_absoluteWinCondition]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MissionSuccessState :: Checking completion type %1 with parameter %2. Absolute: %3",_completionType,_completionArgs,_absoluteWinCondition];
|
|
||||||
};
|
|
||||||
|
|
||||||
switch (toLower _completionType) do
|
switch (toLower _completionType) do
|
||||||
{
|
{
|
||||||
@ -90,10 +87,7 @@ _exit = false;
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
(format ["MissionSuccessState :: %1",_exception]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MissionSuccessState :: %1",_exception];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} forEach _this;
|
} forEach _this;
|
||||||
|
|
||||||
|
@ -31,10 +31,6 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MissionStatusCheck :: Checking Mission Status (index %1): %2",_forEachIndex,_x];
|
|
||||||
};
|
|
||||||
_pos = _x select 0;
|
_pos = _x select 0;
|
||||||
_success = (_x select 1) call DMS_fnc_MissionSuccessState;
|
_success = (_x select 1) call DMS_fnc_MissionSuccessState;
|
||||||
_timeStarted = _x select 2 select 0;
|
_timeStarted = _x select 2 select 0;
|
||||||
@ -50,6 +46,8 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
|||||||
_markers = _x select 6;
|
_markers = _x select 6;
|
||||||
_missionSide = _x select 7;
|
_missionSide = _x select 7;
|
||||||
|
|
||||||
|
(format ["MissionStatusCheck :: Checking Mission Status (index %1): ""%2"" at %3",_forEachIndex,_missionName,_pos]) call DMS_fnc_DebugLog;
|
||||||
|
|
||||||
if (_success) then
|
if (_success) then
|
||||||
{
|
{
|
||||||
DMS_CleanUpList pushBack [_units+_buildings,diag_tickTime,DMS_CompletedMissionCleanupTime];
|
DMS_CleanUpList pushBack [_units+_buildings,diag_tickTime,DMS_CompletedMissionCleanupTime];
|
||||||
@ -163,9 +161,6 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
(format ["MissionStatusCheck :: %1",_exception]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG MissionStatusCheck :: %1",_exception];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
} forEach DMS_Mission_Arr;
|
} forEach DMS_Mission_Arr;
|
@ -18,10 +18,7 @@
|
|||||||
private ["_unit", "_killer", "_side", "_type", "_launcher", "_launcherVar", "_playerObj", "_removeAll", "_rockets", "_grpUnits", "_av", "_memCount", "_gunner", "_driver", "_gunnerIsAlive", "_driverIsAlive", "_grp", "_owner", "_start", "_roadKilled", "_veh", "_boom", "_revealAmount", "_silencer", "_moneyChange", "_repChange", "_money", "_respect", "_msgType", "_msgParams"];
|
private ["_unit", "_killer", "_side", "_type", "_launcher", "_launcherVar", "_playerObj", "_removeAll", "_rockets", "_grpUnits", "_av", "_memCount", "_gunner", "_driver", "_gunnerIsAlive", "_driverIsAlive", "_grp", "_owner", "_start", "_roadKilled", "_veh", "_boom", "_revealAmount", "_silencer", "_moneyChange", "_repChange", "_money", "_respect", "_msgType", "_msgParams"];
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["OnKilled :: Logging AI death with parameters: %1",_this]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG OnKilled :: Logging AI death with parameters: %1",_this];
|
|
||||||
};
|
|
||||||
|
|
||||||
_unit = _this select 0 select 0;
|
_unit = _this select 0 select 0;
|
||||||
_killer = _this select 0 select 1;
|
_killer = _this select 0 select 1;
|
||||||
@ -112,10 +109,7 @@ if (!isNull _av) then
|
|||||||
_av spawn {sleep 1;_this enableSimulationGlobal false;};
|
_av spawn {sleep 1;_this enableSimulationGlobal false;};
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format["OnKilled :: Destroying used AI vehicle %1, disabling simulation, and adding to cleanup.",typeOf _av]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format["DMS_DEBUG OnKilled :: Destroying used AI vehicle %1, disabling simulation, and adding to cleanup.",typeOf _av];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -188,10 +182,7 @@ if (!isNull _av) then
|
|||||||
|
|
||||||
_driver enableCollisionWith _av;
|
_driver enableCollisionWith _av;
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format["OnKilled :: Switched driver of AI Vehicle (%1) to gunner.",typeOf _av]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format["DMS_DEBUG OnKilled :: Switched driver of AI Vehicle (%1) to gunner.",typeOf _av];
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_owner!=2) then
|
if (_owner!=2) then
|
||||||
{
|
{
|
||||||
@ -263,10 +254,7 @@ if (isPlayer _killer) then
|
|||||||
{
|
{
|
||||||
_boom = createVehicle ["SLAMDirectionalMine_Wire_Ammo", ASLToAGL(getPosWorld _unit), [], 0, "CAN_COLLIDE"];
|
_boom = createVehicle ["SLAMDirectionalMine_Wire_Ammo", ASLToAGL(getPosWorld _unit), [], 0, "CAN_COLLIDE"];
|
||||||
_boom setDamage 1;
|
_boom setDamage 1;
|
||||||
if (DMS_DEBUG) then
|
(format ["OnKilled :: %1 roadkilled an AI! Creating mine at the roadkilled AI's position!",name _killer]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG OnKilled :: %1 roadkilled an AI! Creating mine at the roadkilled AI's position!",name _killer];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,10 +20,7 @@ _status = _this select 1;
|
|||||||
_text = missionNamespace getVariable [format ["%1_text",_markerDot],markerText _markerDot];
|
_text = missionNamespace getVariable [format ["%1_text",_markerDot],markerText _markerDot];
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["RemoveMarkers :: Calling DMS_RemoveMarkers with parameters %1.",_this]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG RemoveMarkers :: Calling DMS_RemoveMarkers with parameters %1.",_this];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
deleteMarker _markerCircle;
|
deleteMarker _markerCircle;
|
||||||
@ -40,10 +37,7 @@ if (_status == "win") then
|
|||||||
_markerDot setMarkerColor DMS_MissionMarkerWinDotColor;
|
_markerDot setMarkerColor DMS_MissionMarkerWinDotColor;
|
||||||
//_markerDot spawn {sleep DMS_MissionMarkerWinDotTime;deleteMarker _this;};
|
//_markerDot spawn {sleep DMS_MissionMarkerWinDotTime;deleteMarker _this;};
|
||||||
[DMS_MissionMarkerWinDotTime, {deleteMarker _this;}, _markerDot, false] call ExileServer_system_thread_addTask;
|
[DMS_MissionMarkerWinDotTime, {deleteMarker _this;}, _markerDot, false] call ExileServer_system_thread_addTask;
|
||||||
if (DMS_DEBUG) then
|
(format ["RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerWinDotTime]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerWinDotTime];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -55,8 +49,5 @@ else
|
|||||||
_markerDot setMarkerColor DMS_MissionMarkerLoseDotColor;
|
_markerDot setMarkerColor DMS_MissionMarkerLoseDotColor;
|
||||||
//_markerDot spawn {sleep DMS_MissionMarkerLoseDotTime;deleteMarker _this;};
|
//_markerDot spawn {sleep DMS_MissionMarkerLoseDotTime;deleteMarker _this;};
|
||||||
[DMS_MissionMarkerLoseDotTime, {deleteMarker _this;}, _markerDot, false] call ExileServer_system_thread_addTask;
|
[DMS_MissionMarkerLoseDotTime, {deleteMarker _this;}, _markerDot, false] call ExileServer_system_thread_addTask;
|
||||||
if (DMS_DEBUG) then
|
(format ["RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerLoseDotTime]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerLoseDotTime];
|
|
||||||
};
|
|
||||||
};
|
};
|
@ -48,15 +48,9 @@ _client = objNull;
|
|||||||
if (!isNull _client) then
|
if (!isNull _client) then
|
||||||
{
|
{
|
||||||
ExileServerOwnershipSwapQueue pushBack [_AI,_client];
|
ExileServerOwnershipSwapQueue pushBack [_AI,_client];
|
||||||
if (DMS_DEBUG) then
|
(format ["SetAILocality :: Ownership swap of %1 (%4) to %2 (%3) is added to ExileServerOwnershipSwapQueue.",_AI,name _client,getPlayerUID _client,typeName _AI]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG SetAILocality :: Ownership swap of %1 (%4) to %2 (%3) is added to ExileServerOwnershipSwapQueue.",_AI,name _client,getPlayerUID _client,typeName _AI];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
(format ["SetAILocality :: No viable client found for the ownership of %1!",_AI]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG SetAILocality :: No viable client found for the ownership of %1!",_AI];
|
|
||||||
};
|
|
||||||
};
|
};
|
@ -35,10 +35,7 @@ _pos_y = _pos select 1;
|
|||||||
_pos_z = _pos select 2;
|
_pos_z = _pos select 2;
|
||||||
|
|
||||||
|
|
||||||
if(DMS_DEBUG) then
|
(format["SpawnAIGroup :: Spawning %1 %2 %3 AI at %4 with %5 difficulty.",_count,_class,_side,_pos,_difficulty]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format["DMS_DEBUG SpawnAIGroup :: Spawning %1 %2 %3 AI at %4 with %5 difficulty.",_count,_class,_side,_pos,_difficulty];
|
|
||||||
};
|
|
||||||
|
|
||||||
// if soldier have AT/AA weapons
|
// if soldier have AT/AA weapons
|
||||||
if (typeName _class == "ARRAY") then
|
if (typeName _class == "ARRAY") then
|
||||||
@ -100,10 +97,7 @@ if ((!isNil "_launcher") || {DMS_ai_use_launchers && {(random 100) <= DMS_ai_use
|
|||||||
|
|
||||||
_unit setVariable ["DMS_AI_Launcher",_launcher];
|
_unit setVariable ["DMS_AI_Launcher",_launcher];
|
||||||
|
|
||||||
if(DMS_DEBUG) then
|
(format["SpawnAIGroup :: Giving %1 a %2 launcher with %3 %4 rockets",_unit,_launcher,DMS_AI_launcher_ammo_count,_rocket]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format["DMS_DEBUG SpawnAIGroup :: Giving %1 a %2 launcher with %3 %4 rockets",_unit,_launcher,DMS_AI_launcher_ammo_count,_rocket];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
[
|
[
|
||||||
_group, // Group the AI will belong to
|
_group, // Group the AI will belong to
|
||||||
_pos, // Position of AI
|
_pos, // Position of AI
|
||||||
_class, // Classname: "random","assault","MG","sniper" or "unarmed"
|
_class, // Classname: "random","assault","MG","sniper" or "unarmed". Use "custom" to use "_customGearSet"
|
||||||
_difficulty, // Difficulty: "random","static","hardcore","difficult","moderate", or "easy"
|
_difficulty, // Difficulty: "random","static","hardcore","difficult","moderate", or "easy"
|
||||||
_side, // "bandit","hero", etc.
|
_side, // "bandit","hero", etc.
|
||||||
_type, // Type of AI: "soldier","static","vehicle","heli", etc.
|
_type, // Type of AI: "soldier","static","vehicle","heli", etc.
|
||||||
@ -18,10 +18,10 @@
|
|||||||
[
|
[
|
||||||
_weapon, // String | EG: "LMG_Zafir_F"
|
_weapon, // String | EG: "LMG_Zafir_F"
|
||||||
_weaponAttachments, // Array of strings | EG: ["optic_dms","bipod_03_F_blk"]
|
_weaponAttachments, // Array of strings | EG: ["optic_dms","bipod_03_F_blk"]
|
||||||
_magazines, // Array of arrays | EG: [["150Rnd_762x54_Box",2],["16Rnd_9x21_Mag",3]]
|
_magazines, // Array of arrays | EG: [["150Rnd_762x54_Box",2],["16Rnd_9x21_Mag",3],["Exile_Item_InstaDoc",3]]
|
||||||
_pistol, // String | EG: "hgun_Pistol_heavy_01_snds_F"
|
_pistol, // String | EG: "hgun_Pistol_heavy_01_snds_F"
|
||||||
_pistolAttachments, // Array of strings | EG: ["optic_MRD","muzzle_snds_acp"]
|
_pistolAttachments, // Array of strings | EG: ["optic_MRD","muzzle_snds_acp"]
|
||||||
_items, // Array of strings | EG: ["Rangefinder","ItemGPS","Exile_Item_InstaDoc"]
|
_assignedItems, // Array of strings | EG: ["Rangefinder","ItemGPS","NVGoggles"]
|
||||||
_launcher, // String | EG: "launch_RPG32_F"
|
_launcher, // String | EG: "launch_RPG32_F"
|
||||||
_helmet, // String | EG: "H_HelmetLeaderO_ocamo"
|
_helmet, // String | EG: "H_HelmetLeaderO_ocamo"
|
||||||
_uniform, // String | EG: "U_O_GhillieSuit"
|
_uniform, // String | EG: "U_O_GhillieSuit"
|
||||||
@ -32,7 +32,7 @@
|
|||||||
Returns AI Unit
|
Returns AI Unit
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private ["_OK", "_useCustomGear", "_unarmed", "_class", "_type", "_unit", "_side", "_nighttime", "_weapon", "_muzzle", "_suppressor", "_pistols", "_pistol", "_customGearSet", "_helmet", "_uniform", "_vest", "_backpack", "_launcher", "_magazines", "_weaponAttachments", "_pistolAttachments", "_items", "_difficulty", "_skillArray"];
|
private ["_OK", "_useCustomGear", "_unarmed", "_class", "_type", "_unit", "_side", "_nighttime", "_weapon", "_muzzle", "_suppressor", "_pistols", "_pistol", "_customGearSet", "_helmet", "_uniform", "_vest", "_backpack", "_launcher", "_magazines", "_weaponAttachments", "_pistolAttachments", "_assignedItems", "_difficulty", "_skillArray"];
|
||||||
|
|
||||||
_OK = params
|
_OK = params
|
||||||
[
|
[
|
||||||
@ -55,7 +55,7 @@ else
|
|||||||
{
|
{
|
||||||
if ((_class == "custom") && {((count _this)>6)}) then
|
if ((_class == "custom") && {((count _this)>6)}) then
|
||||||
{
|
{
|
||||||
_customGearSet = _this select 5;
|
_customGearSet = _this select 6;
|
||||||
_useCustomGear = true;
|
_useCustomGear = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -71,14 +71,14 @@ _unit allowFleeing 0;
|
|||||||
[_unit] joinSilent _group;
|
[_unit] joinSilent _group;
|
||||||
|
|
||||||
// Remove existing gear
|
// Remove existing gear
|
||||||
removeAllWeapons _unit;
|
{_unit removeWeaponGlobal _x;} forEach (weapons _unit);
|
||||||
removeAllItems _unit;
|
{_unit unlinkItem _x;} forEach (assignedItems _unit);
|
||||||
removeAllAssignedItems _unit;
|
{_unit removeItem _x;} forEach (items _unit);
|
||||||
removeUniform _unit;
|
removeAllItemsWithMagazines _unit;
|
||||||
removeVest _unit;
|
removeHeadgear _unit;
|
||||||
removeBackpack _unit;
|
removeUniform _unit;
|
||||||
removeHeadgear _unit;
|
removeVest _unit;
|
||||||
removeGoggles _unit;
|
removeBackpackGlobal _unit;
|
||||||
|
|
||||||
// Give default items
|
// Give default items
|
||||||
if !(DMS_ai_default_items isEqualTo []) then
|
if !(DMS_ai_default_items isEqualTo []) then
|
||||||
@ -111,6 +111,7 @@ if (!_useCustomGear) then
|
|||||||
if !(_class in DMS_ai_SupportedClasses) exitWith
|
if !(_class in DMS_ai_SupportedClasses) exitWith
|
||||||
{
|
{
|
||||||
diag_log format ["DMS ERROR :: DMS_SpawnAISoldier called with unsupported _class: %1 | _this: %2",_class,_this];
|
diag_log format ["DMS ERROR :: DMS_SpawnAISoldier called with unsupported _class: %1 | _this: %2",_class,_this];
|
||||||
|
deleteVehicle _unit;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -207,7 +208,7 @@ else
|
|||||||
["_magazines",[],[[]]],
|
["_magazines",[],[[]]],
|
||||||
["_pistol","",[""]],
|
["_pistol","",[""]],
|
||||||
["_pistolAttachments",[],[[]]],
|
["_pistolAttachments",[],[[]]],
|
||||||
["_items",[],[[]]],
|
["_assignedItems",[],[[]]],
|
||||||
["_launcher","",[""]],
|
["_launcher","",[""]],
|
||||||
["_helmet","",[""]],
|
["_helmet","",[""]],
|
||||||
["_uniform","",[""]],
|
["_uniform","",[""]],
|
||||||
@ -220,10 +221,7 @@ else
|
|||||||
diag_log format ["DMS ERROR :: Calling DMS_SpawnAISoldier with invalid _customGearSet: %1 | _this: %2",_customGearSet,_this];
|
diag_log format ["DMS ERROR :: Calling DMS_SpawnAISoldier with invalid _customGearSet: %1 | _this: %2",_customGearSet,_this];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["SpawnAISoldier :: Equipping unit %1 with _customGearSet: %2",_unit,_customGearSet]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG SpawnAISoldier :: Equipping unit %1 with _customGearSet: %2",_unit,_customGearSet];
|
|
||||||
};
|
|
||||||
|
|
||||||
// Clothes
|
// Clothes
|
||||||
if !(_helmet isEqualTo "") then
|
if !(_helmet isEqualTo "") then
|
||||||
@ -261,6 +259,29 @@ else
|
|||||||
_unit addMagazines _x;
|
_unit addMagazines _x;
|
||||||
} forEach _magazines;
|
} forEach _magazines;
|
||||||
|
|
||||||
|
// Add items
|
||||||
|
{
|
||||||
|
if (_x in ["Binocular","Rangefinder","Laserdesignator","Laserdesignator_02","Laserdesignator_03"]) then
|
||||||
|
{
|
||||||
|
_unit addWeapon _x;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_unit linkItem _x;
|
||||||
|
};
|
||||||
|
} forEach _assignedItems;
|
||||||
|
|
||||||
|
|
||||||
|
// Add pistol and attachments
|
||||||
|
if !(_pistol isEqualTo "") then
|
||||||
|
{
|
||||||
|
[_unit, _pistol, 0] call BIS_fnc_addWeapon;
|
||||||
|
|
||||||
|
{
|
||||||
|
_unit addHandgunItem _x;
|
||||||
|
} forEach _pistolAttachments;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// Add gun and attachments
|
// Add gun and attachments
|
||||||
if !(_weapon isEqualTo "") then
|
if !(_weapon isEqualTo "") then
|
||||||
@ -273,22 +294,6 @@ else
|
|||||||
|
|
||||||
_unit selectWeapon _weapon;
|
_unit selectWeapon _weapon;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Add pistol and attachments
|
|
||||||
if !(_pistol isEqualTo "") then
|
|
||||||
{
|
|
||||||
[_unit, _pistol, 0] call BIS_fnc_addWeapon;
|
|
||||||
|
|
||||||
{
|
|
||||||
_unit addPrimaryWeaponItem _x;
|
|
||||||
} forEach _pistolAttachments;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Add items
|
|
||||||
{
|
|
||||||
_unit addItem _x;
|
|
||||||
} forEach _items;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -325,9 +330,6 @@ if (_type=="Soldier") then
|
|||||||
_unit setVariable ["DMS_LastAIDistanceCheck",time];
|
_unit setVariable ["DMS_LastAIDistanceCheck",time];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["SpawnAISoldier :: Spawned a %1 %2 %6 AI at %3 with %4 difficulty to group %5",_class,_side,_pos,_difficulty,_group,_type]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG SpawnAISoldier :: Spawned a %1 %2 %6 AI at %3 with %4 difficulty to group %5",_class,_side,_pos,_difficulty,_group,_type];
|
|
||||||
};
|
|
||||||
|
|
||||||
_unit
|
_unit
|
||||||
|
@ -70,16 +70,10 @@ _guns = [];
|
|||||||
reload _unit;
|
reload _unit;
|
||||||
_unit setVariable ["DMS_AssignedVeh",_gun];
|
_unit setVariable ["DMS_AssignedVeh",_gun];
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["SpawnAIStatic :: Created unit %1 at %2 as static gunner in %3",_unit,_pos,_gun]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG SpawnAIStatic :: Created unit %1 at %2 as static gunner in %3",_unit,_pos,_gun];
|
|
||||||
};
|
|
||||||
} forEach _positions;
|
} forEach _positions;
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["SpawnAIStatic :: Created %1 static AI with parameters: %2",count _positions,_this]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG SpawnAIStatic :: Created %1 static AI with parameters: %2",count _positions,_this];
|
|
||||||
};
|
|
||||||
|
|
||||||
_guns
|
_guns
|
@ -81,9 +81,6 @@ _gunner setVariable ["DMS_AssignedVeh",_veh];
|
|||||||
|
|
||||||
[_driver,_gunner] joinSilent _group;
|
[_driver,_gunner] joinSilent _group;
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["SpawnAIVehicle :: Created a %1 armed vehicle (%2) at %3 with %4 difficulty to group %5",_side,_vehClass,_spawnPos,_difficulty,_group]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG SpawnAIVehicle :: Created a %1 armed vehicle (%2) at %3 with %4 difficulty to group %5",_side,_vehClass,_spawnPos,_difficulty,_group];
|
|
||||||
};
|
|
||||||
|
|
||||||
_veh
|
_veh
|
@ -39,8 +39,5 @@ else
|
|||||||
DMS_BMissionLastStart = diag_tickTime;
|
DMS_BMissionLastStart = diag_tickTime;
|
||||||
|
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["SelectMission :: Spawned mission %1 with parameters (%2) | DMS_BMissionDelay set to %3 seconds",str _missionType,_parameters,DMS_BMissionDelay]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG SelectMission :: Spawned mission %1 with parameters (%2) | DMS_BMissionDelay set to %3 seconds",str _missionType,_parameters,DMS_BMissionDelay];
|
|
||||||
};
|
|
||||||
};
|
};
|
@ -92,10 +92,7 @@ if (DMS_SpawnMinesAroundMissions) then
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["SpawnMinefield :: Spawned %1 mines around %2 with _minesInfo: %3 | Warning signs spawned: %5 | _mines: %4",_mineCount,_centerPos,_minesInfo,_mines,_spawnWarningSign]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG SpawnMinefield :: Spawned %1 mines around %2 with _minesInfo: %3 | Warning signs spawned: %5 | _mines: %4",_mineCount,_centerPos,_minesInfo,_mines,_spawnWarningSign];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,10 +95,7 @@ _vehObj allowDamage false;
|
|||||||
_vehObj enableRopeAttach false;
|
_vehObj enableRopeAttach false;
|
||||||
_vehObj enableSimulationGlobal false;
|
_vehObj enableSimulationGlobal false;
|
||||||
|
|
||||||
if (DMS_DEBUG) then
|
(format ["SpawnNonPersistentVehicle :: Created %1 at %2 with calling parameters: %3",_vehObj,_vehpos,_this]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG SpawnNonPersistentVehicle :: Created %1 at %2 with calling parameters: %3",_vehObj,_vehpos,_this];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
_vehObj
|
_vehObj
|
||||||
|
@ -80,10 +80,7 @@ try
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
if (DMS_DEBUG) then
|
(format ["TargetsKilled :: %1 is still alive! All of %2 are not yet killed!",_exception,_this]) call DMS_fnc_DebugLog;
|
||||||
{
|
|
||||||
diag_log format ["DMS_DEBUG TargetsKilled :: %1 is still alive! All of %2 are not yet killed!",_exception,_this];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_killed;
|
_killed;
|
Binary file not shown.
48
README.md
48
README.md
@ -1,3 +1,15 @@
|
|||||||
|
# To the User:
|
||||||
|
####Please read through the instructions carefully. Please read through the [DMS "config.sqf"](https://github.com/Defent/DMS_Exile/blob/master/%40ExileServer/addons/a3_dms/config.sqf) before leaving any questions regarding DMS; the majority of the questions we receive are answered (directly or indirectly) by the config.
|
||||||
|
|
||||||
|
####Disclaimer:
|
||||||
|
Defent's Mission System (DMS) is written from the ground up to be an efficient, easy to install, and vastly customizable mission system for the ArmA 3 [Exile Mod](http://www.exilemod.com/). You are perfectly welcome to port DMS or any of its functions for any other mod or (legal) purposes; and leaving credits is appreciated.
|
||||||
|
|
||||||
|
However, creating such a mission system takes a lot of time and testing. We (the authors of DMS) are not perfect, and as a result, there may be bugs, glitches, and/or errors within DMS. We appreciate your co-operation in identifying and resolving such issues to improve DMS; however we are not liable for any issues resulting from the usage of DMS on/by your server. We are also not liable to help you in resolving any issues that may arise, although we will attempt to help you to some degree in most cases.
|
||||||
|
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
|
||||||
# Instructions
|
# Instructions
|
||||||
See also: http://www.exilemod.com/topic/61-dms-defents-mission-system/?do=findComment&comment=242
|
See also: http://www.exilemod.com/topic/61-dms-defents-mission-system/?do=findComment&comment=242
|
||||||
|
|
||||||
@ -13,15 +25,17 @@ If you are using infiSTAR and want to keep ```_CGM = true;```, then set ```_UMW
|
|||||||
|
|
||||||
|
|
||||||
### To modify the config:
|
### To modify the config:
|
||||||
* Download the a3_dms folder
|
1. Download the a3_dms folder
|
||||||
* Edit the config.sqf to your preferences.
|
2. Edit the config.sqf to your preferences.
|
||||||
* Pack the a3_dms folder with a PBO tool (**PBO Manager**, Eliteness, or Arma 3 Tools suite)
|
3. Pack the a3_dms folder with a PBO tool (**PBO Manager**, Eliteness, or Arma 3 Tools suite)
|
||||||
* Follow the ["To install:" steps](https://github.com/Defent/DMS_Exile#to-install) using the PBO you just created instead of the pre-packed one.
|
4. Follow the ["To install:" steps](https://github.com/Defent/DMS_Exile#to-install) using the PBO you just created instead of the pre-packed one.
|
||||||
|
|
||||||
|
|
||||||
### HEADLESS CLIENT:
|
### HEADLESS CLIENT:
|
||||||
|
|
||||||
**People have reported Headless Client working properly in ArmA v1.52**
|
**The way DMS utilizes HC is unfavorable for large maps. As a result, we are dropping HC support for DMS until it is completed, then we will create proper Headless Client support.**
|
||||||
|
|
||||||
|
People have reported Headless Client working properly in ArmA v1.52
|
||||||
|
|
||||||
Add this code to the TOP of your initPlayerLocal.sqf
|
Add this code to the TOP of your initPlayerLocal.sqf
|
||||||
|
|
||||||
@ -37,7 +51,9 @@ if (!hasInterface && !isServer) then
|
|||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
## Credits:
|
___
|
||||||
|
|
||||||
|
# Credits:
|
||||||
### Authors:
|
### Authors:
|
||||||
- [Defent](https://github.com/Defent) from [NumenaDayZ](http://numenadayz.com/).
|
- [Defent](https://github.com/Defent) from [NumenaDayZ](http://numenadayz.com/).
|
||||||
- [eraser1](https://github.com/eraser1) from [TrainwreckDayZ](http://www.trainwreckdayz.com/home).
|
- [eraser1](https://github.com/eraser1) from [TrainwreckDayZ](http://www.trainwreckdayz.com/home).
|
||||||
@ -49,11 +65,29 @@ if (!hasInterface && !isServer) then
|
|||||||
- [maca134](http://maca134.co.uk/portfolio/m3editor-arma-3-map-editor/) for M3Editor Stuff
|
- [maca134](http://maca134.co.uk/portfolio/m3editor-arma-3-map-editor/) for M3Editor Stuff
|
||||||
- Everbody's feedback on [the DMS thread on exile forums](http://www.exilemod.com/topic/61-dms-defents-mission-system/?do=findComment&comment=242)
|
- Everbody's feedback on [the DMS thread on exile forums](http://www.exilemod.com/topic/61-dms-defents-mission-system/?do=findComment&comment=242)
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
# Changelog:
|
||||||
|
#### October 9, 2015 (8:30 PM CST-America):
|
||||||
|
* **NEW CONFIG VALUE: DMS_Use_Map_Config**
|
||||||
|
* You can now overwrite "main config values" with map-specific config values located in the new "map_configs" folder. This should allow you to use one DMS PBO if you have multiple servers with different maps. Included examples for Altis, Bornholm, Esseker, and Tavi (Taviana).
|
||||||
|
* Because of the above implementation, DMS by default will not include the salt flats blacklist for findSafePos. In addition, it is preconfigured to the hilly terrains in Esseker and Taviana, as well as reducing all of the blacklist distances due to the smaller map size in Esseker.
|
||||||
|
* Created new function "DMS_fnc_DebugLog". All DMS files (that produced debug logs) have been changed, including mission files. However, updating them is not important (and completely pointless if you don't even use DMS_DEBUG).
|
||||||
|
* Fixed a few locations where it said "sized" instead of "seized". Thanks to [icomrade](https://github.com/icomrade) for pointing them out.
|
||||||
|
* DMS now utilizes the "ARMA_LOG" DLL (if it exists) by infiSTAR to produce debug logs (if enabled). All debug logs now also include server uptime (in seconds) and server FPS.
|
||||||
|
* The FSM no longer produces debug logs.
|
||||||
|
* AI Locality manager will now run every minute.
|
||||||
|
* Debug logs for "DMS_fnc_MissionsMonitor" will only output the mission name and the position, instead of all of the parameters.
|
||||||
|
* "DMS_fnc_IsNearWater" will now check the provided position itself for water.
|
||||||
|
* "DMS_fnc_IsValidPosition" will now do a surfaceNormal check within a 5 meter radius of the provided position as well.
|
||||||
|
* "_customGearSet" should now actually work for "DMS_fnc_SpawnAISoldier", and the function title comment has been updated for the slightly tweaked syntax.
|
||||||
|
|
||||||
|
|
||||||
## Changelog:
|
|
||||||
#### October 8, 2015 (7:15 PM CST-America):
|
#### October 8, 2015 (7:15 PM CST-America):
|
||||||
* **NEW CONFIG VALUES**:
|
* **NEW CONFIG VALUES**:
|
||||||
|
|
||||||
|
|NEW|
|
||||||
|
|:---:|
|
||||||
|DMS_Show_Kill_Poptabs_Notification|
|
|DMS_Show_Kill_Poptabs_Notification|
|
||||||
|DMS_Show_Kill_Respect_Notification|
|
|DMS_Show_Kill_Respect_Notification|
|
||||||
|DMS_dynamicText_Duration|
|
|DMS_dynamicText_Duration|
|
||||||
|
Loading…
Reference in New Issue
Block a user