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"};
|
||||
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,""};
|
||||
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"};
|
||||
item19[] = {"",7,210,1016.540222,366.725281,1024.540283,374.725281,0.000000,""};
|
||||
link0[] = {0,10};
|
||||
@ -44,8 +44,8 @@ link19[] = {16,0};
|
||||
link20[] = {17,18};
|
||||
link21[] = {18,19};
|
||||
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};
|
||||
window[] = {2,-1,-1,-1,-1,890,156,1450,156,3,1235};
|
||||
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[] = {0,-1,-1,-1,-1,1045,285,1579,311,1,817};
|
||||
*//*%FSM</HEAD>*/
|
||||
class FSM
|
||||
{
|
||||
@ -118,14 +118,14 @@ class FSM
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "__min_loop">*/
|
||||
class __min_loop
|
||||
/*%FSM<LINK "___min_loop__AI">*/
|
||||
class ___min_loop__AI
|
||||
{
|
||||
itemno = 17;
|
||||
priority = 0.000000;
|
||||
to="Set_AI_Ownership";
|
||||
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""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
@ -137,9 +137,7 @@ class FSM
|
||||
{
|
||||
name = "Check_Mission_Running";
|
||||
itemno = 6;
|
||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_MissionsMonitor""];" \n
|
||||
"};" \n
|
||||
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_MissionsMonitor""]) call DMS_fnc_DebugLog;" \n
|
||||
"" \n
|
||||
"_missionsMonitor = diag_tickTime;" \n
|
||||
"call DMS_fnc_MissionsMonitor;"/*%FSM</STATEINIT""">*/;
|
||||
@ -165,9 +163,7 @@ class FSM
|
||||
{
|
||||
name = "Mission_Cleanup";
|
||||
itemno = 11;
|
||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_CleanUpManager""];" \n
|
||||
"};" \n
|
||||
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_CleanUpManager""]) call DMS_fnc_DebugLog;" \n
|
||||
"" \n
|
||||
"_cleanupTime = diag_tickTime;" \n
|
||||
"call DMS_fnc_CleanUpManager;"/*%FSM</STATEINIT""">*/;
|
||||
@ -222,9 +218,7 @@ class FSM
|
||||
{
|
||||
name = "Select_Mission";
|
||||
itemno = 15;
|
||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_SelectMission""];" \n
|
||||
"};" \n
|
||||
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_SelectMission""]) call DMS_fnc_DebugLog;" \n
|
||||
"" \n
|
||||
"_selectMission = diag_tickTime;" \n
|
||||
"call DMS_fnc_SelectMission;"/*%FSM</STATEINIT""">*/;
|
||||
@ -250,9 +244,7 @@ class FSM
|
||||
{
|
||||
name = "Set_AI_Ownership";
|
||||
itemno = 18;
|
||||
init = /*%FSM<STATEINIT""">*/"if(DMS_DEBUG) then {" \n
|
||||
" diag_log format [""DMS_DEBUG FSM CHECK :: calling DMS_fnc_AILocalityManager""];" \n
|
||||
"};" \n
|
||||
init = /*%FSM<STATEINIT""">*/"//(format [""FSM CHECK :: calling DMS_fnc_AILocalityManager""]) call DMS_fnc_DebugLog;" \n
|
||||
"" \n
|
||||
"_aiLocality = diag_tickTime;" \n
|
||||
"call DMS_fnc_AILocalityManager;"/*%FSM</STATEINIT""">*/;
|
||||
|
@ -35,6 +35,7 @@ class CfgFunctions
|
||||
class CleanUp {};
|
||||
class CleanUpManager {};
|
||||
class CreateMarker {};
|
||||
class DebugLog {};
|
||||
class FillCrate {};
|
||||
class FindSafePos {};
|
||||
class FindSuppressor {};
|
||||
|
@ -5,12 +5,21 @@
|
||||
Created by eraser1
|
||||
*/
|
||||
|
||||
|
||||
// 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.
|
||||
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 */
|
||||
/*General settings for dynamic missions*/
|
||||
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_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_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*/
|
||||
|
||||
DMS_MinWaterDepth = 20; // Minimum depth of water that an underwater mission can spawn at.
|
||||
@ -145,8 +154,8 @@ DMS_DEBUG = false;
|
||||
["mercbase",5]
|
||||
];
|
||||
|
||||
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
|
||||
DMS_findSafePosBlacklist = [ // For BIS_fnc_findSafePos position blacklist info refer to: https://community.bistudio.com/wiki/BIS_fnc_findSafePos
|
||||
// An example is given in the altis_config.sqf (it blacklists the salt flats).
|
||||
];
|
||||
/* Mission System Settings */
|
||||
|
||||
|
@ -6,10 +6,18 @@
|
||||
DMS_HC_Object = objNull;
|
||||
|
||||
|
||||
//Load config
|
||||
//Load main config
|
||||
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
|
||||
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
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -159,7 +159,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -152,7 +152,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -152,7 +152,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -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!"];
|
||||
|
||||
// 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)
|
||||
_missionName = "Blackhawk Down";
|
||||
@ -152,7 +152,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -163,7 +163,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -155,7 +155,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -166,7 +166,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -69,7 +69,7 @@ _missionObjs =
|
||||
];
|
||||
|
||||
// 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
|
||||
_msgWIN = ['#0080ff',"Convicts have successfully claimed the food supplies!"];
|
||||
@ -152,7 +152,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -152,7 +152,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -69,7 +69,7 @@ _missionObjs =
|
||||
];
|
||||
|
||||
// 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
|
||||
_msgWIN = ['#0080ff',"Convicts have successfully claimed the humanitarian supplies for themselves!"];
|
||||
@ -152,7 +152,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -150,7 +150,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
||||
|
@ -152,7 +152,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -183,7 +183,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -150,7 +150,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -150,7 +150,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -197,7 +197,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -143,7 +143,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -151,7 +151,4 @@ if !(_added) exitWith
|
||||
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
@ -18,10 +18,8 @@ if (!DMS_ai_offload_to_client && {isNull DMS_HC_Object}) exitWith {};
|
||||
{
|
||||
if (isNull DMS_HC_Object) then
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG AILocalityManager :: DMS_HC_Object is null! Finding owner for group: %1",_group];
|
||||
};
|
||||
|
||||
(format ["AILocalityManager :: DMS_HC_Object is null! Finding owner for group: %1",_group]) call DMS_fnc_DebugLog;
|
||||
_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
|
||||
{
|
||||
_transferSuccess = _group setGroupOwner (owner DMS_HC_Object);
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG AILocalityManager :: Setting ownership of group %1 to HC (%2). Success: %3",_group,DMS_HC_Object,_transferSuccess];
|
||||
};
|
||||
(format ["AILocalityManager :: Setting ownership of group %1 to HC (%2). Success: %3",_group,DMS_HC_Object,_transferSuccess]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -193,14 +193,11 @@ try
|
||||
_markerDot setMarkerText (format ["%1 (%2 %3 remaining)",markerText _markerDot,count _units,DMS_MarkerText_AIName]);
|
||||
};
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG AddMissionToMonitor :: Added |%1| to DMS_Mission_Arr!",_arr];
|
||||
};
|
||||
(format ["AddMissionToMonitor :: Added |%1| to DMS_Mission_Arr!",_arr]) call DMS_fnc_DebugLog;
|
||||
}
|
||||
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
|
@ -34,10 +34,7 @@ _messageInfo params
|
||||
["_message","",[""]]
|
||||
];
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format["DMS_DEBUG BroadcastMissionStatus :: Notification types: |%1| for broadcasting mission status: %2",DMS_PlayerNotificationTypes,_message];
|
||||
};
|
||||
(format["BroadcastMissionStatus :: Notification types: |%1| for broadcasting mission status: %2",DMS_PlayerNotificationTypes,_message]) call DMS_fnc_DebugLog;
|
||||
|
||||
if ((typeName _message) != "STRING") then
|
||||
{
|
||||
|
@ -15,10 +15,7 @@
|
||||
*/
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log ("DMS_DEBUG CleanUp :: CLEANING UP: "+str _this);
|
||||
};
|
||||
(format ["CleanUp :: CLEANING UP: %1",_this]) call DMS_fnc_DebugLog;
|
||||
|
||||
if !((typeName _this) == "ARRAY") then
|
||||
{
|
||||
@ -62,10 +59,7 @@ _clean =
|
||||
else
|
||||
{
|
||||
_skippedObjects pushBack _x;
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG CleanUp :: Skipping cleanup for |%1|, player within %2 meters!",_x,DMS_CleanUp_PlayerNearLimit];
|
||||
};
|
||||
(format ["CleanUp :: Skipping cleanup for |%1|, player within %2 meters!",_x,DMS_CleanUp_PlayerNearLimit]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
}
|
||||
else
|
||||
@ -91,10 +85,7 @@ _clean =
|
||||
};
|
||||
if ((typeName _x) == "ARRAY") exitWith
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG CleanUp :: Doing recursive call for ARRAY: %1",_x];
|
||||
};
|
||||
(format ["CleanUp :: Doing recursive call for ARRAY: %1",_x]) call DMS_fnc_DebugLog;
|
||||
_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];
|
||||
|
@ -20,10 +20,7 @@
|
||||
if (DMS_CleanUpList isEqualTo []) exitWith {}; // Empty array, no objects to clean :)
|
||||
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG CleanUpManager :: Checking Cleaning Status for: %1",_x];
|
||||
};
|
||||
(format ["CleanUpManager :: Checking Cleaning Status for: %1",_x]) call DMS_fnc_DebugLog;
|
||||
|
||||
private ["_objs","_timeAddedToList","_timeUntilClean"];
|
||||
|
||||
@ -45,9 +42,6 @@ if (DMS_CleanUpList isEqualTo []) exitWith {}; // Empty array, no objects to cl
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG CleanUpManager :: %1 is not yet ready to clean!",_x];
|
||||
};
|
||||
(format ["CleanUpManager :: %1 is not yet ready to clean!",_x]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
} forEach DMS_CleanUpList;
|
@ -83,16 +83,10 @@ if (_randomMarker) then
|
||||
_dot setMarkerPos _npos;
|
||||
_circle setMarkerBrush DMS_RandomMarkerBrush;
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["Moving markers %1 from %2 to %3 (%4m away)",[_dot,_circle],_pos,_npos,_dis];
|
||||
};
|
||||
(format ["CreateMarker :: Moving markers %1 from %2 to %3 (%4m away)",[_dot,_circle],_pos,_npos,_dis]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG CreateMarker :: Created markers |%1| at %2 with text |%3| colored %4",[_dot,_circle],_pos,_text,_color];
|
||||
};
|
||||
(format ["CreateMarker :: Created markers |%1| at %2 with text |%3| colored %4",[_dot,_circle],_pos,_text,_color]) call DMS_fnc_DebugLog;
|
||||
|
||||
|
||||
[_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
|
||||
{
|
||||
diag_log format["DMS_DEBUG FillCrate :: Filling %4 with %1 guns, %2 items and %3 backpacks",_wepCount,_itemCount,_backpackCount,_crate];
|
||||
};
|
||||
(format["FillCrate :: Filling %4 with %1 guns, %2 items and %3 backpacks",_wepCount,_itemCount,_backpackCount,_crate]) call DMS_fnc_DebugLog;
|
||||
|
||||
|
||||
if ((_wepCount>0) && {count _weps>0}) then
|
||||
|
@ -64,20 +64,14 @@ while{!_validspot} do
|
||||
_missionNearLimit = (DMS_ThrottleCoefficient * _missionNearLimit) max DMS_MinThrottledDistance;
|
||||
_playerNearLimit = (DMS_ThrottleCoefficient * _playerNearLimit) max DMS_MinThrottledDistance;
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
||||
};
|
||||
|
||||
_validspot = [_pos, _waterNearLimit, _maxSurfaceNormal, _spawnZoneNearLimit, _traderZoneNearLimit, _missionNearLimit, _playerNearLimit] call DMS_fnc_IsValidPosition;
|
||||
};
|
||||
|
||||
|
||||
if(DMS_DEBUG) then
|
||||
{
|
||||
diag_log format["DMS_DEBUG FindSafePos :: Found mission position %1 with %2 params in %3 attempts. _this: %4",_pos,_safePosParams,_attempts,_this];
|
||||
};
|
||||
(format["FindSafePos :: Found mission position %1 with %2 params in %3 attempts. _this: %4",_pos,_safePosParams,_attempts,_this]) call DMS_fnc_DebugLog;
|
||||
|
||||
|
||||
_pos set [2, 0];
|
||||
|
@ -13,12 +13,19 @@
|
||||
|
||||
private["_result","_position","_radius"];
|
||||
|
||||
_result = false;
|
||||
_position = _this select 0;
|
||||
_radius = _this select 1;
|
||||
|
||||
|
||||
_result = false;
|
||||
|
||||
try
|
||||
{
|
||||
if (surfaceIsWater _position) then
|
||||
{
|
||||
throw true;
|
||||
};
|
||||
|
||||
for "_i" from 0 to 359 step 45 do
|
||||
{
|
||||
if (surfaceIsWater ([_position,_radius,_i] call DMS_fnc_SelectOffsetPos)) then
|
||||
|
@ -40,10 +40,7 @@ try
|
||||
catch
|
||||
{
|
||||
_isNear = true;
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG IsPlayerNearby :: %1 is within %2 meters of %3!",_exception,_dis,_pos];
|
||||
};
|
||||
(format ["IsPlayerNearby :: %1 is within %2 meters of %3!",_exception,_dis,_pos]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
*/
|
||||
|
||||
private ["_pos", "_waterNearLimit", "_maxSurfaceNormal", "_spawnZoneNearLimit", "_traderZoneNearLimit", "_missionNearLimit", "_playerNearLimit"];
|
||||
private ["_pos", "_waterNearLimit", "_maxSurfaceNormal", "_spawnZoneNearLimit", "_traderZoneNearLimit", "_missionNearLimit", "_playerNearLimit", "_dir"];
|
||||
|
||||
_OK = params
|
||||
[
|
||||
@ -51,6 +51,15 @@ else
|
||||
if (((surfaceNormal _pos) select 2)<_maxSurfaceNormal) then
|
||||
{
|
||||
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
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG IsValidPosition :: Exception in attempt %1 | Position %2 is too close to %3!",_attempts,_pos,_exception];
|
||||
};
|
||||
(format ["IsValidPosition :: Exception in attempt %1 | Position %2 is too close to %3!",_attempts,_pos,_exception]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -53,10 +53,7 @@ _exit = false;
|
||||
};
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG MissionSuccessState :: Checking completion type %1 with parameter %2. Absolute: %3",_completionType,_completionArgs,_absoluteWinCondition];
|
||||
};
|
||||
(format ["MissionSuccessState :: Checking completion type ""%1"" with argument |%2|. Absolute: %3",_completionType,_completionArgs,_absoluteWinCondition]) call DMS_fnc_DebugLog;
|
||||
|
||||
switch (toLower _completionType) do
|
||||
{
|
||||
@ -90,10 +87,7 @@ _exit = false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG MissionSuccessState :: %1",_exception];
|
||||
};
|
||||
(format ["MissionSuccessState :: %1",_exception]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
} forEach _this;
|
||||
|
||||
|
@ -31,10 +31,6 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
||||
{
|
||||
try
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG MissionStatusCheck :: Checking Mission Status (index %1): %2",_forEachIndex,_x];
|
||||
};
|
||||
_pos = _x select 0;
|
||||
_success = (_x select 1) call DMS_fnc_MissionSuccessState;
|
||||
_timeStarted = _x select 2 select 0;
|
||||
@ -50,6 +46,8 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
||||
_markers = _x select 6;
|
||||
_missionSide = _x select 7;
|
||||
|
||||
(format ["MissionStatusCheck :: Checking Mission Status (index %1): ""%2"" at %3",_forEachIndex,_missionName,_pos]) call DMS_fnc_DebugLog;
|
||||
|
||||
if (_success) then
|
||||
{
|
||||
DMS_CleanUpList pushBack [_units+_buildings,diag_tickTime,DMS_CompletedMissionCleanupTime];
|
||||
@ -163,9 +161,6 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG MissionStatusCheck :: %1",_exception];
|
||||
};
|
||||
(format ["MissionStatusCheck :: %1",_exception]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
} 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"];
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG OnKilled :: Logging AI death with parameters: %1",_this];
|
||||
};
|
||||
(format ["OnKilled :: Logging AI death with parameters: %1",_this]) call DMS_fnc_DebugLog;
|
||||
|
||||
_unit = _this select 0 select 0;
|
||||
_killer = _this select 0 select 1;
|
||||
@ -112,10 +109,7 @@ if (!isNull _av) then
|
||||
_av spawn {sleep 1;_this enableSimulationGlobal false;};
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format["DMS_DEBUG OnKilled :: Destroying used AI vehicle %1, disabling simulation, and adding to cleanup.",typeOf _av];
|
||||
};
|
||||
(format["OnKilled :: Destroying used AI vehicle %1, disabling simulation, and adding to cleanup.",typeOf _av]) call DMS_fnc_DebugLog;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -188,10 +182,7 @@ if (!isNull _av) then
|
||||
|
||||
_driver enableCollisionWith _av;
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format["DMS_DEBUG OnKilled :: Switched driver of AI Vehicle (%1) to gunner.",typeOf _av];
|
||||
};
|
||||
(format["OnKilled :: Switched driver of AI Vehicle (%1) to gunner.",typeOf _av]) call DMS_fnc_DebugLog;
|
||||
|
||||
if (_owner!=2) then
|
||||
{
|
||||
@ -263,10 +254,7 @@ if (isPlayer _killer) then
|
||||
{
|
||||
_boom = createVehicle ["SLAMDirectionalMine_Wire_Ammo", ASLToAGL(getPosWorld _unit), [], 0, "CAN_COLLIDE"];
|
||||
_boom setDamage 1;
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG OnKilled :: %1 roadkilled an AI! Creating mine at the roadkilled AI's position!",name _killer];
|
||||
};
|
||||
(format ["OnKilled :: %1 roadkilled an AI! Creating mine at the roadkilled AI's position!",name _killer]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
|
||||
|
||||
|
@ -20,10 +20,7 @@ _status = _this select 1;
|
||||
_text = missionNamespace getVariable [format ["%1_text",_markerDot],markerText _markerDot];
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG RemoveMarkers :: Calling DMS_RemoveMarkers with parameters %1.",_this];
|
||||
};
|
||||
(format ["RemoveMarkers :: Calling DMS_RemoveMarkers with parameters %1.",_this]) call DMS_fnc_DebugLog;
|
||||
|
||||
|
||||
deleteMarker _markerCircle;
|
||||
@ -40,10 +37,7 @@ if (_status == "win") then
|
||||
_markerDot setMarkerColor DMS_MissionMarkerWinDotColor;
|
||||
//_markerDot spawn {sleep DMS_MissionMarkerWinDotTime;deleteMarker _this;};
|
||||
[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!",_markerDot,DMS_MissionMarkerWinDotTime];
|
||||
};
|
||||
(format ["RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerWinDotTime]) call DMS_fnc_DebugLog;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -55,8 +49,5 @@ else
|
||||
_markerDot setMarkerColor DMS_MissionMarkerLoseDotColor;
|
||||
//_markerDot spawn {sleep DMS_MissionMarkerLoseDotTime;deleteMarker _this;};
|
||||
[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!",_markerDot,DMS_MissionMarkerLoseDotTime];
|
||||
};
|
||||
(format ["RemoveMarkers :: %1 Marker will be removed in %2 seconds!",_markerDot,DMS_MissionMarkerLoseDotTime]) call DMS_fnc_DebugLog;
|
||||
};
|
@ -48,15 +48,9 @@ _client = objNull;
|
||||
if (!isNull _client) then
|
||||
{
|
||||
ExileServerOwnershipSwapQueue pushBack [_AI,_client];
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG SetAILocality :: No viable client found for the ownership of %1!",_AI];
|
||||
};
|
||||
(format ["SetAILocality :: No viable client found for the ownership of %1!",_AI]) call DMS_fnc_DebugLog;
|
||||
};
|
@ -35,10 +35,7 @@ _pos_y = _pos select 1;
|
||||
_pos_z = _pos select 2;
|
||||
|
||||
|
||||
if(DMS_DEBUG) then
|
||||
{
|
||||
diag_log format["DMS_DEBUG SpawnAIGroup :: Spawning %1 %2 %3 AI at %4 with %5 difficulty.",_count,_class,_side,_pos,_difficulty];
|
||||
};
|
||||
(format["SpawnAIGroup :: Spawning %1 %2 %3 AI at %4 with %5 difficulty.",_count,_class,_side,_pos,_difficulty]) call DMS_fnc_DebugLog;
|
||||
|
||||
// if soldier have AT/AA weapons
|
||||
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];
|
||||
|
||||
if(DMS_DEBUG) then
|
||||
{
|
||||
diag_log format["DMS_DEBUG SpawnAIGroup :: Giving %1 a %2 launcher with %3 %4 rockets",_unit,_launcher,DMS_AI_launcher_ammo_count,_rocket];
|
||||
};
|
||||
(format["SpawnAIGroup :: Giving %1 a %2 launcher with %3 %4 rockets",_unit,_launcher,DMS_AI_launcher_ammo_count,_rocket]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
[
|
||||
_group, // Group the AI will belong to
|
||||
_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"
|
||||
_side, // "bandit","hero", etc.
|
||||
_type, // Type of AI: "soldier","static","vehicle","heli", etc.
|
||||
@ -18,10 +18,10 @@
|
||||
[
|
||||
_weapon, // String | EG: "LMG_Zafir_F"
|
||||
_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"
|
||||
_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"
|
||||
_helmet, // String | EG: "H_HelmetLeaderO_ocamo"
|
||||
_uniform, // String | EG: "U_O_GhillieSuit"
|
||||
@ -32,7 +32,7 @@
|
||||
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
|
||||
[
|
||||
@ -55,7 +55,7 @@ else
|
||||
{
|
||||
if ((_class == "custom") && {((count _this)>6)}) then
|
||||
{
|
||||
_customGearSet = _this select 5;
|
||||
_customGearSet = _this select 6;
|
||||
_useCustomGear = true;
|
||||
};
|
||||
};
|
||||
@ -71,14 +71,14 @@ _unit allowFleeing 0;
|
||||
[_unit] joinSilent _group;
|
||||
|
||||
// Remove existing gear
|
||||
removeAllWeapons _unit;
|
||||
removeAllItems _unit;
|
||||
removeAllAssignedItems _unit;
|
||||
removeUniform _unit;
|
||||
removeVest _unit;
|
||||
removeBackpack _unit;
|
||||
removeHeadgear _unit;
|
||||
removeGoggles _unit;
|
||||
{_unit removeWeaponGlobal _x;} forEach (weapons _unit);
|
||||
{_unit unlinkItem _x;} forEach (assignedItems _unit);
|
||||
{_unit removeItem _x;} forEach (items _unit);
|
||||
removeAllItemsWithMagazines _unit;
|
||||
removeHeadgear _unit;
|
||||
removeUniform _unit;
|
||||
removeVest _unit;
|
||||
removeBackpackGlobal _unit;
|
||||
|
||||
// Give default items
|
||||
if !(DMS_ai_default_items isEqualTo []) then
|
||||
@ -111,6 +111,7 @@ if (!_useCustomGear) then
|
||||
if !(_class in DMS_ai_SupportedClasses) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: DMS_SpawnAISoldier called with unsupported _class: %1 | _this: %2",_class,_this];
|
||||
deleteVehicle _unit;
|
||||
};
|
||||
|
||||
|
||||
@ -207,7 +208,7 @@ else
|
||||
["_magazines",[],[[]]],
|
||||
["_pistol","",[""]],
|
||||
["_pistolAttachments",[],[[]]],
|
||||
["_items",[],[[]]],
|
||||
["_assignedItems",[],[[]]],
|
||||
["_launcher","",[""]],
|
||||
["_helmet","",[""]],
|
||||
["_uniform","",[""]],
|
||||
@ -220,10 +221,7 @@ else
|
||||
diag_log format ["DMS ERROR :: Calling DMS_SpawnAISoldier with invalid _customGearSet: %1 | _this: %2",_customGearSet,_this];
|
||||
};
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG SpawnAISoldier :: Equipping unit %1 with _customGearSet: %2",_unit,_customGearSet];
|
||||
};
|
||||
(format ["SpawnAISoldier :: Equipping unit %1 with _customGearSet: %2",_unit,_customGearSet]) call DMS_fnc_DebugLog;
|
||||
|
||||
// Clothes
|
||||
if !(_helmet isEqualTo "") then
|
||||
@ -261,6 +259,29 @@ else
|
||||
_unit addMagazines _x;
|
||||
} 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
|
||||
if !(_weapon isEqualTo "") then
|
||||
@ -273,22 +294,6 @@ else
|
||||
|
||||
_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];
|
||||
};
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
||||
|
||||
_unit
|
||||
|
@ -70,16 +70,10 @@ _guns = [];
|
||||
reload _unit;
|
||||
_unit setVariable ["DMS_AssignedVeh",_gun];
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG SpawnAIStatic :: Created unit %1 at %2 as static gunner in %3",_unit,_pos,_gun];
|
||||
};
|
||||
(format ["SpawnAIStatic :: Created unit %1 at %2 as static gunner in %3",_unit,_pos,_gun]) call DMS_fnc_DebugLog;
|
||||
} forEach _positions;
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG SpawnAIStatic :: Created %1 static AI with parameters: %2",count _positions,_this];
|
||||
};
|
||||
(format ["SpawnAIStatic :: Created %1 static AI with parameters: %2",count _positions,_this]) call DMS_fnc_DebugLog;
|
||||
|
||||
_guns
|
@ -81,9 +81,6 @@ _gunner setVariable ["DMS_AssignedVeh",_veh];
|
||||
|
||||
[_driver,_gunner] joinSilent _group;
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
||||
|
||||
_veh
|
@ -39,8 +39,5 @@ else
|
||||
DMS_BMissionLastStart = diag_tickTime;
|
||||
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG SelectMission :: Spawned mission %1 with parameters (%2) | DMS_BMissionDelay set to %3 seconds",str _missionType,_parameters,DMS_BMissionDelay];
|
||||
};
|
||||
(format ["SelectMission :: Spawned mission %1 with parameters (%2) | DMS_BMissionDelay set to %3 seconds",str _missionType,_parameters,DMS_BMissionDelay]) call DMS_fnc_DebugLog;
|
||||
};
|
@ -92,10 +92,7 @@ if (DMS_SpawnMinesAroundMissions) then
|
||||
};
|
||||
};
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
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];
|
||||
};
|
||||
(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;
|
||||
};
|
||||
|
||||
|
||||
|
@ -95,10 +95,7 @@ _vehObj allowDamage false;
|
||||
_vehObj enableRopeAttach false;
|
||||
_vehObj enableSimulationGlobal false;
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG SpawnNonPersistentVehicle :: Created %1 at %2 with calling parameters: %3",_vehObj,_vehpos,_this];
|
||||
};
|
||||
(format ["SpawnNonPersistentVehicle :: Created %1 at %2 with calling parameters: %3",_vehObj,_vehpos,_this]) call DMS_fnc_DebugLog;
|
||||
|
||||
|
||||
_vehObj
|
||||
|
@ -80,10 +80,7 @@ try
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG TargetsKilled :: %1 is still alive! All of %2 are not yet killed!",_exception,_this];
|
||||
};
|
||||
(format ["TargetsKilled :: %1 is still alive! All of %2 are not yet killed!",_exception,_this]) call DMS_fnc_DebugLog;
|
||||
};
|
||||
|
||||
_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
|
||||
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:
|
||||
* Download the a3_dms folder
|
||||
* Edit the config.sqf to your preferences.
|
||||
* 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.
|
||||
1. Download the a3_dms folder
|
||||
2. Edit the config.sqf to your preferences.
|
||||
3. Pack the a3_dms folder with a PBO tool (**PBO Manager**, Eliteness, or Arma 3 Tools suite)
|
||||
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:
|
||||
|
||||
**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
|
||||
|
||||
@ -37,7 +51,9 @@ if (!hasInterface && !isServer) then
|
||||
};
|
||||
```
|
||||
|
||||
## Credits:
|
||||
___
|
||||
|
||||
# Credits:
|
||||
### Authors:
|
||||
- [Defent](https://github.com/Defent) from [NumenaDayZ](http://numenadayz.com/).
|
||||
- [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
|
||||
- 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):
|
||||
* **NEW CONFIG VALUES**:
|
||||
|
||||
|NEW|
|
||||
|:---:|
|
||||
|DMS_Show_Kill_Poptabs_Notification|
|
||||
|DMS_Show_Kill_Respect_Notification|
|
||||
|DMS_dynamicText_Duration|
|
||||
|
Loading…
Reference in New Issue
Block a user