mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
70fae7bc44
* **NEW CONFIG VALUES:** DMS_SpawnFlareOnReinforcements DMS_MissionMarkerWinDot_Type DMS_MissionMarkerLoseDot_Type DMS_EnableBoxMoving DMS_BasesToImportOnServerStart DMS_AI_Classname DMS_AI_AimCoef_easy DMS_AI_AimCoef_moderate DMS_AI_AimCoef_difficult DMS_AI_AimCoef_hardcore DMS_AI_EnableStamina_easy DMS_AI_EnableStamina_moderate DMS_AI_EnableStamina_difficult DMS_AI_EnableStamina_hardcore DMS_AI_destroyStaticWeapon DMS_AI_destroyStaticWeapon_chance DMS_ai_SupportedRandomClasses DMS_random_non_assault_AI DMS_random_non_MG_AI DMS_random_non_sniper_AI * Please check out the new config values in config.sqf to see what they do :) * Fixed issue with "thieves" mission (and DMS-spawned persistent vehicles in general). Big thank you to [JamieKG from Eternal Gamer](http://eternal-gamer.com/) and Torndeco. * **New static mission: "slums"** * Credit for the base goes to [William from Refugees of the Fallen](http://refugeesofthefallen.enjin.com/) * Spawns 2 crates at 2 different locations from a list of 5 locations. * No AI vehicles, only infantry (introduces Close Quarters Combat) * Added to Altis by default. * Static bases can now be imported on server startup instead of mission spawns. Enabled by default for saltflats and slums. * Increased "DMS_MissionTimeoutResetRange" from 1000 to 1500. * Removed the Navid from config (MG AI and box weapons). * Edited panthera3_config to reduce SpawnZoneNear and TraderZoneNear blacklists. * Edited "blackhawkdown" and "donthasslethehoff" missions to use a slightly different heli wreck classname. * Increased marker circle diameter for saltflats mission to 750 meters. * Moved "DMS_Version" variable assignment to pre-init. * Moved Map Center and Map Radius assignments to post-init. * Added support for 2 new optional parameters: _onMonitorStart and _onMonitorEnd, run before and after the Mission Monitor checks the mission, but AFTER "Mission Success State" is checked. * Mines should now be deleted when a mission fails. * Script optimizations for almost all functions using new command(s) introduced in ArmA v1.54, as well as improved technique(s). * "ExileServer_system_garbageCollector_deleteObject" is now used to actually delete items by DMS_fnc_CleanUp. * AI and vehicle cleanup should now be completely handled by Exile. * Added support for mARMA logging. * **You can now disable the movement/lifting of loot crates after the mission is complete using "DMS_EnableBoxMoving".** * Added some debug code to DMS_fnc_FindSafePos and DMS_fnc_IsValidPosition (commented out by default) * New group reinforcement type "increasing_difficulty". * DMS_fnc_IsNearWater now checks for invalid parameter(s). * DMS_fnc_PlayerAwardOnAIKill now checks for roadkill values AFTER unit-defined respect/tabs. * You can now define different marker types for mission completion/failure using "DMS_MissionMarkerWinDot_Type" and "DMS_MissionMarkerLoseDot_Type" respectively. * "DMS_fnc_SetGroupBehavior" can now take a unit as parameter as well. It will also now return true if behavior was changed, false otherwise. * "DMS_fnc_SpawnAIGroup" and "DMS_fnc_SpawnAIGroup_MultiPos" now supports the definition of custom gear sets. * Improved function documentation for "DMS_fnc_SpawnAIGroup", "DMS_fnc_SpawnAIGroup_MultiPos", and "DMS_fnc_SpawnAISoldier". * "DMS_fnc_SpawnAISoldier" now supports multiple different random AI class presets. This means that you can define a certain "random" class preset, but have it select from a specially defined list that excludes classes that you don't want. * Added default values to certain "missionNameSpace getVariable"s in DMS_fnc_SpawnAISoldier to prevent script errors in the event of invalid definitions. * Slight logic tweak/fix to DMS_fnc_TargetsKilled (it shouldn't throw errors when there aren't any).
104 lines
2.5 KiB
Plaintext
104 lines
2.5 KiB
Plaintext
/*
|
|
DMS Pre-init
|
|
Written by eraser1 (trainwreckdayz.com)
|
|
*/
|
|
|
|
DMS_HC_Object = objNull;
|
|
|
|
DMS_CleanUpList = [];
|
|
|
|
DMS_Version = "December 24 2015";
|
|
|
|
|
|
//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/
|
|
|
|
Slightly modified by eraser1
|
|
*/
|
|
|
|
M3E_fnc_getCenter =
|
|
{
|
|
private ['_objects', '_ax', '_ay', '_az', '_xs', '_xc', '_xz', '_ys', '_yc', '_yz', '_zs', '_zc', '_zz'];
|
|
_objects = [_this, 0, [], [[]]] call BIS_fnc_param;
|
|
_ax = [];
|
|
_ay = [];
|
|
_az = [];
|
|
{
|
|
private ['_position'];
|
|
_position = getPosATL _x;
|
|
_ax pushBack (_position select 0);
|
|
_ay pushBack (_position select 1);
|
|
_az pushBack (_position select 2);
|
|
} foreach _objects;
|
|
_xs = 0;
|
|
_xc = {_xs = _xs + _x; true} count _ax;
|
|
_xz = _xs / _xc;
|
|
|
|
_ys = 0;
|
|
_yc = {_ys = _ys + _x; true} count _ay;
|
|
_yz = _ys / _yc;
|
|
|
|
_zs = 0;
|
|
_zc = {_zs = _zs + _x; true} count _az;
|
|
_zz = _zs / _zc;
|
|
|
|
[_xz, _yz, _zz]
|
|
};
|
|
|
|
M3E_fnc_subArr =
|
|
{
|
|
private ['_a1', '_a2', '_a3'];
|
|
_a1 = [_this, 0, [], [[]]] call BIS_fnc_param;
|
|
_a2 = [_this, 1, [], [[]]] call BIS_fnc_param;
|
|
if (count _a1 == 0 || {count _a2 == 0}) exitWith {[]};
|
|
if (count _a1 != count _a2) exitWith {[]};
|
|
_a3 = [];
|
|
{
|
|
_a3 pushBack ((_a1 select _foreachindex) - (_a2 select _foreachindex));
|
|
} foreach _a1;
|
|
_a3
|
|
};
|
|
|
|
DMS_fnc_setRelPositions =
|
|
{
|
|
private ['_OK','_objects','_newCPos','_center'];
|
|
|
|
_OK = params
|
|
[
|
|
["_objects", [], [[]]],
|
|
["_newCPos", [], [[]],[3]]
|
|
];
|
|
|
|
if (!_OK) exitWith
|
|
{
|
|
diag_log format ["DMS ERROR :: Calling DMS_fnc_setRelPositions with invalid parameters: %1",_this];
|
|
};
|
|
|
|
|
|
_center = [_objects] call M3E_fnc_getCenter;
|
|
{
|
|
private ['_relpos','_objPos'];
|
|
|
|
_relpos = (getPosATL _x) vectorDiff _center;
|
|
_objPos = [_newCPos,_relpos] call DMS_fnc_CalcPos;
|
|
|
|
_x setPosATL _objPos;
|
|
//diag_log format ["Setting %1 at %2; %3 is the relpos from original center %4, reapplied to new center %5",typeOf _x,_objPos,_relpos,_center,_newCPos];
|
|
} foreach _objects;
|
|
};
|
|
|
|
// Because I fucked up the name on first implementation and don't want to mess anybody up who didn't realize to change every occurence of "DMS_MaxSurfaceNormal" to "DMS_MinSurfaceNormal".
|
|
DMS_MaxSurfaceNormal = DMS_MinSurfaceNormal;
|
|
|
|
DMS_AttemptsUntilThrottle = DMS_AttemptsUntilThrottle + 1; |