mirror of
https://github.com/Defent/DMS_Exile.git
synced 2024-08-30 16:52:12 +00:00
new stuff :D
This commit is contained in:
parent
c1933293c1
commit
05b89c93ca
@ -4,7 +4,7 @@ class CfgPatches
|
||||
{
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
a3_DMS_version = "June 30, 2016";
|
||||
a3_DMS_version = "July 3, 2016";
|
||||
requiredVersion = 1.36;
|
||||
requiredAddons[] = {"exile_client","exile_server_config"};
|
||||
};
|
||||
|
@ -8,7 +8,11 @@
|
||||
A lot of these configs are influenced by WAI :P
|
||||
https://github.com/nerdalertdk/WICKED-AI
|
||||
*/
|
||||
// If you don't want the AI to have marksman DLC weapons, then simply remove the line below, or comment it by putting // at the beginning of the line
|
||||
#define GIVE_AI_MARKSMAN_DLC_WEAPONS 1
|
||||
|
||||
// If you don't want crates to spawn with marksman DLC weapons, simply remove the line below or comment it out.
|
||||
#define USE_MARKSMAN_DLC_WEAPONS_IN_CRATES 1
|
||||
|
||||
|
||||
DMS_Use_Map_Config = true; // Whether or not to use config overwrites specific to the map.
|
||||
@ -199,24 +203,38 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
|
||||
/*Mission notification settings*/
|
||||
|
||||
DMS_BanditMissionTypes = [ // List of missions with spawn chances. If they add up to 100%, they represent the percentage chance each one will spawn
|
||||
["donthasslethehoff",5],
|
||||
["bandits",5],
|
||||
["bauhaus",5],
|
||||
["cardealer",5],
|
||||
["humanitarian",5],
|
||||
["foodtransport",5],
|
||||
["blackhawkdown",4],
|
||||
["construction",4],
|
||||
["walmart",4],
|
||||
["mercenaries",4],
|
||||
["guntransport",4],
|
||||
DMS_BanditMissionTypes = [ // List of missions with spawn chances. If they add up to 100%, they represent the percentage chance each one will spawn
|
||||
["bandits",3],
|
||||
["bauhaus",3],
|
||||
["beertransport",3],
|
||||
["behindenemylines",3],
|
||||
["blackhawkdown",3],
|
||||
["cardealer",3],
|
||||
["construction",3],
|
||||
["donthasslethehoff",3],
|
||||
["foodtransport",3],
|
||||
["guntransport",3],
|
||||
["humanitarian",3],
|
||||
["lost_battalion",3],
|
||||
["medical",3],
|
||||
["mercbase",2],
|
||||
["mercenaries",3],
|
||||
["nedbuilding1_mission",3],
|
||||
["nedcar_mission",4],
|
||||
["nedguns1_mission",3],
|
||||
["nedhatchback_mission",3],
|
||||
["nedhunter_mission",2],
|
||||
["nedifrit_mission",2],
|
||||
["nedlittlebird_mission",2],
|
||||
["nedmedical1_mission",3],
|
||||
["nedoffroad_mission",3],
|
||||
["nedresearch_mission",3],
|
||||
["nedsnipercamp_mission",3],
|
||||
["nedstrider_mission",2],
|
||||
["nedural_mission",3],
|
||||
["roguenavyseals",3],
|
||||
["thieves",2],
|
||||
["lost_battalion",2],
|
||||
["behindenemylines",2],
|
||||
["mercbase",1]
|
||||
["thieves",3],
|
||||
["walmart",3]
|
||||
];
|
||||
|
||||
|
||||
@ -373,7 +391,7 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
DMS_ai_freezingDistance = 3500; // If there are no players within this distance of the leader of an AI group, then the AI group will be "frozen".
|
||||
DMS_ai_unfreezingDistance = 3500; // If there are players within this distance of the leader of an AI group, then the AI group will be "un-frozen".
|
||||
DMS_ai_offloadOnUnfreeze = true; // Whether or not to offload AI to clients once they have been "un-frozen". NOTE: This config will be ignored if "DMS_ai_offload_to_client" is set to false.
|
||||
DMS_ai_freezeCheckingDelay = 30; // How often (in seconds) DMS will check whether to freeze/un-freeze AI.
|
||||
DMS_ai_freezeCheckingDelay = 15; // How often (in seconds) DMS will check whether to freeze/un-freeze AI.
|
||||
DMS_ai_freezeOnSpawn = true; // Whether or not to freeze an AI group when initially spawned.
|
||||
|
||||
DMS_ai_share_info = false; // Share info about killer
|
||||
@ -445,14 +463,25 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
"arifle_TRG21_F",
|
||||
"arifle_TRG20_F",
|
||||
"arifle_Mk20_plain_F",
|
||||
"arifle_Mk20_F"
|
||||
"arifle_Mk20_F",
|
||||
"Exile_Weapon_AK107",
|
||||
"Exile_Weapon_AK107_GL",
|
||||
"Exile_Weapon_AK74_GL",
|
||||
"Exile_Weapon_AK47",
|
||||
"Exile_Weapon_AKM",
|
||||
"Exile_Weapon_AKS",
|
||||
"Exile_Weapon_AKS_Gold"
|
||||
];
|
||||
DMS_assault_pistols = [ // Pistols for Assault Class (Set to empty array if you don't want to give them any pistols)
|
||||
"hgun_ACPC2_F",
|
||||
"hgun_Rook40_F",
|
||||
"hgun_P07_F",
|
||||
"hgun_Pistol_heavy_01_F",
|
||||
"hgun_Pistol_heavy_02_F"
|
||||
"hgun_Pistol_heavy_02_F",
|
||||
"Exile_Weapon_Colt1911",
|
||||
"Exile_Weapon_Makarov",
|
||||
"Exile_Weapon_Taurus",
|
||||
"Exile_Weapon_TaurusGold"
|
||||
];
|
||||
DMS_assault_optics = [ // Optics for Assault Class
|
||||
"optic_Arco",
|
||||
@ -528,16 +557,26 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
|
||||
//Machine Gun Class
|
||||
DMS_MG_weps = [ // Machine Guns
|
||||
#ifdef GIVE_AI_MARKSMAN_DLC_WEAPONS
|
||||
"MMG_01_hex_F",
|
||||
"MMG_02_black_F",
|
||||
#endif
|
||||
"LMG_Zafir_F",
|
||||
"LMG_Mk200_F",
|
||||
"arifle_MX_SW_Black_F"
|
||||
"arifle_MX_SW_Black_F",
|
||||
"Exile_Weapon_RPK",
|
||||
"Exile_Weapon_PKP"
|
||||
];
|
||||
DMS_MG_pistols = [ // Pistols for MG Class (Set to empty array if you don't want to give them any pistols)
|
||||
DMS_MG_pistols = [ // Pistols for Assault Class (Set to empty array if you don't want to give them any pistols)
|
||||
"hgun_ACPC2_F",
|
||||
"hgun_Rook40_F",
|
||||
"hgun_P07_F",
|
||||
"hgun_Pistol_heavy_01_F",
|
||||
"hgun_Pistol_heavy_02_F"
|
||||
"hgun_Pistol_heavy_02_F",
|
||||
"Exile_Weapon_Colt1911",
|
||||
"Exile_Weapon_Makarov",
|
||||
"Exile_Weapon_Taurus",
|
||||
"Exile_Weapon_TaurusGold"
|
||||
];
|
||||
DMS_MG_optics = [ // Optics for MG Class
|
||||
"optic_Hamr",
|
||||
@ -619,19 +658,31 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
//Sniper Class
|
||||
DMS_sniper_weps = [ // Sniper Rifles
|
||||
"srifle_EBR_F",
|
||||
"srifle_DMR_01_F",
|
||||
"srifle_GM6_F",
|
||||
"srifle_LRR_F",
|
||||
"arifle_MXM_F",
|
||||
"arifle_MXM_Black_F",
|
||||
"srifle_DMR_02_F"
|
||||
"srifle_DMR_01_F",
|
||||
#ifdef GIVE_AI_MARKSMAN_DLC_WEAPONS
|
||||
"srifle_DMR_02_F",
|
||||
"srifle_DMR_03_woodland_F",
|
||||
//"srifle_DMR_04_F", // Does anybody like the ASP-1? :p
|
||||
"srifle_DMR_05_blk_F",
|
||||
"srifle_DMR_06_olive_F",
|
||||
#endif
|
||||
"Exile_Weapon_DMR",
|
||||
"Exile_Weapon_SVD",
|
||||
"Exile_Weapon_VSSVintorez"
|
||||
];
|
||||
DMS_sniper_pistols = [ // Pistols for Sniper Class (Set to empty array if you don't want to give them any pistols)
|
||||
DMS_sniper_pistols = [ // Pistols for Assault Class (Set to empty array if you don't want to give them any pistols)
|
||||
"hgun_ACPC2_F",
|
||||
"hgun_Rook40_F",
|
||||
"hgun_P07_F",
|
||||
"hgun_Pistol_heavy_01_F",
|
||||
"hgun_Pistol_heavy_02_F"
|
||||
"hgun_Pistol_heavy_02_F",
|
||||
"Exile_Weapon_Colt1911",
|
||||
"Exile_Weapon_Makarov",
|
||||
"Exile_Weapon_Taurus",
|
||||
"Exile_Weapon_TaurusGold"
|
||||
];
|
||||
DMS_sniper_optics = [ // Optics for Sniper Class
|
||||
"optic_SOS",
|
||||
@ -809,7 +860,18 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
]
|
||||
];
|
||||
DMS_BoxWeapons = [ // List of weapons that can spawn in a crate
|
||||
#ifdef USE_MARKSMAN_DLC_WEAPONS_IN_CRATES
|
||||
"srifle_DMR_02_F",
|
||||
"srifle_DMR_03_woodland_F",
|
||||
//"srifle_DMR_04_F", // ASP-1 Kir
|
||||
"srifle_DMR_05_blk_F",
|
||||
"srifle_DMR_06_olive_F",
|
||||
"MMG_01_hex_F",
|
||||
"MMG_02_black_F",
|
||||
#endif
|
||||
"Exile_Melee_Axe",
|
||||
"Exile_Melee_SledgeHammmer",
|
||||
"Exile_Item_Shovel",
|
||||
"arifle_Katiba_GL_F",
|
||||
"arifle_MX_GL_Black_F",
|
||||
"arifle_Mk20_GL_F",
|
||||
@ -820,16 +882,29 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
"arifle_TRG20_F",
|
||||
"arifle_Mk20_plain_F",
|
||||
"arifle_Mk20_F",
|
||||
"Exile_Weapon_AK107",
|
||||
"Exile_Weapon_AK107_GL",
|
||||
"Exile_Weapon_AK74_GL",
|
||||
"Exile_Weapon_AK47",
|
||||
"Exile_Weapon_AKM",
|
||||
"Exile_Weapon_AKS",
|
||||
"Exile_Weapon_AKS_Gold",
|
||||
"LMG_Zafir_F",
|
||||
"LMG_Mk200_F",
|
||||
"arifle_MX_SW_Black_F",
|
||||
"Exile_Weapon_RPK",
|
||||
"Exile_Weapon_PK",
|
||||
"Exile_Weapon_PKP",
|
||||
"srifle_EBR_F",
|
||||
"srifle_DMR_01_F",
|
||||
"srifle_GM6_F",
|
||||
"srifle_LRR_F",
|
||||
"arifle_MXM_F",
|
||||
"arifle_MXM_Black_F",
|
||||
"srifle_DMR_02_F"
|
||||
"Exile_Weapon_DMR",
|
||||
"Exile_Weapon_SVD",
|
||||
"Exile_Weapon_VSSVintorez",
|
||||
"Exile_Weapon_CZ550",
|
||||
"Exile_Weapon_SVDCamo"
|
||||
];
|
||||
DMS_BoxFood = [ // List of food that can spawn in a crate.
|
||||
"Exile_Item_GloriousKnakworst_Cooked",
|
||||
@ -840,14 +915,20 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
"Exile_Item_Catfood_Cooked",
|
||||
"Exile_Item_DogFood_Cooked",
|
||||
"Exile_Item_EMRE",
|
||||
"Exile_Item_EMRE"
|
||||
"Exile_Item_BeefParts",
|
||||
"Exile_Item_Noodles",
|
||||
"Exile_Item_SeedAstics",
|
||||
"Exile_Item_Raisins",
|
||||
"Exile_Item_Moobar",
|
||||
"Exile_Item_InstantCoffee"
|
||||
];
|
||||
DMS_BoxDrinks = [
|
||||
"Exile_Item_PlasticBottleCoffee",
|
||||
"Exile_Item_PowerDrink",
|
||||
"Exile_Item_PlasticBottleFreshWater",
|
||||
"Exile_Item_EnergyDrink",
|
||||
"Exile_Item_MountainDupe"
|
||||
"Exile_Item_MountainDupe",
|
||||
"Exile_Item_ChocolateMilk"
|
||||
];
|
||||
DMS_BoxMeds = [
|
||||
"Exile_Item_InstaDoc",
|
||||
@ -860,26 +941,59 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
"Exile_Melee_Axe",
|
||||
"Exile_Item_CanOpener"
|
||||
] + DMS_BoxFood + DMS_BoxDrinks + DMS_BoxMeds;
|
||||
DMS_BoxBaseParts = [
|
||||
"Exile_Item_CamoTentKit",
|
||||
DMS_Box_BaseParts_Wood = [ // List of wooden base parts.
|
||||
"Exile_Item_WoodWallKit",
|
||||
"Exile_Item_WoodWallHalfKit",
|
||||
"Exile_Item_WoodDoorwayKit",
|
||||
"Exile_Item_WoodWindowKit",
|
||||
"Exile_Item_WoodDoorKit",
|
||||
"Exile_Item_WoodDoorwayKit",
|
||||
"Exile_Item_WoodGateKit",
|
||||
"Exile_Item_WoodFloorKit",
|
||||
"Exile_Item_WoodFloorPortKit",
|
||||
"Exile_Item_WoodStairsKit",
|
||||
"Exile_Item_WoodSupportKit",
|
||||
"Exile_Item_FortificationUpgrade"
|
||||
"Exile_Item_WoodStairsKit"
|
||||
];
|
||||
DMS_Box_BaseParts_Concrete = [ // List of concrete base parts
|
||||
"Exile_Item_ConcreteWallKit",
|
||||
"Exile_Item_ConcreteWindowKit",
|
||||
"Exile_Item_ConcreteDoorKit",
|
||||
"Exile_Item_ConcreteDoorwayKit",
|
||||
"Exile_Item_ConcreteGateKit",
|
||||
"Exile_Item_ConcreteFloorKit",
|
||||
"Exile_Item_ConcreteFloorPortKit",
|
||||
"Exile_Item_ConcreteStairsKit"
|
||||
];
|
||||
DMS_BoxBaseParts = [ // List of all base parts to spawn. Weighted towards wood base parts.
|
||||
"Exile_Item_FortificationUpgrade",
|
||||
"Exile_Item_FortificationUpgrade",
|
||||
"Exile_Item_SandBagsKit_Long",
|
||||
"Exile_Item_SandBagsKit_Long",
|
||||
"Exile_Item_SandBagsKit_Corner",
|
||||
"Exile_Item_SandBagsKit_Corner",
|
||||
"Exile_Item_HBarrier5Kit"
|
||||
] + DMS_Box_BaseParts_Wood + DMS_Box_BaseParts_Wood + DMS_Box_BaseParts_Wood + DMS_Box_BaseParts_Concrete;
|
||||
DMS_BoxCraftingMaterials = [
|
||||
"Exile_Item_MetalPole",
|
||||
"Exile_Item_Cement",
|
||||
"Exile_Item_Sand",
|
||||
"Exile_Item_Sand",
|
||||
"Exile_Item_WaterCanisterDirtyWater",
|
||||
"Exile_Item_MetalBoard",
|
||||
"Exile_Item_JunkMetal"
|
||||
"Exile_Item_MetalPole",
|
||||
"Exile_Item_MetalPole",
|
||||
"Exile_Item_JunkMetal",
|
||||
"Exile_Item_JunkMetal",
|
||||
"Exile_Item_JunkMetal",
|
||||
"Exile_Item_WoodPlank",
|
||||
"Exile_Item_WoodPlank",
|
||||
"Exile_Item_WoodPlank",
|
||||
"Exile_Item_WoodPlank"
|
||||
];
|
||||
DMS_BoxTools = [
|
||||
"Exile_Item_Grinder",
|
||||
"Exile_Item_Handsaw"
|
||||
"Exile_Item_Handsaw",
|
||||
"Exile_Item_CanOpener",
|
||||
"Exile_Item_Pliers",
|
||||
"Exile_Item_Screwdriver",
|
||||
"Exile_Item_Foolbox"
|
||||
];
|
||||
DMS_BoxBuildingSupplies = [ // List of building supplies that can spawn in a crate ("DMS_BoxBaseParts", "DMS_BoxCraftingMaterials", and "DMS_BoxTools" are automatically added to this list. "DMS_BoxCraftingMaterials" is added twice for weight.)
|
||||
"Exile_Item_DuctTape",
|
||||
@ -907,6 +1021,15 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc
|
||||
];
|
||||
DMS_BoxItems = DMS_BoxSurvivalSupplies+DMS_BoxBuildingSupplies+DMS_BoxOptics; // Random "items" can spawn optics, survival supplies, or building supplies
|
||||
|
||||
DMS_Box_BreachingCharges = [ // List of breaching charges (weighted). Not used (yet).
|
||||
"BreachingChargeBigMomma",
|
||||
"BreachingChargeMetal",
|
||||
"BreachingChargeMetal",
|
||||
"BreachingChargeWood",
|
||||
"BreachingChargeWood",
|
||||
"BreachingChargeWood"
|
||||
];
|
||||
|
||||
DMS_RareLoot = true; // Potential chance to spawn rare loot in any crate.
|
||||
DMS_RareLootAmount = 1; // How many rare loot items to add.
|
||||
DMS_RareLootList = [ // List of rare loot to spawn
|
||||
|
@ -129,7 +129,7 @@ publicVariable "DMS_CLIENT_fnc_hintSilent";
|
||||
publicVariable "DMS_Version";
|
||||
|
||||
|
||||
format["DMS_Version: %1",DMS_Version] remoteExecCall ["diag_log", -2, "DMS_LogVersion_JIP_ID"];
|
||||
format["DMS_Version: %1",DMS_Version] remoteExecCall ["diag_log", -2, "DMS_LogVersion_JIP_ID"];
|
||||
|
||||
|
||||
|
||||
@ -200,9 +200,14 @@ if (DMS_ShowDifficultyColorLegend) then
|
||||
|
||||
if (DMS_StaticMission) then
|
||||
{
|
||||
private _temp = DMS_StaticMinPlayerDistance;
|
||||
DMS_StaticMinPlayerDistance = 0;
|
||||
|
||||
{
|
||||
[_x] call DMS_fnc_SpawnStaticMission;
|
||||
} forEach DMS_StaticMissionsOnServerStart;
|
||||
|
||||
DMS_StaticMinPlayerDistance = _temp;
|
||||
};
|
||||
|
||||
|
||||
|
@ -11,3 +11,9 @@ DMS_MinDistFromWestBorder = 1300;
|
||||
DMS_MinDistFromEastBorder = 800;
|
||||
DMS_MinDistFromSouthBorder = 1500;
|
||||
DMS_MinDistFromNorthBorder = 1900;
|
||||
|
||||
|
||||
DMS_StaticMissionsOnServerStart append
|
||||
[
|
||||
"underwater_stash"
|
||||
];
|
||||
|
@ -0,0 +1,270 @@
|
||||
/*
|
||||
Building Raid Mission with new difficulty selection system
|
||||
Hardcore now gives persistent vehicle
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
based on work by Defent and eraser1
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedbuilding1_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"hardcore",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case:
|
||||
{
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (1 + (round (random 1)));
|
||||
_crate_items = (3 + (round (random 3)));
|
||||
_crate_backpacks = 1;
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (6 + (round (random 4)));
|
||||
_crate_weapons = (2 + (round (random 1)));
|
||||
_crate_items = (6 + (round (random 3)));
|
||||
_crate_backpacks = 2;
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_AICount = (8 + (round (random 4)));
|
||||
_crate_weapons = (3 + (round (random 1)));
|
||||
_crate_items = (9 + (round (random 3)));
|
||||
_crate_backpacks = 3;
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_AICount = (10 + (round (random 4)));
|
||||
_crate_weapons = (4 + (round (random 1)));
|
||||
_crate_items = (12 + (round (random 6)));
|
||||
_crate_backpacks = 4;
|
||||
};
|
||||
};
|
||||
|
||||
//_msgStart = ['#FFFF00',format["A DIY storage is under attack! Go kill the %1 attackers",_difficulty]];
|
||||
_msgStart = ['#FFFF00',"A DIY storage is under attack! Go kill the attackers"];
|
||||
_crate_item_list = ["Exile_Item_WoodDoorKit","Exile_Item_WoodDoorwayKit","Exile_Item_WoodFloorKit","Exile_Item_WoodFloorPortKit","Exile_Item_WoodGateKit","Exile_Item_WoodStairsKit","Exile_Item_WoodSupportKit","Exile_Item_WoodWallHalfKit","Exile_Item_WoodWallKit","Exile_Item_WoodWindowKit","Exile_Item_WoodStairsKit","Exile_Item_WoodDoorwayKit","Exile_Item_WoodFloorKit","Exile_Item_WoodFloorKit","Exile_Item_WoodFloorPortKit","Exile_Item_WoodGateKit","Exile_Item_WoodStairsKit","Exile_Item_WoodSupportKit","Exile_Item_WoodWallHalfKit","Exile_Item_WoodWallKit","Exile_Item_WoodWindowKit"];
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -50,(_pos select 1)+50,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) -(5+(random 2)),(_pos select 1)-(5+(random 2)),0],
|
||||
[(_pos select 0) +(5+(random 2)),(_pos select 1)+(5+(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
|
||||
// Create Buildings - use seperate file as found in the mercbase mission
|
||||
_baseObjs =
|
||||
[
|
||||
"nedbuild1_objects",
|
||||
_pos
|
||||
] call DMS_fnc_ImportFromM3E;
|
||||
|
||||
|
||||
// If hardcore give pincoded vehicle, if not give non persistent
|
||||
if (_difficulty isEqualTo "hardcore") then {
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
_vehicle = ["Exile_Car_Ural_Covered_Worker",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts grabbed all the building materials, entry code is %1...",_pinCode]];
|
||||
} else
|
||||
{
|
||||
_vehicle = ["Exile_Car_Ural_Covered_Worker",[(_pos select 0) -30, (_pos select 1) -30,0],[], 0, "CAN_COLLIDE"] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts grabbed all the building materials"];
|
||||
};
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
[_crate_items,_crate_item_list], // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+_baseObjs+[_veh], // armed AI vehicle, base objects, and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win in persistent choice
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers stole everything!"];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Building Materials";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
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;
|
||||
};
|
294
@ExileServer/addons/a3_dms/missions/bandit/nedcar_mission.sqf
Normal file
294
@ExileServer/addons/a3_dms/missions/bandit/nedcar_mission.sqf
Normal file
@ -0,0 +1,294 @@
|
||||
/*
|
||||
nedCar Mission with new difficulty selection system
|
||||
Chance of better car for hardcore difficulty
|
||||
based on work by Defent and eraser1
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_extraParams", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_wreck", "_crate", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_rndlevel", "_PossibleVehicleClass", "_VehicleClass", "_PossibleDifficulty"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedcar_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that - removed "hardcore" from this mission
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"easy",
|
||||
"easy",
|
||||
"easy",
|
||||
"easy",
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_AICount = (3 + (round (random 2)));
|
||||
_crate_weapons = (2 + (round (random 3)));
|
||||
_crate_items = (2 + (round (random 4)));
|
||||
_crate_backpacks = 1;
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (4 + (round (random 2)));
|
||||
_crate_weapons = (4 + (round (random 5)));
|
||||
_crate_items = (4 + (round (random 6)));
|
||||
_crate_backpacks = 2;
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_AICount = (5 + (round (random 3)));
|
||||
_crate_weapons = (6 + (round (random 7)));
|
||||
_crate_items = (6 + (round (random 8)));
|
||||
_crate_backpacks = 3;
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_AICount = (6 + (round (random 4)));
|
||||
_crate_weapons = (8 + (round (random 9)));
|
||||
_crate_items = (8 + (round (random 10)));
|
||||
_crate_backpacks = 4;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
/* no patrol vehicle as this is easy!
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -75,(_pos select 1)+75,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"easy",
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
*/
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
//create possible vehicle list
|
||||
|
||||
// If hardcore give possibility of better car
|
||||
_PossibleVehicleClass =
|
||||
if (_difficulty isEqualTo "hardcore") then
|
||||
{
|
||||
[
|
||||
"Exile_Car_SUVXL_Black",
|
||||
"Exile_Car_Hatchback_Sport_Red",
|
||||
"Exile_Car_Hatchback_Sport_Blue",
|
||||
"Exile_Car_Hatchback_Sport_Orange",
|
||||
"Exile_Car_Hatchback_Sport_White",
|
||||
"Exile_Car_Hatchback_Sport_Beige",
|
||||
"Exile_Car_Hatchback_Sport_Green",
|
||||
"Exile_Car_Lada_Green",
|
||||
"Exile_Car_Lada_Red",
|
||||
"Exile_Car_Lada_White",
|
||||
"Exile_Car_Lada_Hipster",
|
||||
"Exile_Car_Volha_Blue",
|
||||
"Exile_Car_Volha_White",
|
||||
"Exile_Car_Volha_Black"
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
[
|
||||
"Exile_Car_Lada_Green",
|
||||
"Exile_Car_Lada_Taxi",
|
||||
"Exile_Car_Lada_Red",
|
||||
"Exile_Car_Lada_White",
|
||||
"Exile_Car_Lada_Hipster",
|
||||
"Exile_Car_Volha_Blue",
|
||||
"Exile_Car_Volha_White",
|
||||
"Exile_Car_Volha_Black"
|
||||
];
|
||||
};
|
||||
|
||||
//choose the vehicle
|
||||
_VehicleClass = selectRandom _PossibleVehicleClass;
|
||||
|
||||
|
||||
//DMS_fnc_SpawnPersistentVehicle will automatically turn the pincode into a string and format it.
|
||||
_pinCode = round (random 9999);
|
||||
_vehicle = [_VehicleClass, _pos getPos [30, random 360], _pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
_crate_items, // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns, // static guns - no patrol vehicle
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// Define Mission start message
|
||||
_msgStart = ['#FFFF00',"Terrorists with an old car have broken down. Go kill them and steal the car"];
|
||||
|
||||
// Define Mission Win message
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the old car, entry code %1...",_pinCode]];
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers drove off and escaped attack."];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Old Car";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
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;
|
||||
};
|
275
@ExileServer/addons/a3_dms/missions/bandit/nedguns1_mission.sqf
Normal file
275
@ExileServer/addons/a3_dms/missions/bandit/nedguns1_mission.sqf
Normal file
@ -0,0 +1,275 @@
|
||||
/*
|
||||
Guns Guns Guns Mission with new difficulty selection system
|
||||
Persistent vehicle on hardcore
|
||||
based on work by Defent and eraser1
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION newguns1_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
|
||||
case "easy":
|
||||
{
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (2 + (round (random 3)));
|
||||
_crate_items = (2 + (round (random 4)));
|
||||
_crate_backpacks = (1 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (6 + (round (random 4)));
|
||||
_crate_weapons = (4 + (round (random 4)));
|
||||
_crate_items = (4 + (round (random 4)));
|
||||
_crate_backpacks = (2 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_AICount = (8 + (round (random 4)));
|
||||
_crate_weapons = (6 + (round (random 5)));
|
||||
_crate_items = (6 + (round (random 5)));
|
||||
_crate_backpacks = (3 + (round (random 1)));
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_AICount = (8 + (round (random 4)));
|
||||
_crate_weapons = (10 + (round (random 5)));
|
||||
_crate_items = (10 + (round (random 5)));
|
||||
_crate_backpacks = (4 + (round (random 1)));
|
||||
};
|
||||
};
|
||||
|
||||
//_msgStart = ['#FFFF00',format["Some %1 terrorists are out stealing guns, get in first!",_difficulty]];
|
||||
_msgStart = ['#FFFF00',"Some terrorists are out stealing guns, get in first!"];
|
||||
|
||||
_crate_item_list = ["100Rnd_65x39_caseless_mag","100Rnd_65x39_caseless_mag_Tracer","10Rnd_127x54_Mag","10Rnd_338_Mag","10Rnd_762x54_Mag","10Rnd_762x51_Mag","150Rnd_762x51_Box","10Rnd_93x64_DMR_05_Mag","11Rnd_45ACP_Mag","150Rnd_762x54_Box","150Rnd_762x54_Box_Tracer","150Rnd_762x51_Box_Tracer","16Rnd_9x21_Mag","30Rnd_9x21_Green_Mag","30Rnd_9x21_Yellow_Mag","30Rnd_9x21_Red_Mag","200Rnd_65x39_cased_Box","200Rnd_65x39_cased_Box_Tracer","20Rnd_556x45_UW_mag","20Rnd_762x51_Mag","30Rnd_45ACP_Mag_SMG_01"];
|
||||
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"assault", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -50,(_pos select 1)+50,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) -(5+(random 2)),(_pos select 1)-(5+(random 2)),0],
|
||||
[(_pos select 0) +(5+(random 2)),(_pos select 1)+(5+(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
|
||||
// Create Buildings - use seperate file as found in the mercbase mission
|
||||
_baseObjs =
|
||||
[
|
||||
"nedguns1_objects",
|
||||
_pos
|
||||
] call DMS_fnc_ImportFromM3E;
|
||||
|
||||
// If hardcore give pincoded vehicle, if not give non persistent
|
||||
if (_difficulty isEqualTo "hardcore") then
|
||||
{
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
_vehicle = ["Exile_Car_Ural_Covered_Military",_pos getPos [30, random 360],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts have got their hands on the weapons, entry code for Ural is %1...",_pinCode]];
|
||||
} else
|
||||
{
|
||||
_vehicle = ["Exile_Car_Ural_Covered_Military",_pos getPos [30, random 360]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts have got their hands on the weapons"];
|
||||
};
|
||||
|
||||
// Select vehicle and position relative to centre trying to avoid buildings - its a none persistant vehicle so needs to be sold
|
||||
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
[_crate_items,_crate_item_list], // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+_baseObjs+[_veh], // armed AI vehicle, base objects, and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win message in vehicle persistent choice
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers stole everything, no guns for you!"];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Guns Guns Guns";
|
||||
|
||||
// Create Markers - same for all levels
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
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;
|
||||
};
|
@ -0,0 +1,293 @@
|
||||
/*
|
||||
nedHatchback Mission with new difficulty selection system
|
||||
Chance of better car for hardcore difficulty
|
||||
based on work by Defent and eraser1
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_extraParams", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_wreck", "_crate", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty", "_PossibleVehicleClass", "_VehicleClass"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedhatchback_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"easy",
|
||||
"easy",
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_AICount = (4 + (round (random 2)));
|
||||
_crate_weapons = (1 + (round (random 2)));
|
||||
_crate_items = (2 + (round (random 4)));
|
||||
_crate_backpacks = (1 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (2 + (round (random 2)));
|
||||
_crate_items = (3 + (round (random 4)));
|
||||
_crate_backpacks = (2 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_AICount = (5 + (round (random 4)));
|
||||
_crate_weapons = (3 + (round (random 2)));
|
||||
_crate_items = (4 + (round (random 4)));
|
||||
_crate_backpacks = (3 + (round (random 1)));
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_AICount = (6 + (round (random 4)));
|
||||
_crate_weapons = (4 + (round (random 2)));
|
||||
_crate_items = (5 + (round (random 4)));
|
||||
_crate_backpacks = (4 + (round (random 1)));
|
||||
};
|
||||
};
|
||||
|
||||
_msgStart = ['#FFFF00',"Terrorists with a hatchback have broken down. Go kill them and steal the car"];
|
||||
|
||||
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -75,(_pos select 1)+75,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"easy",
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
// If hardcore give possibility of better car
|
||||
_PossibleVehicleClass =
|
||||
[
|
||||
[
|
||||
"Exile_Car_Hatchback_Beige",
|
||||
"Exile_Car_Hatchback_Green",
|
||||
"Exile_Car_Hatchback_Blue",
|
||||
"Exile_Car_Hatchback_BlueCustom",
|
||||
"Exile_Car_Hatchback_BeigeCustom",
|
||||
"Exile_Car_Hatchback_Yellow",
|
||||
"Exile_Car_Hatchback_Grey",
|
||||
"Exile_Car_Hatchback_Black",
|
||||
"Exile_Car_Hatchback_Dark",
|
||||
"Exile_Car_Hatchback_Rusty1",
|
||||
"Exile_Car_Hatchback_Rusty2",
|
||||
"Exile_Car_Hatchback_Rusty3"
|
||||
],
|
||||
[
|
||||
"Exile_Car_Hatchback_Sport_Red",
|
||||
"Exile_Car_Hatchback_Sport_Blue",
|
||||
"Exile_Car_Hatchback_Sport_Orange",
|
||||
"Exile_Car_Hatchback_Sport_White",
|
||||
"Exile_Car_Hatchback_Sport_Beige",
|
||||
"Exile_Car_Hatchback_Sport_Green",
|
||||
"Exile_Car_Hatchback_Green",
|
||||
"Exile_Car_Hatchback_BlueCustom",
|
||||
"Exile_Car_Hatchback_BeigeCustom",
|
||||
"Exile_Car_Hatchback_Yellow",
|
||||
"Exile_Car_Hatchback_Grey",
|
||||
"Exile_Car_Hatchback_Black",
|
||||
"Exile_Car_Hatchback_Dark"
|
||||
]
|
||||
] select (_difficulty isEqualTo "hardcore");
|
||||
|
||||
//choose the vehicle
|
||||
_VehicleClass = selectRandom _PossibleVehicleClass;
|
||||
|
||||
|
||||
//DMS_fnc_SpawnPersistentVehicle will automatically turn the pincode into a string and format it.
|
||||
_pinCode = round (random 9999);
|
||||
_vehicle = [_VehicleClass,[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
_crate_items, // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+[_veh], // armed AI vehicle and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win message
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the hatchback, entry code %1...",_pinCode]];
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers drove off and escaped attack."];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Hatchback Steal";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
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;
|
||||
};
|
275
@ExileServer/addons/a3_dms/missions/bandit/nedhunter_mission.sqf
Normal file
275
@ExileServer/addons/a3_dms/missions/bandit/nedhunter_mission.sqf
Normal file
@ -0,0 +1,275 @@
|
||||
/*
|
||||
Hunter Mission with new difficulty selection system
|
||||
Vehicle not persistent on easy, 50/50 on moderate and 100% on difficult and hardcore
|
||||
based on work by Defent and eraser1
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_extraParams", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_wreck", "_crate", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedhunter_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"hardcore",
|
||||
"hardcore",
|
||||
"hardcore",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
|
||||
//vehicle pin code choice - doing early as its used in win message and vehicle spawn
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_msgWIN = ['#0080ff',"Convicts killed everyone and made off with the Hunter"];
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (2 + (round (random 2)));
|
||||
_crate_items = (4 + (round (random 4)));
|
||||
_crate_backpacks = (1 + (round (random 2)));
|
||||
_vehicle = ["Exile_Car_Hunter",[(_pos select 0) -30, (_pos select 1) -30]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (6 + (round (random 4)));
|
||||
_crate_weapons = (3 + (round (random 3)));
|
||||
_crate_items = (6 + (round (random 4)));
|
||||
_crate_backpacks = (2 + (round (random 2)));
|
||||
// Do coin toss calculation for vehicle and message
|
||||
if ((round (random 1)) isEqualTo 0) then
|
||||
{
|
||||
_vehicle = ["Exile_Car_Hunter",[(_pos select 0) -30, (_pos select 1) -30]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts killed everyone and made off with the Hunter"];
|
||||
}
|
||||
else
|
||||
{
|
||||
_vehicle = ["Exile_Car_Hunter",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the Hunter, entry code %1...",_pinCode]];
|
||||
};
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the Hunter, entry code %1...",_pinCode]];
|
||||
_AICount = (8 + (round (random 4)));
|
||||
_crate_weapons = (4 + (round (random 4)));
|
||||
_crate_items = (6 + (round (random 6)));
|
||||
_crate_backpacks = (3 + (round (random 2)));
|
||||
_vehicle = ["Exile_Car_Hunter",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the Hunter, entry code %1...",_pinCode]];
|
||||
_AICount = (10 + (round (random 4)));
|
||||
_crate_weapons = (5 + (round (random 5)));
|
||||
_crate_items = (8 + (round (random 8)));
|
||||
_crate_backpacks = (4 + (round (random 2)));
|
||||
_vehicle = ["Exile_Car_Hunter",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
};
|
||||
};
|
||||
|
||||
//_msgStart = ['#FFFF00',format["A Hunter is parked at a small %1 base! Go kill them and steal it",_difficulty]];
|
||||
_msgStart = ['#FFFF00',"A Hunter is parked at a small base! Go kill them and steal it"];
|
||||
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -75,(_pos select 1)+75,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) -(5+(random 2)),(_pos select 1)-(5+(random 2)),0],
|
||||
[(_pos select 0) +(5+(random 2)),(_pos select 1)+(5+(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
_crate_items, // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+[_veh], // armed AI vehicle and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win message in persistent choice
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers drove off and the base escaped attack."];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Hunter Steal";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
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;
|
||||
};
|
264
@ExileServer/addons/a3_dms/missions/bandit/nedifrit_mission.sqf
Normal file
264
@ExileServer/addons/a3_dms/missions/bandit/nedifrit_mission.sqf
Normal file
@ -0,0 +1,264 @@
|
||||
/*
|
||||
Ifrit Mission with new difficulty selection system
|
||||
Vehicle not persistent on easy, 50/50 on moderate and 100% on difficult and hardcore
|
||||
based on work by Defent and eraser1
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_extraParams", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_wreck", "_crate", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedifrit_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"hardcore",
|
||||
"hardcore",
|
||||
"hardcore",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
|
||||
//vehicle pin code choice - doing early as its used in win message and vehicle spawn
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_msgWIN = ['#0080ff',"Convicts killed everyone and made off with the Ifrit"];
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (2 + (round (random 2)));
|
||||
_crate_items = (4 + (round (random 4)));
|
||||
_crate_backpacks = (1 + (round (random 2)));
|
||||
_vehicle = ["Exile_Car_Ifrit",[(_pos select 0) -30, (_pos select 1) -30]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (6 + (round (random 4)));
|
||||
_crate_weapons = (3 + (round (random 3)));
|
||||
_crate_items = (6 + (round (random 4)));
|
||||
_crate_backpacks = (2 + (round (random 2)));
|
||||
// Do coin toss calculation for vehicle and message
|
||||
if ((round (random 1)) isEqualTo 0) then
|
||||
{
|
||||
_vehicle = ["Exile_Car_Ifrit",[(_pos select 0) -30, (_pos select 1) -30]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts killed everyone and made off with the Ifrit"];
|
||||
}
|
||||
else
|
||||
{
|
||||
_vehicle = ["Exile_Car_Ifrit",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the Ifrit, entry code %1...",_pinCode]];
|
||||
};
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the Ifrit, entry code %1...",_pinCode]];
|
||||
_AICount = (8 + (round (random 4)));
|
||||
_crate_weapons = (4 + (round (random 4)));
|
||||
_crate_items = (6 + (round (random 6)));
|
||||
_crate_backpacks = (3 + (round (random 2)));
|
||||
_vehicle = ["Exile_Car_Ifrit",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the Ifrit, entry code %1...",_pinCode]];
|
||||
_AICount = (10 + (round (random 4)));
|
||||
_crate_weapons = (5 + (round (random 5)));
|
||||
_crate_items = (8 + (round (random 8)));
|
||||
_crate_backpacks = (4 + (round (random 2)));
|
||||
_vehicle = ["Exile_Car_Ifrit",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
};
|
||||
};
|
||||
|
||||
//_msgStart = ['#FFFF00',format["An Ifrit is parked at a small %1 base! Go kill them and steal it",_difficulty]];
|
||||
_msgStart = ['#FFFF00',"An Ifrit is parked at a small base! Go kill them and steal it"];
|
||||
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -75,(_pos select 1)+75,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) -(5+(random 2)),(_pos select 1)-(5+(random 2)),0],
|
||||
[(_pos select 0) +(5+(random 2)),(_pos select 1)+(5+(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
_crate_items, // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+[_veh], // armed AI vehicle and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win message defined in difficulty choice
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers drove off in the Ifrit and the base escaped attack."];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Ifrit Steal";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
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;
|
||||
};
|
@ -0,0 +1,287 @@
|
||||
/*
|
||||
Littlebird Mission with new difficulty selection system
|
||||
Easy difficulty vehicle is not persistent
|
||||
based on work by Defent and eraser1
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_extraParams", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_wreck", "_crate", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_rndlevel", "_PossibleVehicleClass", "_PossibleDifficulty"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedlittlebird_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"hardcore",
|
||||
"hardcore",
|
||||
"hardcore",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_AICount = (4 + (round (random 2)));
|
||||
_crate_weapons = (1 + (round (random 1)));
|
||||
_crate_items = (2 + (round (random 5)));
|
||||
_crate_backpacks = (2 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (6 + (round (random 5)));
|
||||
_crate_weapons = (2 + (round (random 1)));
|
||||
_crate_items = (4 + (round (random 5)));
|
||||
_crate_backpacks = (2 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_AICount = (8 + (round (random 4)));
|
||||
_crate_weapons = (3 + (round (random 1)));
|
||||
_crate_items = (6 + (round (random 6)));
|
||||
_crate_backpacks = (3 + (round (random 1)));
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_AICount = (10 + (round (random 6)));
|
||||
_crate_weapons = (4 + (round (random 1)));
|
||||
_crate_items = (8 + (round (random 7)));
|
||||
_crate_backpacks = (4 + (round (random 1)));
|
||||
};
|
||||
};
|
||||
|
||||
_msgStart = ['#FFFF00',"A heli has landed at a small base! Go kill them and steal the heli"];
|
||||
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -75,(_pos select 1)+75,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
|
||||
//create possible vehicle list
|
||||
_PossibleVehicleClass = [
|
||||
"Exile_Chopper_Hummingbird_Civillian_Blue",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Red",
|
||||
"Exile_Chopper_Hummingbird_Civillian_ION",
|
||||
"Exile_Chopper_Hummingbird_Civillian_BlueLine",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Digital",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Elliptical",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Furious",
|
||||
"Exile_Chopper_Hummingbird_Civillian_GrayWatcher",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Jeans",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Light",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Shadow",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Sheriff",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Speedy",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Sunset",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Vrana",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Wasp",
|
||||
"Exile_Chopper_Hummingbird_Civillian_Wave"
|
||||
];
|
||||
//choose the vehicle
|
||||
_VehicleClass = selectRandom _PossibleVehicleClass;
|
||||
|
||||
|
||||
// Dont give pin coded vehicles on easy
|
||||
if (_difficulty isEqualTo "easy") then
|
||||
{
|
||||
_vehicle = [_VehicleClass,[(_pos select 0) -30, (_pos select 1) -30, 0]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts killed everyone and made off with the heli."];
|
||||
}
|
||||
else
|
||||
{
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
_vehicle = [_VehicleClass,[(_pos select 0) -30, (_pos select 1) -30, 0],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the heli, entry code %1...",_pinCode]];
|
||||
};
|
||||
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
_crate_items, // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+[_veh], // armed AI vehicle and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win message defined in persistent choice
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers flew off and the base escaped attack."];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Heli Steal";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
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;
|
||||
};
|
@ -0,0 +1,274 @@
|
||||
/*
|
||||
Medical Mission Mission with new difficulty selection system
|
||||
Hardcore now gives persistent vehicle
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
based on work by Defent and eraser1
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION newmedical1_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (1 + (round (random 1)));
|
||||
_crate_items = (3 + (round (random 3)));
|
||||
_crate_backpacks = (1 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (6 + (round (random 4)));
|
||||
_crate_weapons = (2 + (round (random 1)));
|
||||
_crate_items = (6 + (round (random 3)));
|
||||
_crate_backpacks = (2 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_AICount = (8 + (round (random 4)));
|
||||
_crate_weapons = (3 + (round (random 1)));
|
||||
_crate_items = (9 + (round (random 3)));
|
||||
_crate_backpacks = (3 + (round (random 1)));
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_AICount = (10 + (round (random 4)));
|
||||
_crate_weapons = (4 + (round (random 1)));
|
||||
_crate_items = (12 + (round (random 6)));
|
||||
_crate_backpacks = (4 + (round (random 1)));
|
||||
};
|
||||
};
|
||||
|
||||
//_msgStart = ['#FFFF00',format["A field hospital is under attack! Go kill the %1 attackers",_difficulty]];
|
||||
_msgStart = ['#FFFF00',"A field hospital is under attack! Go kill the attackers"];
|
||||
|
||||
_crate_item_list = ["Exile_Item_InstaDoc","Exile_Item_Bandage","Exile_Item_Vishpirin","Exile_Item_Bandage","Exile_Item_Vishpirin","Exile_Item_Bandage","Exile_Item_Vishpirin","Exile_Item_Bandage","Exile_Item_Vishpirin","Exile_Item_InstaDoc","Exile_Item_Bandage","Exile_Item_Vishpirin","Exile_Item_Bandage","Exile_Item_Vishpirin","Exile_Item_Bandage","Exile_Item_Vishpirin"];
|
||||
|
||||
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"assault", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -50,(_pos select 1)+50,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) -(5+(random 2)),(_pos select 1)-(5+(random 2)),0],
|
||||
[(_pos select 0) +(5+(random 2)),(_pos select 1)+(5+(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
|
||||
// Create Buildings - use seperate file as found in the mercbase mission
|
||||
_baseObjs =
|
||||
[
|
||||
"nedmed1_objects",
|
||||
_pos
|
||||
] call DMS_fnc_ImportFromM3E;
|
||||
|
||||
|
||||
// If hardcore give pincoded vehicle, if not give non persistent
|
||||
if (_difficulty isEqualTo "hardcore") then {
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
_vehicle = ["Exile_Car_Ural_Covered_Blue",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts freed the hospital and got free meds, entry code is %1...",_pinCode]];
|
||||
} else
|
||||
{
|
||||
_vehicle = ["Exile_Car_Ural_Covered_Blue",[(_pos select 0) -30, (_pos select 1) -30,0],[], 0, "CAN_COLLIDE"] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts freed the hospital and got free meds"];
|
||||
};
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
[_crate_items,_crate_item_list], // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+_baseObjs+[_veh], // armed AI vehicle, base objects, and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win message defined in persistent choice
|
||||
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers killed the medics and stole everything!"];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Hospital Attack";
|
||||
|
||||
// Create Markers - same for all levels
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
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;
|
||||
};
|
@ -0,0 +1,293 @@
|
||||
/*
|
||||
Offroad Mission with new difficulty selection system
|
||||
Random selected vehicle, 50/50 chance of persistent on easy difficulty.
|
||||
based on work by Defent and eraser1
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_extraParams", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_wreck", "_crate", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty", "_PossibleVehicleClass", "_VehicleClass"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedoffroad_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_AICount = (4 + (round (random 2)));
|
||||
_crate_weapons = (1 + (round (random 2)));
|
||||
_crate_items = (2 + (round (random 4)));
|
||||
_crate_backpacks = (1 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (2 + (round (random 2)));
|
||||
_crate_items = (4 + (round (random 4)));
|
||||
_crate_backpacks = (2 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (3 + (round (random 2)));
|
||||
_crate_items = (6 + (round (random 4)));
|
||||
_crate_backpacks = (3 + (round (random 1)));
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_AICount = (4 + (round (random 2)));
|
||||
_crate_weapons = (4 + (round (random 2)));
|
||||
_crate_items = (8 + (round (random 4)));
|
||||
_crate_backpacks = (4 + (round (random 1)));
|
||||
};
|
||||
};
|
||||
|
||||
_msgStart = ['#FFFF00',"Terrorists with an offroad have broken down. Go kill them and steal the offroad"];
|
||||
|
||||
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -75,(_pos select 1)+75,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"easy",
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
//create possible vehicle list
|
||||
_PossibleVehicleClass = [
|
||||
"Exile_Car_Offroad_Red",
|
||||
"Exile_Car_Offroad_Beige",
|
||||
"Exile_Car_Offroad_White",
|
||||
"Exile_Car_Offroad_Blue",
|
||||
"Exile_Car_Offroad_DarkRed",
|
||||
"Exile_Car_Offroad_BlueCustom",
|
||||
"Exile_Car_Offroad_Guerilla01",
|
||||
"Exile_Car_Offroad_Guerilla02",
|
||||
"Exile_Car_Offroad_Guerilla03",
|
||||
"Exile_Car_Offroad_Guerilla04",
|
||||
"Exile_Car_Offroad_Guerilla05",
|
||||
"Exile_Car_Offroad_Guerilla06",
|
||||
"Exile_Car_Offroad_Guerilla07",
|
||||
"Exile_Car_Offroad_Guerilla08",
|
||||
"Exile_Car_Offroad_Guerilla09",
|
||||
"Exile_Car_Offroad_Guerilla10",
|
||||
"Exile_Car_Offroad_Guerilla11",
|
||||
"Exile_Car_Offroad_Guerilla12",
|
||||
"Exile_Car_Offroad_Rusty1",
|
||||
"Exile_Car_Offroad_Rusty2",
|
||||
"Exile_Car_Offroad_Rusty3"
|
||||
];
|
||||
//choose the vehicle
|
||||
_VehicleClass = selectRandom _PossibleVehicleClass;
|
||||
|
||||
|
||||
if (_difficulty isEqualTo "easy") then {
|
||||
if ((round (random 1)) isEqualTo 0) then {
|
||||
_vehicle = [_VehicleClass,[(_pos select 0) -30, (_pos select 1) -30]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts killed everyone and made off with the offroad"];
|
||||
} else
|
||||
{
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
_vehicle = [_VehicleClass,[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the offroad, entry code %1...",_pinCode]];
|
||||
};
|
||||
} else
|
||||
{
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
_vehicle = [_VehicleClass,[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the offroad, entry code %1...",_pinCode]];
|
||||
};
|
||||
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
_crate_items, // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+[_veh], // armed AI vehicle and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win message in persistent choice
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers drove off and escaped attack."];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "OffRoad Steal";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
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;
|
||||
};
|
@ -0,0 +1,274 @@
|
||||
/*
|
||||
Research Mission with new difficulty selection system
|
||||
Hardcore now gives persistent vehicle
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
based on work by Defent and eraser1
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedresearch_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"hardcore",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (4 + (round (random 2)));
|
||||
_crate_items = (3 + (round (random 3)));
|
||||
_crate_backpacks = (1 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (4 + (round (random 6)));
|
||||
_crate_weapons = (6 + (round (random 3)));
|
||||
_crate_items = (6 + (round (random 3)));
|
||||
_crate_backpacks = (2 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_AICount = (6 + (round (random 6)));
|
||||
_crate_weapons = (8 + (round (random 3)));
|
||||
_crate_items = (8 + (round (random 4)));
|
||||
_crate_backpacks = (3 + (round (random 1)));
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_AICount = (8 + (round (random 8)));
|
||||
_crate_weapons = (10 + (round (random 6)));
|
||||
_crate_items = (15 + (round (random 8)));
|
||||
_crate_backpacks = (4 + (round (random 1)));
|
||||
};
|
||||
};
|
||||
|
||||
//_msgStart = ['#FFFF00',format["A %1 research camp has been spotted, find out what they are up to",_difficulty]];
|
||||
_msgStart = ['#FFFF00',"A research camp has been spotted, find out what they are up to"];
|
||||
|
||||
_crate_weapon_list = ["arifle_SDAR_F","arifle_MX_GL_Black_F","MMG_01_hex_F","MMG_01_tan_F","MMG_02_black_F","MMG_02_camo_F","MMG_02_sand_F","hgun_PDW2000_F","SMG_01_F","hgun_Pistol_heavy_01_F","hgun_Pistol_heavy_02_F"];
|
||||
_crate_item_list = ["H_HelmetLeaderO_ocamo","H_HelmetLeaderO_ocamo","H_HelmetLeaderO_oucamo","H_HelmetLeaderO_oucamo","U_B_survival_uniform","U_B_Wetsuit","U_O_Wetsuit","U_I_Wetsuit","H_HelmetB_camo","H_HelmetSpecB","H_HelmetSpecO_blk","Exile_Item_EMRE","Exile_Item_InstantCoffee","Exile_Item_PowerDrink","Exile_Item_InstaDoc"];
|
||||
|
||||
|
||||
|
||||
_group =
|
||||
[
|
||||
[[(_pos select 0)+2,(_pos select 1)+4,0],[(_pos select 0)-10,(_pos select 1)+0,0]], // Position AI in tent + 2nd squad
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"assault", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup_MultiPos;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0)+5,(_pos select 1)+40,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point, keep static as they are on top of building
|
||||
[(_pos select 0)+7,(_pos select 1)+3,(_pos select 2)+3.11146],
|
||||
[(_pos select 0)+7,(_pos select 1)+4,(_pos select 2)+3.11146]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
|
||||
// Create Buildings - use seperate file as found in the mercbase mission
|
||||
_baseObjs =
|
||||
[
|
||||
"nedresearch_objects",
|
||||
_pos
|
||||
] call DMS_fnc_ImportFromM3E;
|
||||
|
||||
// If hardcore give pincoded vehicle, if not give non persistent
|
||||
if (_difficulty isEqualTo "hardcore") then
|
||||
{
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
_vehicle = ["Exile_Car_Ural_Covered_Yellow",[(_pos select 0) -30, (_pos select 1) -0],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts have taken over the research camp, vehicle entry code is %1...",_pinCode]];
|
||||
}
|
||||
else
|
||||
{
|
||||
_vehicle = ["Exile_Car_Ural_Covered_Yellow",[(_pos select 0)-30,(_pos select 1)+0,0],[], 0, "CAN_COLLIDE"] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts have taken over the research camp"];
|
||||
};
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
[_crate_weapons,_crate_weapon_list], // Weapons
|
||||
[_crate_items,_crate_item_list], // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+_baseObjs+[_veh], // armed AI vehicle, base objects, and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win message defined in persistent choice
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The research camp has packed up and left with whatever they were making"];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Research Camp";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
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;
|
||||
};
|
@ -0,0 +1,282 @@
|
||||
/*
|
||||
Sniper Camp Mission with new difficulty selection system
|
||||
Hardcore has persistent vehicle
|
||||
based on work by Defent and eraser1
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedsnipercamp_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (4 + (round (random 2)));
|
||||
_crate_weapon_list = ["arifle_MXM_Black_F","srifle_DMR_01_F","srifle_EBR_F","srifle_GM6_camo_F","srifle_LRR_camo_F"];
|
||||
_crate_items = (8 + (round (random 3)));
|
||||
_crate_item_list = ["10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","100Rnd_65x39_caseless_mag","10Rnd_127x54_Mag","16Rnd_9x21_Mag","30Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag"];
|
||||
_crate_backpacks = (1 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (6 + (round (random 4)));
|
||||
_msgStart = ['#FFFF00',"Snipers have set up a moderate training camp, go steal their rifles"];
|
||||
_crate_weapons = (6 + (round (random 2)));
|
||||
_crate_weapon_list = ["arifle_MXM_Black_F","srifle_DMR_01_F","srifle_EBR_F","srifle_GM6_camo_F","srifle_LRR_camo_F"];
|
||||
_crate_items = (10 + (round (random 3)));
|
||||
_crate_item_list = ["10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","100Rnd_65x39_caseless_mag","10Rnd_127x54_Mag","16Rnd_9x21_Mag","30Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag"];
|
||||
_crate_backpacks = (2 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_AICount = (8 + (round (random 4)));
|
||||
_msgStart = ['#FFFF00',"Snipers have set up a difficult training camp, go steal their rifles"];
|
||||
_crate_weapons = (9 + (round (random 2)));
|
||||
_crate_weapon_list = ["srifle_DMR_03_khaki_F","srifle_DMR_03_tan_F","srifle_DMR_03_woodland_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F","srifle_EBR_F","srifle_GM6_camo_F","srifle_LRR_camo_F"];
|
||||
_crate_items = (14 + (round (random 3)));
|
||||
_crate_item_list = ["10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","100Rnd_65x39_caseless_mag","10Rnd_127x54_Mag","16Rnd_9x21_Mag","100Rnd_65x39_caseless_mag","10Rnd_127x54_Mag","16Rnd_9x21_Mag","30Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag"];
|
||||
_crate_backpacks = (3 + (round (random 1)));
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_AICount = (8 + (round (random 8)));
|
||||
_msgStart = ['#FFFF00',"Snipers have set up an advanced training camp, go steal their rifles"];
|
||||
_crate_weapons = (14 + (round (random 2)));
|
||||
_crate_weapon_list = ["srifle_DMR_02_camo_F","srifle_DMR_02_sniper_F","srifle_DMR_03_khaki_F","srifle_DMR_03_multicam_F","srifle_DMR_03_woodland_F","srifle_DMR_04_F","srifle_DMR_04_Tan_F","srifle_DMR_05_blk_F","srifle_DMR_05_hex_F","srifle_DMR_05_tan_f","srifle_DMR_06_camo_F","srifle_DMR_06_olive_F","srifle_EBR_F","srifle_GM6_camo_F","srifle_LRR_camo_F"];
|
||||
_crate_items = (17 + (round (random 3)));
|
||||
_crate_item_list = ["10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","10Rnd_93x64_DMR_05_Mag","100Rnd_65x39_caseless_mag","10Rnd_127x54_Mag","16Rnd_9x21_Mag","100Rnd_65x39_caseless_mag","10Rnd_127x54_Mag","16Rnd_9x21_Mag","30Rnd_65x39_caseless_mag","16Rnd_9x21_Mag","100Rnd_65x39_caseless_mag","10Rnd_127x54_Mag","16Rnd_9x21_Mag","30Rnd_65x39_caseless_mag","30Rnd_556x45_Stanag"];
|
||||
_crate_backpacks = (4 + (round (random 1)));
|
||||
};
|
||||
};
|
||||
|
||||
//_msgStart = ['#FFFF00',format["Snipers have set up a %1 training camp, go steal their rifles",_difficulty]];
|
||||
_msgStart = ['#FFFF00',"Snipers have set up a training camp, go steal their rifles"];
|
||||
|
||||
|
||||
|
||||
// Hardcore needs different settings for AI and message and vehicle spawning
|
||||
if (_difficulty isEqualTo "hardcore") then
|
||||
{
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
_vehicle = ["Exile_Car_Ural_Covered_Military",[(_pos select 0) +17.2, (_pos select 1) -0],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts have killed the snipers and stolen their rifles,the truck code is %1...",_pinCode]];
|
||||
_group =
|
||||
[
|
||||
[[(_pos select 0)+3,(_pos select 1)-3,0],[(_pos select 0)+(10+(random 20)),(_pos select 1)+(10+(random 20)),0]], // Position AI in tent + 2nd squad
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"sniper", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup_MultiPos;
|
||||
}
|
||||
else
|
||||
{
|
||||
_vehicle = ["Exile_Car_Ural_Covered_Military",[(_pos select 0) +17.2, (_pos select 1) -0,0],[], 0, "CAN_COLLIDE"] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts have killed the snipers and stolen their rifles"];
|
||||
_group =
|
||||
[
|
||||
[(_pos select 0)+3,(_pos select 1)-3,0], // Position AI in tent
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"sniper", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
};
|
||||
|
||||
// add vehicle patrol and randomise a little - same for all levels (as it uses variable)
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -(75-(random 25)),(_pos select 1) +(75+(random 25)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
// add static guns - same for all levels
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 1)),(_pos select 1)+(5-(random 1)),0],
|
||||
[(_pos select 0) +(5-(random 1)),(_pos select 1)-(5-(random 1)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
// Create Buildings - use seperate file as found in the mercbase mission - same for all levels
|
||||
_baseObjs =
|
||||
[
|
||||
"nedsnipercamp_objects",
|
||||
_pos
|
||||
] call DMS_fnc_ImportFromM3E;
|
||||
|
||||
// Create Crate type - same for all levels
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
// setup crate iteself with items - same for all levels
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
[_crate_weapons,_crate_weapon_list], // Weapons
|
||||
[_crate_items,_crate_item_list], // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+_baseObjs+[_veh], // armed AI vehicle, base objects, and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
//not start message here as they are defined in random choice to make the intro message different for each
|
||||
|
||||
// Define Mission Win message - defined in choices
|
||||
|
||||
// Define Mission Lose message - same for all levels
|
||||
_msgLOSE = ['#FF0000',"The Snipers have packed up and left, no rifles for you!"];
|
||||
|
||||
// Define mission name (for map marker and logging) - same for all levels
|
||||
_missionName = "Sniper Camp";
|
||||
|
||||
// Create Markers - same for all levels
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
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;
|
||||
};
|
@ -0,0 +1,262 @@
|
||||
/*
|
||||
Strider Mission with new difficulty selection system
|
||||
Vehicle not persistent on easy, 50/50 on moderate and 100% on difficult and hardcore
|
||||
based on work by Defent and eraser1
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_extraParams", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_wreck", "_crate", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_rndlevel"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedstrider_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"hardcore",
|
||||
"hardcore",
|
||||
"hardcore",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
//vehicle pin code choice - doing early as its used in win message and vehicle spawn
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_msgStart = ['#FFFF00',"A Strider is parked at a small easy base! Go kill them and steal it"];
|
||||
_msgWIN = ['#0080ff',"Convicts killed everyone and made off with the Strider"];
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (2 + (round (random 2)));
|
||||
_crate_items = (4 + (round (random 4)));
|
||||
_crate_backpacks = (1 + (round (random 2)));
|
||||
_vehicle = ["Exile_Car_Strider",[(_pos select 0) -30, (_pos select 1) -30]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_msgStart = ['#FFFF00',"A Strider is parked at a small moderate base! Go kill them and steal it"];
|
||||
_AICount = (6 + (round (random 4)));
|
||||
_crate_weapons = (3 + (round (random 3)));
|
||||
_crate_items = (6 + (round (random 4)));
|
||||
_crate_backpacks = (2 + (round (random 2)));
|
||||
// Do coin toss calculation for vehicle and message
|
||||
if ((round (random 1)) isEqualTo 0) then
|
||||
{
|
||||
_vehicle = ["Exile_Car_Strider",[(_pos select 0) -30, (_pos select 1) -30]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts killed everyone and made off with the Strider"];
|
||||
}
|
||||
else
|
||||
{
|
||||
_vehicle = ["Exile_Car_Strider",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the Strider, entry code %1...",_pinCode]];
|
||||
};
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_msgStart = ['#FFFF00',"A Strider is parked at a small difficult base! Go kill them and steal it"];
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the Strider, entry code %1...",_pinCode]];
|
||||
_AICount = (8 + (round (random 4)));
|
||||
_crate_weapons = (4 + (round (random 4)));
|
||||
_crate_items = (6 + (round (random 6)));
|
||||
_crate_backpacks = (3 + (round (random 2)));
|
||||
_vehicle = ["Exile_Car_Strider",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
};
|
||||
|
||||
case "hardcore":
|
||||
{
|
||||
_msgStart = ['#FFFF00',"A Strider is parked at a small hardcore base! Go kill them and steal it"];
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the Strider, entry code %1...",_pinCode]];
|
||||
_AICount = (10 + (round (random 4)));
|
||||
_crate_weapons = (5 + (round (random 5)));
|
||||
_crate_items = (8 + (round (random 8)));
|
||||
_crate_backpacks = (4 + (round (random 2)));
|
||||
_vehicle = ["Exile_Car_Strider",[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
};
|
||||
};
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -75,(_pos select 1)+75,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) -(5+(random 2)),(_pos select 1)-(5+(random 2)),0],
|
||||
[(_pos select 0) +(5+(random 2)),(_pos select 1)+(5+(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
_crate_items, // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+[_veh], // armed AI vehicle and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win message defined in difficulty choice
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers drove off with the Strider and the base escaped attack."];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Strider Steal";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
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;
|
||||
};
|
278
@ExileServer/addons/a3_dms/missions/bandit/nedural_mission.sqf
Normal file
278
@ExileServer/addons/a3_dms/missions/bandit/nedural_mission.sqf
Normal file
@ -0,0 +1,278 @@
|
||||
/*
|
||||
Ural Mission with new difficulty selection system
|
||||
Random select of Ural type with 50/50 chance of persistent vehicle on easy difficulty
|
||||
based on work by Defent and eraser1
|
||||
easy/mod/difficult/hardcore - reworked by [CiC]red_ned http://cic-gaming.co.uk
|
||||
*/
|
||||
|
||||
private ["_num", "_side", "_pos", "_OK", "_difficulty", "_extraParams", "_AICount", "_group", "_type", "_launcher", "_staticGuns", "_wreck", "_crate", "_crate1", "_vehicle", "_pinCode", "_class", "_veh", "_crate_loot_values", "_crate_loot_values1", "_missionAIUnits", "_missionObjs", "_msgStart", "_msgWIN", "_msgLOSE", "_missionName", "_markers", "_time", "_added", "_cleanup", "_baseObjs", "_crate_weapons", "_crate_weapon_list", "_crate_items", "_crate_item_list", "_crate_backpacks", "_PossibleDifficulty", "_PossibleVehicleClass", "_VehicleClass"];
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
|
||||
// This part is unnecessary, but exists just as an example to format the parameters for "DMS_fnc_MissionParams" if you want to explicitly define the calling parameters for DMS_fnc_FindSafePos.
|
||||
// It also allows anybody to modify the default calling parameters easily.
|
||||
if ((isNil "_this") || {_this isEqualTo [] || {!(_this isEqualType [])}}) then
|
||||
{
|
||||
_this =
|
||||
[
|
||||
[10,DMS_WaterNearBlacklist,DMS_MinSurfaceNormal,DMS_SpawnZoneNearBlacklist,DMS_TraderZoneNearBlacklist,DMS_MissionNearBlacklist,DMS_PlayerNearBlacklist,DMS_TerritoryNearBlacklist,DMS_ThrottleBlacklists],
|
||||
[
|
||||
[]
|
||||
],
|
||||
_this
|
||||
];
|
||||
};
|
||||
|
||||
// Check calling parameters for manually defined mission position.
|
||||
// You can define "_extraParams" to specify the vehicle classname to spawn, either as _vehClass or [_vehClass]
|
||||
_OK = (_this call DMS_fnc_MissionParams) params
|
||||
[
|
||||
["_pos",[],[[]],[3],[],[],[]],
|
||||
["_extraParams",[]]
|
||||
];
|
||||
|
||||
if !(_OK) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Called MISSION nedural_mission.sqf with invalid parameters: %1",_this];
|
||||
};
|
||||
|
||||
|
||||
//create possible difficulty add more of one difficulty to weight it towards that
|
||||
_PossibleDifficulty = [
|
||||
"easy",
|
||||
"easy",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"moderate",
|
||||
"difficult",
|
||||
"difficult",
|
||||
"hardcore"
|
||||
];
|
||||
//choose difficulty and set value
|
||||
_difficulty = selectRandom _PossibleDifficulty;
|
||||
|
||||
|
||||
switch (_difficulty) do
|
||||
{
|
||||
case "easy":
|
||||
{
|
||||
_AICount = (4 + (round (random 2)));
|
||||
_crate_weapons = (1 + (round (random 1)));
|
||||
_crate_items = (2 + (round (random 4)));
|
||||
_crate_backpacks = (1 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "moderate":
|
||||
{
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (2 + (round (random 2)));
|
||||
_crate_items = (4 + (round (random 4)));
|
||||
_crate_backpacks = (2 + (round (random 1)));
|
||||
};
|
||||
|
||||
case "difficult":
|
||||
{
|
||||
_AICount = (4 + (round (random 4)));
|
||||
_crate_weapons = (3 + (round (random 3)));
|
||||
_crate_items = (4 + (round (random 6)));
|
||||
_crate_backpacks = (3 + (round (random 1)));
|
||||
};
|
||||
|
||||
//case "hardcore":
|
||||
default
|
||||
{
|
||||
_AICount = (6 + (round (random 4)));
|
||||
_crate_weapons = (4 + (round (random 4)));
|
||||
_crate_items = (6 + (round (random 6)));
|
||||
_crate_backpacks = (4 + (round (random 2)));
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
_msgStart = ['#FFFF00',"Terrorists with a Ural have stopped for lunch. Go kill them and steal the truck"];
|
||||
|
||||
|
||||
|
||||
_group =
|
||||
[
|
||||
_pos, // Position of AI
|
||||
_AICount, // Number of AI
|
||||
_difficulty, // "random","hardcore","difficult","moderate", or "easy"
|
||||
"random", // "random","assault","MG","sniper" or "unarmed" OR [_type,_launcher]
|
||||
_side // "bandit","hero", etc.
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
// add vehicle patrol
|
||||
_veh =
|
||||
[
|
||||
[
|
||||
[(_pos select 0) -75,(_pos select 1)+75,0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
_difficulty,
|
||||
_side
|
||||
] call DMS_fnc_SpawnAIVehicle;
|
||||
|
||||
|
||||
// add static guns
|
||||
_staticGuns =
|
||||
[
|
||||
[
|
||||
// make statically positioned relative to centre point and randomise a little
|
||||
[(_pos select 0) -(5-(random 2)),(_pos select 1)+(5-(random 2)),0],
|
||||
[(_pos select 0) +(5-(random 2)),(_pos select 1)-(5-(random 2)),0]
|
||||
],
|
||||
_group,
|
||||
"assault",
|
||||
"static",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIStaticMG;
|
||||
|
||||
//create possible vehicle list
|
||||
_PossibleVehicleClass = [
|
||||
"Exile_Car_Ural_Open_Blue",
|
||||
"Exile_Car_Ural_Open_Yellow",
|
||||
"Exile_Car_Ural_Open_Worker",
|
||||
"Exile_Car_Ural_Open_Military",
|
||||
"Exile_Car_Ural_Covered_Blue",
|
||||
"Exile_Car_Ural_Covered_Yellow",
|
||||
"Exile_Car_Ural_Covered_Worker",
|
||||
"Exile_Car_Ural_Covered_Military"
|
||||
];
|
||||
//choose the vehicle
|
||||
_VehicleClass = selectRandom _PossibleVehicleClass;
|
||||
|
||||
|
||||
if (_difficulty isEqualTo "easy" && {(round (random 1)) isEqualTo 0}) then
|
||||
{
|
||||
_vehicle = [_VehicleClass,[(_pos select 0) -30, (_pos select 1) -30]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',"Convicts killed everyone and made off with the Ural"];
|
||||
}
|
||||
else
|
||||
{
|
||||
_pinCode = (1000 +(round (random 8999)));
|
||||
_vehicle = [_VehicleClass,[(_pos select 0) -30, (_pos select 1) -30],_pinCode] call DMS_fnc_SpawnPersistentVehicle;
|
||||
_msgWIN = ['#0080ff',format ["Convicts killed everyone and made off with the Ural, entry code %1...",_pinCode]];
|
||||
};
|
||||
|
||||
|
||||
// Create Crate type
|
||||
_crate1 = ["Box_NATO_Wps_F",_pos] call DMS_fnc_SpawnCrate;
|
||||
|
||||
|
||||
// setup crate iteself with items
|
||||
_crate_loot_values1 =
|
||||
[
|
||||
_crate_weapons, // Weapons
|
||||
_crate_items, // Items + selection list
|
||||
_crate_backpacks // Backpacks
|
||||
];
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_group // We only spawned the single group for this mission
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
_staticGuns+[_veh], // armed AI vehicle and static guns
|
||||
[_vehicle], //this is prize vehicle
|
||||
[[_crate1,_crate_loot_values1]] //this is prize crate
|
||||
];
|
||||
|
||||
// define start messages in difficulty choice
|
||||
|
||||
// Define Mission Win message in persistent vehicle choice
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"The attackers finsihed eating and drove off."];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Ural Picnic";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
_difficulty
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_group
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_pos,DMS_playerNearRadius]
|
||||
]
|
||||
],
|
||||
[
|
||||
_time,
|
||||
(DMS_MissionTimeOut select 0) + random((DMS_MissionTimeOut select 1) - (DMS_MissionTimeOut select 0))
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
_difficulty,
|
||||
[]
|
||||
] call DMS_fnc_AddMissionToMonitor;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_AddMissionToMonitor! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
// Delete AI units and the crate. I could do it in one line but I just made a little function that should work for every mission (provided you defined everything correctly)
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
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;
|
||||
};
|
314
@ExileServer/addons/a3_dms/missions/static/underwater_stash.sqf
Normal file
314
@ExileServer/addons/a3_dms/missions/static/underwater_stash.sqf
Normal file
@ -0,0 +1,314 @@
|
||||
/*
|
||||
"saltflats" static mission for Altis.
|
||||
Created by eraser1
|
||||
Credits to "Darth Rogue" for creating the base.
|
||||
*/
|
||||
|
||||
// For logging purposes
|
||||
_num = DMS_MissionCount;
|
||||
|
||||
|
||||
// Set mission side (only "bandit" is supported for now)
|
||||
_side = "bandit";
|
||||
|
||||
_pos = [5884,2997,10];
|
||||
|
||||
// This mission should spawn on server start. Otherwise, if somebody is dumb enough to wait for it to spawn, then they're gonna get killed lol.
|
||||
//if ([_pos,DMS_StaticMinPlayerDistance] call DMS_fnc_IsPlayerNearby) exitWith {"delay"};
|
||||
|
||||
|
||||
DMS_CrateCase_DiverGear =
|
||||
[
|
||||
[
|
||||
"arifle_SDAR_F",
|
||||
"arifle_SDAR_F",
|
||||
"arifle_SDAR_F",
|
||||
"arifle_SDAR_F",
|
||||
"arifle_SDAR_F"
|
||||
],
|
||||
[
|
||||
"U_O_Wetsuit",
|
||||
"U_O_Wetsuit",
|
||||
"U_O_Wetsuit",
|
||||
"U_O_Wetsuit",
|
||||
"U_O_Wetsuit",
|
||||
"V_RebreatherIA",
|
||||
"V_RebreatherIA",
|
||||
"V_RebreatherIA",
|
||||
"V_RebreatherIA",
|
||||
"V_RebreatherIA"
|
||||
],
|
||||
[
|
||||
"B_Carryall_oli",
|
||||
"B_Bergen_tna_F",
|
||||
"B_ViperHarness_oli_F"
|
||||
]
|
||||
];
|
||||
|
||||
// I only made some of the variables in this file "private" because I couldn't bother making all of them private :p
|
||||
private _crate = ["I_CargoNet_01_ammo_F",[5630,3100,0]] call DMS_fnc_SpawnCrate;
|
||||
_crate setVariable ["DMS_AllowSmoke", false];
|
||||
|
||||
|
||||
[_crate, "DiverGear"] call DMS_fnc_FillCrate;
|
||||
|
||||
|
||||
|
||||
private _sub1 = ["Exile_Boat_SDV_CSAT",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_sub1 setPosASL [5884,2997,-66];
|
||||
_sub1 setVariable ["DMS_AllowSmoke", false];
|
||||
|
||||
private _sub2 = ["Exile_Boat_SDV_CSAT",[0,0,0]] call DMS_fnc_SpawnNonPersistentVehicle;
|
||||
_sub2 setPosASL [5893.5,3037,-55];
|
||||
_sub2 setVariable ["DMS_AllowSmoke", false];
|
||||
|
||||
|
||||
|
||||
private _diverGearSet =
|
||||
[
|
||||
"arifle_SDAR_F",
|
||||
[],
|
||||
[["20Rnd_556x45_UW_mag",6]],
|
||||
"",
|
||||
[],
|
||||
["Rangefinder","ItemGPS","NVGoggles"],
|
||||
"",
|
||||
"",
|
||||
"U_O_Wetsuit",
|
||||
"V_RebreatherIA",
|
||||
"B_Bergen_mcamo"
|
||||
];
|
||||
|
||||
|
||||
private _temp = DMS_ai_use_launchers;
|
||||
DMS_ai_use_launchers = false;
|
||||
|
||||
private _diverGroup =
|
||||
[
|
||||
[
|
||||
[5850.8,3048.1,-37.8057],
|
||||
[5863.21,3036.56,-38.2891],
|
||||
[5871.43,3054.4,-39.343],
|
||||
[5915.36,3021.77,-58.8748],
|
||||
[5905.08,2987.15,-65.313],
|
||||
[5877.29,2984.19,-60.6961],
|
||||
[5887.88,2986.54,-60.7556],
|
||||
[5909.77,3037.79,-52.0807],
|
||||
[5878.36,3045.98,-48.1157],
|
||||
[5845.63,3028.38,-49.0821],
|
||||
[5851.09,3009.14,-52.1915],
|
||||
[5856.83,3016.01,-49.785],
|
||||
[5869.44,3017.86,-49.7803],
|
||||
[5879.65,3022.51,-47.769],
|
||||
[5892.57,3030.16,-48.894],
|
||||
[5900.21,3031.82,-50.4109],
|
||||
[5882.36,3003.04,-55.3779],
|
||||
[5858.68,2977.79,-63.6817],
|
||||
[5899.83,3044.99,-51.4147],
|
||||
[5875.81,3007.73,-55.331],
|
||||
[5899.77,2994.57,-61.1307]
|
||||
],
|
||||
21,
|
||||
"hardcore",
|
||||
"custom",
|
||||
_side,
|
||||
_diverGearSet
|
||||
] call DMS_fnc_SpawnAIGroup_MultiPos;
|
||||
|
||||
DMS_ai_use_launchers = _temp;
|
||||
|
||||
|
||||
|
||||
// Remove all previous waypoints for the diver group
|
||||
for "_i" from count (waypoints _diverGroup) to 1 step -1 do
|
||||
{
|
||||
deleteWaypoint ((waypoints _diverGroup) select _i);
|
||||
};
|
||||
|
||||
private _wp = _diverGroup addWaypoint [_sub1,0];
|
||||
_wp setWaypointType "GUARD";
|
||||
|
||||
|
||||
|
||||
|
||||
private _landGroup =
|
||||
[
|
||||
[5633,3108,0],
|
||||
5,
|
||||
"hardcore",
|
||||
"sniper",
|
||||
"bandit"
|
||||
] call DMS_fnc_SpawnAIGroup;
|
||||
|
||||
|
||||
|
||||
// Define mission-spawned AI Units
|
||||
_missionAIUnits =
|
||||
[
|
||||
_diverGroup, // We only spawned the single group for this mission
|
||||
_landGroup
|
||||
];
|
||||
|
||||
// Define the group reinforcements
|
||||
_groupReinforcementsInfo =
|
||||
[
|
||||
// Removed reinforcements for this because while I was testing the mission the AI took too long to get back to the objective, and that's annoying
|
||||
/*
|
||||
[
|
||||
_diverGroup, // pass the group
|
||||
[
|
||||
[
|
||||
-1, // Let's limit number of units instead...
|
||||
0
|
||||
],
|
||||
[
|
||||
10, // Maximum 10 units can be given as reinforcements.
|
||||
0
|
||||
]
|
||||
],
|
||||
[
|
||||
180, // About a 3 minute delay between reinforcements.
|
||||
diag_tickTime
|
||||
],
|
||||
[
|
||||
[5810,2874,1],
|
||||
[5933,2912,2],
|
||||
[5862,3132,0.5]
|
||||
],
|
||||
"custom",
|
||||
"hardcore",
|
||||
_side,
|
||||
"reinforce",
|
||||
[
|
||||
5, // Reinforcements will only trigger if there's fewer than 5 members left in the group
|
||||
3 // 3 reinforcement units per wave.
|
||||
],
|
||||
_diverGearSet
|
||||
]
|
||||
*/
|
||||
];
|
||||
|
||||
// Define mission-spawned objects and loot values
|
||||
_missionObjs =
|
||||
[
|
||||
[],
|
||||
[_sub1, _sub2],
|
||||
[
|
||||
[
|
||||
_sub1,
|
||||
[
|
||||
1,
|
||||
[2,DMS_Box_BaseParts_Concrete],
|
||||
1
|
||||
]
|
||||
],
|
||||
[
|
||||
_sub2,
|
||||
[
|
||||
[2,DMS_sniper_weps], // Spawn a random 5 weapons that AI snipers can spawn with.
|
||||
[5,DMS_BoxSurvivalSupplies],
|
||||
1
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
// Define Mission Start message
|
||||
_msgStart = ['#FFFF00', "The CSAT are storing money and supplies in an underwater stash! Eliminate them and take the supplies!"];
|
||||
|
||||
// Define Mission Win message
|
||||
_msgWIN = ['#0080ff',"Convicts have successfully eliminated the CSAT and obtained the underwater stash!"];
|
||||
|
||||
// Define Mission Lose message
|
||||
_msgLOSE = ['#FF0000',"Seems like CSAT forces moved their stash away..."];
|
||||
|
||||
// Define mission name (for map marker and logging)
|
||||
_missionName = "Underwater Stash";
|
||||
|
||||
// Create Markers
|
||||
_markers =
|
||||
[
|
||||
_pos,
|
||||
_missionName,
|
||||
"hardcore"
|
||||
] call DMS_fnc_CreateMarker;
|
||||
|
||||
// Record time here (for logging purposes, otherwise you could just put "diag_tickTime" into the "DMS_AddMissionToMonitor" parameters directly)
|
||||
_time = diag_tickTime;
|
||||
|
||||
// Parse and add mission info to missions monitor
|
||||
_added =
|
||||
[
|
||||
_pos,
|
||||
[
|
||||
[
|
||||
"kill",
|
||||
_diverGroup // Only need to kill the diver group.
|
||||
],
|
||||
[
|
||||
"playerNear",
|
||||
[_sub1,40]
|
||||
]
|
||||
],
|
||||
_groupReinforcementsInfo,
|
||||
[
|
||||
_time,
|
||||
DMS_StaticMissionTimeOut call DMS_fnc_SelectRandomVal
|
||||
],
|
||||
_missionAIUnits,
|
||||
_missionObjs,
|
||||
[_missionName,_msgWIN,_msgLOSE],
|
||||
_markers,
|
||||
_side,
|
||||
"hardcore",
|
||||
[],
|
||||
[
|
||||
[
|
||||
[
|
||||
_sub1,
|
||||
{_this setVariable ["ExileMoney",15000,true]} // The submarine will have 15000 poptabs after the mission completes. The capacity is actually 5000, but I just overload it.
|
||||
]
|
||||
],
|
||||
[],
|
||||
{},
|
||||
{}
|
||||
]
|
||||
] call DMS_fnc_AddMissionToMonitor_Static;
|
||||
|
||||
// Check to see if it was added correctly, otherwise delete the stuff
|
||||
if !(_added) exitWith
|
||||
{
|
||||
diag_log format ["DMS ERROR :: Attempt to set up mission %1 with invalid parameters for DMS_fnc_AddMissionToMonitor_Static! Deleting mission objects and resetting DMS_MissionCount.",_missionName];
|
||||
|
||||
_cleanup = [];
|
||||
{
|
||||
_cleanup pushBack _x;
|
||||
} forEach _missionAIUnits;
|
||||
|
||||
_cleanup pushBack ((_missionObjs select 0)+(_missionObjs select 1));
|
||||
|
||||
{
|
||||
_cleanup pushBack (_x select 0);
|
||||
} foreach (_missionObjs select 2);
|
||||
|
||||
_cleanup call DMS_fnc_CleanUp;
|
||||
|
||||
|
||||
// Delete the markers directly
|
||||
{deleteMarker _x;} forEach _markers;
|
||||
|
||||
|
||||
// Reset the mission count
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
};
|
||||
|
||||
|
||||
// Notify players
|
||||
[_missionName,_msgStart] call DMS_fnc_BroadcastMissionStatus;
|
||||
|
||||
|
||||
|
||||
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,26,"hardcore",_time]) call DMS_fnc_DebugLog;
|
||||
};
|
14
@ExileServer/addons/a3_dms/objects/nedbuild1_objects.sqf
Normal file
14
@ExileServer/addons/a3_dms/objects/nedbuild1_objects.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
[
|
||||
["Land_Cargo_House_V2_F",[0,15,0],0],
|
||||
["Land_Cargo_House_V2_F",[6.2,15,0],0],
|
||||
["Land_Cargo_House_V2_F",[-6.2,15,0],0],
|
||||
["Land_Cargo_House_V2_F",[15,0,0],90],
|
||||
["Land_Cargo_House_V2_F",[15,6.2,0],90],
|
||||
["Land_Cargo_House_V2_F",[15,-6.2,0],90],
|
||||
["Land_Cargo_House_V2_F",[0,-15,0],180],
|
||||
["Land_Cargo_House_V2_F",[-6.2,-15,0],180],
|
||||
["Land_Cargo_House_V2_F",[6.2,-15,0],180],
|
||||
["Land_Cargo_House_V2_F",[-15,0,0],270],
|
||||
["Land_Cargo_House_V2_F",[-15,-6.2,0],270],
|
||||
["Land_Cargo_House_V2_F",[-15,6.2,0],270]
|
||||
]
|
14
@ExileServer/addons/a3_dms/objects/nedguns1_objects.sqf
Normal file
14
@ExileServer/addons/a3_dms/objects/nedguns1_objects.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
[
|
||||
["Land_Cargo_House_V3_F",[0,15,0],0],
|
||||
["Land_Cargo_House_V3_F",[6.2,15,0],0],
|
||||
["Land_Cargo_House_V3_F",[-6.2,15,0],0],
|
||||
["Land_Cargo_House_V3_F",[15,0,0],90],
|
||||
["Land_Cargo_House_V3_F",[15,6.2,0],90],
|
||||
["Land_Cargo_House_V3_F",[15,-6.2,0],90],
|
||||
["Land_Cargo_House_V3_F",[0,-15,0],180],
|
||||
["Land_Cargo_House_V3_F",[-6.2,-15,0],180],
|
||||
["Land_Cargo_House_V3_F",[6.2,-15,0],180],
|
||||
["Land_Cargo_House_V3_F",[-15,0,0],270],
|
||||
["Land_Cargo_House_V3_F",[-15,-6.2,0],270],
|
||||
["Land_Cargo_House_V3_F",[-15,6.2,0],270]
|
||||
]
|
14
@ExileServer/addons/a3_dms/objects/nedmed1_objects.sqf
Normal file
14
@ExileServer/addons/a3_dms/objects/nedmed1_objects.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
[
|
||||
["Land_Medevac_house_V1_F",[0,15,0],0],
|
||||
["Land_Medevac_house_V1_F",[6.2,15,0],0],
|
||||
["Land_Medevac_house_V1_F",[-6.2,15,0],0],
|
||||
["Land_Medevac_house_V1_F",[15,0,0],90],
|
||||
["Land_Medevac_house_V1_F",[15,6.2,0],90],
|
||||
["Land_Medevac_house_V1_F",[15,-6.2,0],90],
|
||||
["Land_Medevac_house_V1_F",[0,-15,0],180],
|
||||
["Land_Medevac_house_V1_F",[-6.2,-15,0],180],
|
||||
["Land_Medevac_house_V1_F",[6.2,-15,0],180],
|
||||
["Land_Medevac_house_V1_F",[-15,0,0],270],
|
||||
["Land_Medevac_house_V1_F",[-15,-6.2,0],270],
|
||||
["Land_Medevac_house_V1_F",[-15,6.2,0],270]
|
||||
]
|
@ -0,0 +1,7 @@
|
||||
[
|
||||
["Land_Research_HQ_F",[10,0,0],0],
|
||||
["Land_CncBarrierMedium4_F",[1,7,0],0],
|
||||
["Land_CncBarrierMedium4_F",[1,-7,0],0],
|
||||
["Land_CncBarrierMedium4_F",[-3,-4,0],90],
|
||||
["Land_CncBarrierMedium4_F",[-3,3.5,0],90]
|
||||
]
|
12
@ExileServer/addons/a3_dms/objects/nedsnipercamp_objects.sqf
Normal file
12
@ExileServer/addons/a3_dms/objects/nedsnipercamp_objects.sqf
Normal file
@ -0,0 +1,12 @@
|
||||
[
|
||||
["Land_PartyTent_01_F",[0,0,0],0],
|
||||
["Land_TentA_F",[0,-10,0],0],
|
||||
["Land_TentA_F",[-2.7,-10,0],0],
|
||||
["Land_TentA_F",[2.7,-10,0],0],
|
||||
["Land_TentA_F",[0,10,0],180],
|
||||
["Land_TentA_F",[2.7,10,0],180],
|
||||
["Land_TentA_F",[-2.7,10,0],180],
|
||||
["MapBoard_stratis_F",[-2,0,0],0],
|
||||
["MapBoard_altis_F",[2,0,0],0],
|
||||
["Land_RattanChair_01_F",[-4,-3,0],0]
|
||||
]
|
@ -179,7 +179,7 @@ if ((_lootValues isEqualType []) && {!((_lootValues select 1) isEqualType {})})
|
||||
_weapon = [_weapon,1];
|
||||
};
|
||||
_crate addWeaponCargoGlobal _weapon;
|
||||
if !(_ammo isEqualTo "Exile_Magazine_Swing") then
|
||||
if !(_ammo in ["Exile_Magazine_Swing","Exile_Magazine_Boing","Exile_Magazine_Swoosh"]) then
|
||||
{
|
||||
_crate addItemCargoGlobal [_ammo, (DMS_MinimumMagCount + floor(random DMS_MagRange))];
|
||||
};
|
||||
|
@ -24,7 +24,8 @@
|
||||
_difficulty, // STRING: The difficulty of the AI to be spawned. Supported values: "random","static","hardcore","difficult","moderate", or "easy"
|
||||
_side, // STRING: The "side" that the AI are on. Currently only "bandit" is supported.
|
||||
_monitorType, // STRING: How the AI group should be managed. Supported types: "playernear", "maintain", "reinforce", "increasing_resistance", "armed_vehicle"
|
||||
_monitorParams // ARRAY: Parameters specific to the _monitorType. See below.
|
||||
_monitorParams, // ARRAY: Parameters specific to the _monitorType. See below.
|
||||
_customGearSet // (OPTIONAL) ARRAY: The custom gear set of the AI. Refer to documentation of fn_SpawnAISoldier.sqf for more info: https://github.com/Defent/DMS_Exile/blob/master/%40ExileServer/addons/a3_dms/scripts/fn_SpawnAISoldier.sqf
|
||||
] call DMS_fnc_GroupReinforcementsManager;
|
||||
|
||||
About "_monitorType" types:
|
||||
@ -175,6 +176,16 @@ exitWith
|
||||
true
|
||||
};
|
||||
|
||||
private _customGearSet =
|
||||
if ((count _this) > 9) then
|
||||
{
|
||||
_this select 9
|
||||
}
|
||||
else
|
||||
{
|
||||
[]
|
||||
};
|
||||
|
||||
|
||||
|
||||
_fnc_isDepleted =
|
||||
@ -570,13 +581,13 @@ if (!_reinforcementsDepleted && {(diag_tickTime-_lastUpdated)>_updateDelay}) the
|
||||
|
||||
for "_i" from 0 to (_unitsToSpawn-1) do
|
||||
{
|
||||
_units pushBack ([_AIGroup,_spawnPos,_class,_difficulty,_side,"Soldier"] call DMS_fnc_SpawnAISoldier);
|
||||
_units pushBack ([_AIGroup,_spawnPos,_class,_difficulty,_side,"Soldier",_customGearSet] call DMS_fnc_SpawnAISoldier);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
// Shuffle the original list and make a copy.
|
||||
private _spawningLocations = (_spawnLocations call ExileClient_util_array_shuffle) + [];
|
||||
// Shuffle the list.
|
||||
private _spawningLocations = _spawnLocations call ExileClient_util_array_shuffle;
|
||||
_spawnPos = _spawningLocations select 0; // Define it for spawning flares
|
||||
_spawningLocations_count = count _spawningLocations;
|
||||
|
||||
@ -589,7 +600,7 @@ if (!_reinforcementsDepleted && {(diag_tickTime-_lastUpdated)>_updateDelay}) the
|
||||
// Now to spawn the AI...
|
||||
for "_i" from 0 to (_unitsToSpawn-1) do
|
||||
{
|
||||
_units pushBack ([_AIGroup,_spawningLocations select _i,_class,_difficulty,_side,"Soldier"] call DMS_fnc_SpawnAISoldier);
|
||||
_units pushBack ([_AIGroup,_spawningLocations select _i,_class,_difficulty,_side,"Soldier",_customGearSet] call DMS_fnc_SpawnAISoldier);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -71,7 +71,7 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U
|
||||
if (DMS_Show_Kill_Poptabs_Notification) then
|
||||
{
|
||||
// Create and send message to player
|
||||
_msgParams =
|
||||
private _msgParams =
|
||||
if (_moneyChange > 0) then
|
||||
{
|
||||
["SuccessTitleOnly",[format ["Gained %1 poptabs for killing %2 AI!",abs _moneyChange,_AIType]]];
|
||||
|
@ -53,6 +53,8 @@ clearItemCargoGlobal _crate;
|
||||
clearMagazineCargoGlobal _crate;
|
||||
clearBackpackCargoGlobal _crate;
|
||||
|
||||
_crate setVariable ["ExileMoney",0,true];
|
||||
|
||||
if (DMS_HideBox) then
|
||||
{
|
||||
_crate hideObjectGlobal true;
|
||||
|
@ -46,7 +46,7 @@ if !(isClass (configFile >> "CfgVehicles" >> _vehicleClass)) exitWith
|
||||
private _vehpos = [];
|
||||
private _maxDistance = 5;
|
||||
|
||||
while{count _vehpos < 1} do
|
||||
while {_vehpos isEqualTo []} do
|
||||
{
|
||||
_vehpos = _position findEmptyPosition [0,_maxDistance,_vehicleClass];
|
||||
_maxDistance = (_maxDistance + 5);
|
||||
@ -82,15 +82,15 @@ if ((getTerrainHeightASL _vehpos)>0) then
|
||||
_vehObj setVectorUp (surfaceNormal _vehpos);
|
||||
};
|
||||
|
||||
_vehObj setVariable ["ExileMoney",0,true];
|
||||
_vehObj setVariable ["ExileIsPersistent", false];
|
||||
_vehObj addMPEventHandler ["MPKilled", { if !(isServer) exitWith {}; _this call ExileServer_object_vehicle_event_onMPKilled;}];
|
||||
_vehObj addMPEventHandler ["MPKilled", { if (isServer) then {_this call ExileServer_object_vehicle_event_onMPKilled;};}];
|
||||
_vehObj addEventHandler ["GetIn", {_this call ExileServer_object_vehicle_event_onGetIn}];
|
||||
if (_vehObj isKindOf "Helicopter") then
|
||||
{
|
||||
_vehObj addEventHandler ["RopeAttach",
|
||||
{
|
||||
private "_vehicle";
|
||||
_vehicle = _this select 2;
|
||||
private _vehicle = _this select 2;
|
||||
|
||||
if !(simulationEnabled _vehicle) then
|
||||
{
|
||||
|
@ -46,8 +46,15 @@ try
|
||||
if ((!isNil "_return") && {_return isEqualTo "delay"}) exitWith
|
||||
{
|
||||
DMS_MissionCount = DMS_MissionCount - 1;
|
||||
// This will cause mission spawning to run in scheduled, but that should be a fairly minor issue.
|
||||
[60, DMS_fnc_SpawnStaticMission, [_missionType], false] call ExileServer_system_thread_addTask;
|
||||
|
||||
if (DMS_SpawnMissions_Scheduled) then
|
||||
{
|
||||
[60, DMS_fnc_SpawnStaticMission, [_missionType], false] call ExileServer_system_thread_addTask;
|
||||
}
|
||||
else
|
||||
{
|
||||
[60, {[_this, DMS_fnc_SpawnStaticMission] execFSM "exile_server\fsm\call.fsm";}, [_missionType], false] call ExileServer_system_thread_addTask;
|
||||
};
|
||||
|
||||
if (DMS_DEBUG) then
|
||||
{
|
||||
|
@ -150,6 +150,15 @@ ___
|
||||
# Changelog:
|
||||
|
||||
### Main Branch
|
||||
### July 3, 2016 (1:40 AM CST-America):
|
||||
* Updated AI weapons to include new exile weapons.
|
||||
* Updated box loot with latest food, drink, crafting materials, and building supplies.
|
||||
* Added [red_ned's mission pack](http://www.exilemod.com/topic/12072-update31-dms-bandit-missions-either-new-or-reworked/).
|
||||
* New underwater mission for Tanoa! Go ahead and try it out, give me any suggestions/tips/bug reports (OTHER THAN THE AI SWIMMING THROUGH ROCKS).
|
||||
* Added support for custom gear sets in group reinforcments.
|
||||
* Slight optimizations here and there.
|
||||
* Static missions will now spawn unscheduled if configured to do so even after a delay has been applied (from a player being too close).
|
||||
|
||||
#### June 30, 2016 (2:30 AM CST-America):
|
||||
* DMS will now update player respect in the database when a player kills an AI (and respect is awarded to the player).
|
||||
* Optimizations related to "DMS_ai_share_info" (also, using a suppressor against AI might be better ;) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user