mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
'SPLOSIONS! (And some RPT spam reduction)
* NEW CONFIG VALUES: DMS_SpawnMinesAroundMissions DMS_despawnMines_onCompletion DMS_MineInfo_easy DMS_MineInfo_moderate DMS_MineInfo_difficult DMS_MineInfo_hardcore DMS_explode_onRoadkill * You can now spawn randomly generated minefields around missions! Numberof mines and radius is dependent on difficulty. * Also, you can now spawn an explosion on an AI when it is roadkilled, causing a wheel or two of the roadkilling vehicle to break. * Commented out the spawning of static-relative conversion of base objects in test mission. * Included example of how to spawn the minefield in the test mission. * Reduced some of the RPT spam. * Smoke/IR grenades will only spawn on proper crates - you can now safely use DMS_fnc_FillCrate with non-crate objects but still have smoke available.
This commit is contained in:
parent
d70352e0cc
commit
39af7c584c
@ -60,6 +60,7 @@ class CfgFunctions
|
||||
class SpawnAIStatic {};
|
||||
class SpawnBanditMission {};
|
||||
class SpawnCrate {};
|
||||
class SpawnMinefield {};
|
||||
class SpawnNonPersistentVehicle {};
|
||||
class TargetsKilled {};
|
||||
};
|
||||
|
@ -61,6 +61,15 @@ DMS_DEBUG = false;
|
||||
DMS_SpawnBoxSmoke = true; // Spawn a smoke grenade on mission box upon misson completion during daytime
|
||||
DMS_SpawnBoxIRGrenade = true; // Spawn an IR grenade on mission box upon misson completion during nighttime
|
||||
/*Crate/Box settings*/
|
||||
|
||||
/*Mine settings*/
|
||||
DMS_SpawnMinesAroundMissions = true; // Whether or not to spawn mines around AI missions that have them.
|
||||
DMS_despawnMines_onCompletion = true; // Despawn mines spawned around missions when the mission is completed
|
||||
DMS_MineInfo_easy = [5,50]; // Mine info for "easy" missions. This will spawn 5 mines within a 50m radius.
|
||||
DMS_MineInfo_moderate = [10,50]; // Mine info for "moderate" missions. This will spawn 10 mines within a 50m radius.
|
||||
DMS_MineInfo_difficult = [15,75]; // Mine info for "difficult" missions. This will spawn 15 mines within a 75m radius.
|
||||
DMS_MineInfo_hardcore = [25,100]; // Mine info for "hardcore" missions. This will spawn 25 mines within a 100m radius.
|
||||
/*Mine settings*/
|
||||
|
||||
DMS_MinPlayerCount = 0; // Minimum number of players until mission start
|
||||
DMS_MinServerFPS = 5; // Minimum server FPS for missions to start
|
||||
@ -123,6 +132,7 @@ DMS_DEBUG = false;
|
||||
DMS_ai_disable_ramming_damage = true; // Disables damage due to ramming into AI. !!!NOTE: THIS WILL NOT BE RELIABLE WITH "DMS_ai_offload_to_client"!!!
|
||||
DMS_remove_roadkill = true; // Remove gear from AI bodies that are roadkilled
|
||||
DMS_remove_roadkill_chance = 50; // Percentage chance that roadkilled AI bodies will be deleted
|
||||
DMS_explode_onRoadkill = true; // Whether or not to spawn an explosion when an AI gets run over. It will likely take out the 2 front wheels. Should help mitigate the ineffective AI vs. striders issue ;)
|
||||
DMS_RemoveNVG = false; // Remove NVGs from AI bodies
|
||||
|
||||
DMS_MaxAIDistance = 500; // The maximum distance an AI unit can be from a mission before he is killed. Helps with AI running away and forcing the mission to keep running. Set to 0 if you don't want it.
|
||||
@ -146,8 +156,8 @@ DMS_DEBUG = false;
|
||||
DMS_ai_skill_random = ["hardcore","difficult","difficult","difficult","moderate","moderate","moderate","moderate","easy","easy"]; // Skill frequencies for "random" AI skills | Default: 10% hardcore, 30% difficult, 40% moderate, and 20% easy
|
||||
DMS_AI_WP_Radius_easy = 20; // Waypoint radius for "easy" AI
|
||||
DMS_AI_WP_Radius_moderate = 40; // Waypoint radius for "moderate" AI
|
||||
DMS_AI_WP_Radius_difficult = 75; // Waypoint radius for "difficult" AI
|
||||
DMS_AI_WP_Radius_hardcore = 150; // Waypoint radius for "hardcore" AI
|
||||
DMS_AI_WP_Radius_difficult = 55; // Waypoint radius for "difficult" AI
|
||||
DMS_AI_WP_Radius_hardcore = 75; // Waypoint radius for "hardcore" AI
|
||||
DMS_AI_WP_Radius_base = 5; // Waypoint radius for AI in bases
|
||||
|
||||
DMS_static_weapons = [ // Static weapons for AI
|
||||
|
@ -13,7 +13,7 @@ _side = "bandit";
|
||||
|
||||
|
||||
// find position
|
||||
_pos = call DMS_fnc_findSafePos;
|
||||
_pos = [10,10] call DMS_fnc_findSafePos;
|
||||
|
||||
|
||||
// Set general mission difficulty
|
||||
@ -76,14 +76,21 @@ _veh =
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
|
||||
/*
|
||||
_baseObjs =
|
||||
[
|
||||
"base1STATIC",
|
||||
_pos
|
||||
] call DMS_fnc_ImportFromM3E_Convert;
|
||||
*/
|
||||
_baseObjs = [];
|
||||
|
||||
|
||||
_mines =
|
||||
[
|
||||
_pos,
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnMinefield;
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
@ -97,7 +104,8 @@ _missionObjs =
|
||||
[
|
||||
_staticGuns+[_veh]+_baseObjs,
|
||||
[_vehicle],
|
||||
[[_crate,"Sniper"]]
|
||||
[[_crate,"Sniper"]],
|
||||
_mines
|
||||
];
|
||||
|
||||
// Define Mission Start message
|
||||
|
@ -50,7 +50,7 @@
|
||||
"_completionInfo", "_timeOutInfo", "_inputUnits", "_missionObjs", "_messages", "_markers", "_side", "_timeStarted", "_timeUntilFail"
|
||||
*/
|
||||
|
||||
private ["_added", "_pos", "_OK", "_completionInfo", "_timeOutInfo", "_inputUnits", "_missionObjs", "_messages", "_markers", "_timeStarted", "_timeUntilFail", "_buildings", "_vehs", "_crate_info_array", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_side","_arr"];
|
||||
private ["_added", "_pos", "_OK", "_completionInfo", "_timeOutInfo", "_inputUnits", "_missionObjs", "_mines", "_messages", "_markers", "_timeStarted", "_timeUntilFail", "_buildings", "_vehs", "_crate_info_array", "_msgWIN", "_msgLose", "_markerDot", "_markerCircle", "_side","_arr"];
|
||||
|
||||
|
||||
_added = false;
|
||||
@ -61,7 +61,7 @@ _OK = params
|
||||
["_completionInfo","",[[]]],
|
||||
["_timeOutInfo","",[[]],[1,2]],
|
||||
["_inputUnits","",[[]]],
|
||||
["_missionObjs","",[[]],[3]],
|
||||
["_missionObjs","",[[]],[3,4]],
|
||||
["_messages","",[[]],[2]],
|
||||
["_markers","",[[]],[2]],
|
||||
["_side","bandit",[""]]
|
||||
@ -117,6 +117,14 @@ try
|
||||
throw format["_missionObjs |%1|",_missionObjs];
|
||||
};
|
||||
|
||||
_mines = [];
|
||||
|
||||
if ((count _missionObjs)>3) then
|
||||
{
|
||||
_mines = _missionObjs param [3,[],[[]]];
|
||||
};
|
||||
|
||||
|
||||
_OK = _messages params
|
||||
[
|
||||
["_msgWIN","",[""]],
|
||||
@ -151,7 +159,8 @@ try
|
||||
[
|
||||
_buildings,
|
||||
_vehs,
|
||||
_crate_info_array
|
||||
_crate_info_array,
|
||||
_mines
|
||||
],
|
||||
[
|
||||
_msgWIN,
|
||||
|
@ -26,8 +26,7 @@ params
|
||||
[
|
||||
["_pos","ERROR",[[]],[2,3]],
|
||||
["_text","ERROR",[""]],
|
||||
["_difficulty","moderate",[""]],
|
||||
["_randomMarker",DMS_MarkerPosRandomization,[false]]
|
||||
["_difficulty","moderate",[""]]
|
||||
];
|
||||
|
||||
if ((_pos isEqualTo "ERROR") || ("_text" isEqualTo "ERROR")) exitWith
|
||||
@ -37,6 +36,13 @@ if ((_pos isEqualTo "ERROR") || ("_text" isEqualTo "ERROR")) exitWith
|
||||
[];
|
||||
};
|
||||
|
||||
|
||||
_randomMarker = DMS_MarkerPosRandomization;
|
||||
if ((count _this)>3) then
|
||||
{
|
||||
_randomMarker = param [3,DMS_MarkerPosRandomization,[false]];
|
||||
};
|
||||
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
switch (_difficulty) do
|
||||
|
@ -188,17 +188,20 @@ if(DMS_RareLoot && {count DMS_RareLootList>0}) then
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
if(DMS_SpawnBoxSmoke && {sunOrMoon == 1}) then
|
||||
// In case somebody wants to use fillCrate on a vehicle but also wants to use smoke, don't create smoke/IR strobe unless it's a crate
|
||||
if (_crate isKindOf "ReammoBox_F") then
|
||||
{
|
||||
_marker = "SmokeShellPurple" createVehicle getPosATL _crate;
|
||||
_marker setPosATL (getPosATL _crate);
|
||||
_marker attachTo [_crate,[0,0,0]];
|
||||
};
|
||||
if(DMS_SpawnBoxSmoke && {sunOrMoon == 1}) then
|
||||
{
|
||||
_marker = "SmokeShellPurple" createVehicle getPosATL _crate;
|
||||
_marker setPosATL (getPosATL _crate);
|
||||
_marker attachTo [_crate,[0,0,0]];
|
||||
};
|
||||
|
||||
if (DMS_SpawnBoxIRGrenade && {sunOrMoon != 1}) then
|
||||
{
|
||||
_marker = "B_IRStrobe" createVehicle getPosATL _crate;
|
||||
_marker setPosATL (getPosATL _crate);
|
||||
_marker attachTo [_crate, [0,0,0.5]];
|
||||
if (DMS_SpawnBoxIRGrenade && {sunOrMoon != 1}) then
|
||||
{
|
||||
_marker = "B_IRStrobe" createVehicle getPosATL _crate;
|
||||
_marker setPosATL (getPosATL _crate);
|
||||
_marker attachTo [_crate, [0,0,0.5]];
|
||||
};
|
||||
};
|
@ -25,7 +25,7 @@
|
||||
*/
|
||||
if (DMS_Mission_Arr isEqualTo []) exitWith {}; // Empty array, no missions running
|
||||
|
||||
private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_buildings", "_vehs", "_crate_info_array", "_msgWIN", "_msgLose", "_markers", "_missionSide", "_arr", "_cleanupList"];
|
||||
private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_buildings", "_vehs", "_crate_info_array", "_mines", "_msgWIN", "_msgLose", "_markers", "_missionSide", "_arr", "_cleanupList"];
|
||||
|
||||
|
||||
{
|
||||
@ -43,6 +43,7 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
||||
_buildings = _x select 4 select 0;
|
||||
_vehs = _x select 4 select 1;
|
||||
_crate_info_array = _x select 4 select 2;
|
||||
_mines = _x select 4 select 3;
|
||||
_msgWIN = _x select 5 select 0;
|
||||
_msgLose = _x select 5 select 1;
|
||||
_markers = _x select 6;
|
||||
@ -75,6 +76,13 @@ private ["_pos", "_success", "_timeStarted", "_timeUntilFail", "_units", "_build
|
||||
_x call DMS_fnc_FillCrate;
|
||||
} forEach _crate_info_array;
|
||||
|
||||
if (DMS_despawnMines_onCompletion) then
|
||||
{
|
||||
{
|
||||
deleteVehicle _x;
|
||||
} forEach _mines;
|
||||
};
|
||||
|
||||
_msgWIN call DMS_fnc_BroadcastMissionStatus;
|
||||
[_markers,"win"] call DMS_fnc_RemoveMarkers;
|
||||
|
||||
|
@ -269,6 +269,16 @@ if (isPlayer _killer) then
|
||||
|
||||
_roadKilled = true;
|
||||
|
||||
if (DMS_explode_onRoadkill) 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];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// Remove gear from roadkills if configured to do so
|
||||
if (DMS_remove_roadkill && {(random 100) <= DMS_remove_roadkill_chance}) then
|
||||
|
@ -38,7 +38,11 @@ if (!_OK) exitWith
|
||||
diag_log format ["DMS ERROR :: Calling DMS_fnc_SpawnAIStatic with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
_MGClassInput = param [5,"random",[""]];
|
||||
_MGClassInput = "random";
|
||||
if ((count _this)>5) then
|
||||
{
|
||||
_MGClassInput = param [5,"random",[""]];
|
||||
};
|
||||
|
||||
|
||||
_guns = [];
|
||||
|
@ -48,8 +48,11 @@ if (!_OK) exitWith
|
||||
// Simply use _spawnPos if _gotoPos isn't defined. Yes, you might get "param"/"params" RPT spam. Deal with it ;)
|
||||
_gotoPos = _positions param [1,_spawnPos,[[]],[2,3]];
|
||||
|
||||
|
||||
_vehClass = param [5,"random",[""]];
|
||||
_vehClass = "random";
|
||||
if ((count _this)>5) then
|
||||
{
|
||||
_vehClass = param [5,"random",[""]];
|
||||
};
|
||||
|
||||
if (_vehClass == "random") then
|
||||
{
|
||||
|
62
@ExileServer/addons/a3_dms/scripts/fn_SpawnMinefield.sqf
Normal file
62
@ExileServer/addons/a3_dms/scripts/fn_SpawnMinefield.sqf
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
DMS_fnc_SpawnMinefield
|
||||
Created by eraser1
|
||||
|
||||
Usage:
|
||||
[
|
||||
_centerPos,
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnMinefield;
|
||||
*/
|
||||
|
||||
private ["_centerPos", "_difficulty", "_side", "_mines", "_minesInfo", "_AISide", "_mineCount", "_radius"];
|
||||
|
||||
|
||||
_mines = [];
|
||||
|
||||
if (DMS_SpawnMinesAroundMissions) then
|
||||
{
|
||||
|
||||
_OK = params
|
||||
[
|
||||
["_centerPos","",[[]],[2,3]],
|
||||
["_difficulty","",[""]],
|
||||
["_side","",[""]]
|
||||
];
|
||||
|
||||
if (!_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Calling DMS_fnc_SpawnMinefield with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
_minesInfo = missionNamespace getVariable [format ["DMS_MineInfo_%1", _difficulty], [10,50]];
|
||||
_AISide = missionNamespace getVariable [format ["DMS_%1Side", _side], EAST];
|
||||
|
||||
|
||||
_mineCount = _minesInfo select 0;
|
||||
_radius = _minesInfo select 1;
|
||||
|
||||
|
||||
for "_i" from 1 to _mineCount do
|
||||
{
|
||||
private ["_minePos", "_mine"];
|
||||
|
||||
_minePos = [_centerPos,random _radius,random 360] call DMS_fnc_SelectOffsetPos;
|
||||
_mine = createMine ["ATMine", _minePos, [], 0];
|
||||
_AISide revealMine _mine;
|
||||
|
||||
|
||||
_mines pushBack _mine;
|
||||
};
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
diag_log format ["DMS_DEBUG SpawnMinefield :: Spawned %1 mines around %2 with _minesInfo: %3 | _mines: %4",count _mines,_centerPos,_minesInfo,_mines];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
_mines
|
Binary file not shown.
17
README.md
17
README.md
@ -52,6 +52,23 @@ if (!hasInterface && !isServer) then
|
||||
|
||||
|
||||
## Changelog:
|
||||
#### September 25, 2015 (1:30 AM CST-America):
|
||||
* NEW CONFIG VALUES:
|
||||
DMS_SpawnMinesAroundMissions
|
||||
DMS_despawnMines_onCompletion
|
||||
DMS_MineInfo_easy
|
||||
DMS_MineInfo_moderate
|
||||
DMS_MineInfo_difficult
|
||||
DMS_MineInfo_hardcore
|
||||
DMS_explode_onRoadkill
|
||||
* You can now spawn randomly generated minefields around missions! Numberof mines and radius is dependent on difficulty.
|
||||
* Also, you can now spawn an explosion on an AI when it is roadkilled, causing a wheel or two of the roadkilling vehicle to break.
|
||||
* Commented out the spawning of static-relative conversion of base objects in test mission.
|
||||
* Included example of how to spawn the minefield in the test mission.
|
||||
* Reduced some of the RPT spam.
|
||||
* Smoke/IR grenades will only spawn on proper crates - you can now safely use DMS_fnc_FillCrate with non-crate objects but still have smoke available.
|
||||
|
||||
|
||||
#### September 21, 2015 (11:30 PM CST-America):
|
||||
* NEW CONFIG VALUES:
|
||||
DMS_Diff_RepOrTabs_on_roadkill
|
||||
|
Loading…
Reference in New Issue
Block a user