Added the Static Loot Crate System.

This commit is contained in:
Ghostrider-DbD- 2016-11-13 06:59:40 -05:00
parent c15d580dda
commit 46d81fab51
12 changed files with 789 additions and 20 deletions

Binary file not shown.

View File

@ -241,13 +241,17 @@ AI WEAPONS, UNIFORMS, VESTS AND GEAR
blck_DLC_Sniper = [
"srifle_DMR_02_camo_F","srifle_DMR_02_F","srifle_DMR_02_sniper_F","srifle_DMR_03_F","srifle_DMR_03_tan_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"
];
blck_apexWeapons = ["arifle_AK12_F","arifle_AK12_GL_F","arifle_AKM_F","arifle_AKM_FL_F","arifle_AKS_F","arifle_ARX_blk_F","arifle_ARX_ghex_F","arifle_ARX_hex_F","arifle_CTAR_blk_F","arifle_CTAR_hex_F",
"arifle_CTAR_ghex_F","arifle_CTAR_GL_blk_F","arifle_CTARS_blk_F","arifle_CTARS_hex_F","arifle_CTARS_ghex_F","arifle_SPAR_01_blk_F","arifle_SPAR_01_khk_F","arifle_SPAR_01_snd_F",
"arifle_SPAR_01_GL_blk_F","arifle_SPAR_01_GL_khk_F","arifle_SPAR_01_GL_snd_F","arifle_SPAR_02_blk_F","arifle_SPAR_02_khk_F","arifle_SPAR_02_snd_F","arifle_SPAR_03_blk_F",
"arifle_SPAR_03_khk_F","arifle_SPAR_03_snd_F","arifle_MX_khk_F","arifle_MX_GL_khk_F","arifle_MXC_khk_F","arifle_MXM_khk_F"];
//This defines the random weapon to spawn on the AI
//https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons
blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG;
blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault +blck_RifleLMG + blck_DLC_MMG;
blck_WeaponList_Orange = blck_RifleSniper + blck_RifleAsault + blck_RifleLMG + blck_DLC_Sniper + blck_DLC_MMG + blck_apexWeapons;
blck_WeaponList_Green = blck_RifleSniper + blck_RifleAsault +blck_RifleLMG + blck_DLC_MMG + blck_apexWeapons;
blck_WeaponList_Blue = blck_RifleOther + blck_RifleAsault +blck_RifleLMG;
blck_WeaponList_Red = blck_RifleOther + blck_RifleSniper + blck_RifleAsault + blck_RifleLMG;
blck_WeaponList_Red = blck_RifleOther + blck_RifleSniper + blck_RifleAsault + blck_RifleLMG;
blck_tools = ["Exile_Item_Matches","Exile_Item_CookingPot","Exile_Melee_Axe","Exile_Item_CanOpener","Exile_Item_Handsaw","Exile_Item_Pliers"];
blck_buildingMaterials = ["Exile_Item_ExtensionCord","Exile_Item_JunkMetal","Exile_Item_LightBulb","Exile_Item_MetalBoard","Exile_Item_MetalPole","Exile_Item_Cement","Exile_Item_Sand"];

View File

@ -11,22 +11,17 @@ _addonsPath = "\q\addons\custom_server\MapAddons\mapcontent\";
_addonsEpoch = [
//["mapName","subfolder","filename.sqf"]
// when "subfolder" equals "" then the spawner will look for the file in the mapcontent directory
// See the examples below for an idea as to how to set these arrays up.
// See the examples below and in custom_server\MapAddons\mapcontent\Altis for an idea as to how to set these arrays up.
/*
["Altis","Altis","trader_ATMs.sqf"],
["Altis","Altis","DBD_EPOCH_Altis_Dump_SH.FINAL.sqf"],
["Altis","Altis","altis_epoch_beach_SH-DBD_final.sqf"],
["Tanoa","Tanoa","tanoaatmmil.sqf"]
["Altis","Altis","mobileRefuelSaltFlats.sqf"],
["Altis","Altis","smallbaseSaltFlats.sqf"]
*/
];
_addonsExile = [
/*
["Altis","Altis","altis_epoch_beach_SH-DBD_final.sqf"],
["Altis","Altis","DBD_EPOCH_Altis_Dump_SH.FINAL.sqf"],
["Altis","Altis","packStronghold-1.sqf"],
["Altis","Altis","packStrongholdMolos.sqf"],
["Namalsk","Namalsk","namalsklockers.sqf"]
["Altis","Altis","mobileRefuelSaltFlats-DBD_final.sqf"],
["Altis","Altis","smallbaseSaltFlats.sqf"]
*/
];
@ -51,13 +46,14 @@ _fnc_runIt =
};
}forEach _addons;
};
_modType = call blck_getModType;
if (_modType isEqualTo "Epoch") then
if not (isNull( configFile >> "CfgPatches" >> "a3_epoch_server" )) then
{
diag_log "[blckeagls] Running Map Addons for Epoch";
[_addonsEpoch] call _fnc_runIt;
};
if (_modType isEqualTo "Exile") then
if not (isNull( configFile >> "CfgPatches" >> "exile_server" )) then
{
diag_log "[blckeagls] Running Map Addons for Epoch";
[_addonsExile] call _fnc_runIt;

View File

@ -0,0 +1,33 @@
// Small bandit base on the salt flats
// by Ghostrider-Dbd-
// 11/8/16
private _objects = [
["Land_BluntStone_02",[26582.2,24670.5,12.0115],[[0,0.995673,-0.0929294],[-0.130865,0.0921302,0.98711]],[false,false]],
["Land_BluntStone_02",[25767.7,21581.5,24.3651],[[0,0.999645,0.0266571],[-0.0346456,-0.0266411,0.999045]],[false,false]],
["Land_BluntStone_02",[24927.3,22961.3,11.2178],[[0,0.999996,0.00265199],[0.031983,-0.00265063,0.999485]],[false,false]],
["Flag_AAF_F",[22954.8,17041.1,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_CargoBox_V1_F",[22952.6,17016,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22947.5,17024.9,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22935.9,17031.2,3.19],[[-0.866282,-0.499555,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22934,17045.2,3.19],[[-0.979295,0.202436,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22942.7,17055.7,3.19],[[0.425964,-0.90474,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22956.6,17059.1,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_Cargo40_blue_F",[22968.8,17054.2,3.19],[[0.658744,0.752367,0],[0,0,1]],[false,false]],
["Land_WaterTank_F",[22957.9,17020.7,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_WaterBarrel_F",[22973.4,17042.1,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_CncBarrier_F",[22955.9,17026.5,3.19],[[0.627124,-0.778919,0],[0,0,1]],[false,false]],
["Land_CncBarrierMedium4_F",[22944.5,17023.4,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_CncBarrierMedium4_F",[22960.6,17031.1,3.19],[[0.682042,-0.731313,0],[0,0,1]],[false,false]],
["Land_CncBarrierMedium4_F",[22966.7,17036.8,3.19],[[0.682042,-0.731313,0],[0,0,1]],[false,false]],
["Land_CncBarrierMedium4_F",[22971.8,17043.3,3.19],[[-0.855661,0.517537,0],[0,0,1]],[false,false]],
["Land_FuelStation_Build_F",[22949.7,17049.9,3.19],[[0.551057,-0.834468,0],[0,0,1]],[false,false]],
["Land_fs_feed_F",[22952.9,17044.6,3.19],[[0.555135,-0.83176,0],[0,0,1]],[false,false]]
];
{
private _object = (_x select 0) createVehicle [0,0,0];
_object setPosASL (_x select 1);
_object setVectorDirAndUp (_x select 2);
_object enableSimulationGlobal ((_x select 3) select 0);
_object allowDamage ((_x select 3) select 1);
} forEach _objects;

View File

@ -0,0 +1,41 @@
// Small bandit base on the salt flats
// by Ghostrider-Dbd-
// 11/8/16
private _objects = [
["Land_HBarrier_1_F",[23531.2,18446,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23533.5,18446.1,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23536.8,18445.9,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23540.2,18445.9,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23543.6,18445.9,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23529.6,18431.4,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23530.1,18434.7,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23530.4,18437.9,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23530.7,18441.4,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23543.7,18431.2,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23544.1,18434.4,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23544.5,18437.7,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23544.7,18441.2,3.19],[[-0.995806,0.0914938,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23530.3,18427.3,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23533.6,18426.9,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23536.9,18426.6,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]],
["Land_HBarrier_3_F",[23540.4,18426.5,3.19],[[0.0644281,0.997922,0],[0,0,1]],[false,false]],
["Land_HBarrier_01_big_tower_green_F",[23556.9,18453,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_HBarrierTower_F",[23520,18423,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_Scrap_MRAP_01_F",[23536,18434.6,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_PressureWasher_01_F",[23534.2,18427.5,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_PressureWasher_01_F",[23534.2,18427.5,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_ScrapHeap_1_F",[23549.8,18426.8,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_ScrapHeap_2_F",[23524.8,18445.7,3.19],[[0,1,0],[0,0,1]],[false,false]],
["CamoNet_INDP_Curator_F",[23536.3,18434,3.19],[[-0.998396,0.0566218,0],[0,0,1]],[false,false]],
["Land_Cargo_House_V3_F",[23556.7,18420.3,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Land_Cargo_House_V3_F",[23519.2,18449.4,3.19],[[0,1,0],[0,0,1]],[false,false]],
["Flag_AAF_F",[23538.1,18443,3.19],[[0,1,0],[0,0,1]],[false,false]]
];
{
private _object = (_x select 0) createVehicle [0,0,0];
_object setPosASL (_x select 1);
_object setVectorDirAndUp (_x select 2);
_object enableSimulationGlobal ((_x select 3) select 0);
_object allowDamage ((_x select 3) select 1);
} forEach _objects;

View File

@ -0,0 +1,196 @@
/*
Define loot crate configurations for Epoch.
*/
diag_log "[blckeagls] SLS : Loading Static Loot Container Spawning System for Epoch";
_lootBoxes =
[
/*[
"altis", // map name
"Camp1", // a name for this region for logging and debuging purpses and to help identify the definition down the road when changing things on the server
2, // number of locations specified from the list below at which to spawn crates
[ // format here is [[position x, y, z], direction, exact / loose placement (true/false), smoke near crate (true/false]
[[23555.9,18422.7,0.730287],0,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
[[23542.1,18435.9,0.00143886],0,true, false],
[[23514,18452.5,0.00143886],0,true, false],
[[23534.2,18418.8,0.00143886],0,false, true]
]
],
[ "altis",
"refuel",
2,
[ // format here is [[position x, y, z], direction, exact / loose placement (true/false), smoke near crate (true/false]
[[22963.8,17041.3,0.00143886],0,false, false],
[[22942.8,17038,0.00143886],0,false, false],
[[22948.7,17054,0.00143886],0,false, false]
] // No comma after this last one
] // No comma after this last one
*/
];
private["_loot_uniforms","_loot_pistols","_loot_rifles","_loot_snipers","_loot_LMG","_loot_silencers"];
// Edit these to your liking
//Uniforms
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_uniforms = ["U_O_CombatUniform_ocamo", "U_O_GhillieSuit", "U_O_PilotCoveralls", "U_O_Wetsuit", "U_OG_Guerilla1_1", "U_OG_Guerilla2_1", "U_OG_Guerilla2_3", "U_OG_Guerilla3_1", "U_OG_Guerilla3_2", "U_OG_leader", "U_C_Poloshirt_stripped", "U_C_Poloshirt_blue",
"U_C_Poloshirt_burgundy", "U_C_Poloshirt_tricolour", "U_C_Poloshirt_salmon", "U_C_Poloshirt_redwhite", "U_C_Poor_1", "U_C_WorkerCoveralls", "U_C_Journalist", "U_C_Scientist", "U_OrestesBody", "U_Wetsuit_uniform", "U_Wetsuit_White", "U_Wetsuit_Blue",
"U_Wetsuit_Purp", "U_Wetsuit_Camo", "U_CamoRed_uniform", "U_CamoBrn_uniform", "U_CamoBlue_uniform", "U_Camo_uniform", "U_ghillie1_uniform", "U_ghillie2_uniform", "U_ghillie3_uniform","U_B_FullGhillie_ard","U_I_FullGhillie_ard","U_O_FullGhillie_ard",
"Full Ghillie Suit Semi-Arid:","U_B_FullGhillie_sard","U_O_FullGhillie_sard","U_I_FullGhillie_sard","Full Ghillie Suit Lush","U_B_FullGhillie_lsh","U_O_FullGhillie_lsh","U_I_FullGhillie_lsh"];
//Weapons
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_pistols = blck_Pistols;
_loot_rifles = blck_RifleAsault + blck_apexWeapons;
_loot_snipers = blck_RifleSniper + blck_DLC_Sniper;
_loot_LMG = blck_RifleLMG + blck_DLC_MMG;
_loot_magazines = [ // Ignored 5.56, SMG and pistol ammo as most players seem to have little interest in it when given the choice to use higher caliber amo.
"100Rnd_65x39_caseless_mag",
"100Rnd_65x39_caseless_mag_Tracer",
"10Rnd_127x54_Mag",
"10Rnd_338_Mag",
"10Rnd_762x54_Mag",
"10Rnd_93x64_DMR_05_Mag",
"130Rnd_338_Mag", // SPMG
"150Rnd_762x54_Box",
"150Rnd_762x54_Box_Tracer",
"150Rnd_93x64_Mag", // NAVID
"16Rnd_9x21_Mag",
"200Rnd_65x39_cased_Box",
"200Rnd_65x39_cased_Box_Tracer",
"20Rnd_762x51_Mag",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green_mag_Tracer",
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer",
// Apex
"30Rnd_580x42_Mag_F",
"30Rnd_580x42_Mag_Tracer_F",
"100Rnd_580x42_Mag_F",
"100Rnd_580x42_Mag_Tracer_F",
"20Rnd_650x39_Cased_Mag_F",
"10Rnd_50BW_Mag_F",
"150Rnd_556x45_Drum_Mag_F",
"150Rnd_556x45_Drum_Mag_Tracer_F",
"30Rnd_762x39_Mag_F",
"30Rnd_762x39_Mag_Green_F",
"30Rnd_762x39_Mag_Tracer_F",
"30Rnd_762x39_Mag_Tracer_Green_F",
"30Rnd_545x39_Mag_F",
"30Rnd_545x39_Mag_Green_F",
"30Rnd_545x39_Mag_Tracer_F",
"30Rnd_545x39_Mag_Tracer_Green_F",
"200Rnd_556x45_Box_F",
"200Rnd_556x45_Box_Red_F",
"200Rnd_556x45_Box_Tracer_F",
"200Rnd_556x45_Box_Tracer_Red_F",
"10Rnd_9x21_Mag"
];
//Silencers
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_silencers = ["muzzle_sr25S_epoch","muzzle_snds_H","muzzle_snds_M","muzzle_snds_L","muzzle_snds_B","muzzle_snds_H_MG","muzzle_snds_acp","muzzle_snds_93mmg","muzzle_snds_93mmg_tan",
"muzzle_snds_338_black","muzzle_snds_338_greenmuzzle_snds_338_sand"];
private["_loot_optics","_loot_backpacks","_loot_vests","_loot_headgear","_loot_food","_loot_misc","_loot_build"];
//Optics
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_optics = ["optic_NVS","optic_tws","optic_tws_mg","optic_SOS","optic_LRPS","optic_DMS","optic_Arco","optic_Hamr","Elcan_epoch","Elcan_reflex_epoch","optic_MRCO","optic_Holosight",
"optic_Holosight_smg","optic_Aco","optic_ACO_grn","optic_Aco_smg","optic_ACO_grn_smg","optic_Yorris","optic_MRD","optic_AMS","optic_AMS_khk","optic_AMS_snd",
"optic_KHS_blk","optic_KHS_hex","optic_KHS_old","optic_KHS_tan"];
//Backpacks
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_backpacks = blck_backpacks;
//Vests
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_vests = blck_vests;
//Head Gear
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_headgear = ["H_1_EPOCH","H_2_EPOCH","H_3_EPOCH","H_4_EPOCH","H_5_EPOCH","H_6_EPOCH","H_7_EPOCH","H_8_EPOCH","H_9_EPOCH","H_10_EPOCH","H_11_EPOCH","H_12_EPOCH","H_13_EPOCH","H_14_EPOCH","H_15_EPOCH","H_16_EPOCH","H_17_EPOCH","H_18_EPOCH","H_19_EPOCH","H_20_EPOCH","H_21_EPOCH","H_22_EPOCH","H_23_EPOCH","H_24_EPOCH","H_25_EPOCH","H_26_EPOCH","H_27_EPOCH","H_28_EPOCH","H_29_EPOCH","H_30_EPOCH","H_31_EPOCH","H_32_EPOCH","H_33_EPOCH","H_34_EPOCH","H_35_EPOCH","H_36_EPOCH","H_37_EPOCH","H_38_EPOCH","H_39_EPOCH","H_40_EPOCH","H_41_EPOCH","H_42_EPOCH","H_43_EPOCH","H_44_EPOCH","H_45_EPOCH","H_46_EPOCH","H_47_EPOCH","H_48_EPOCH","H_49_EPOCH","H_50_EPOCH","H_51_EPOCH","H_52_EPOCH","H_53_EPOCH","H_54_EPOCH","H_55_EPOCH","H_56_EPOCH","H_57_EPOCH","H_58_EPOCH","H_59_EPOCH","H_60_EPOCH","H_61_EPOCH","H_62_EPOCH","H_63_EPOCH","H_64_EPOCH","H_65_EPOCH","H_66_EPOCH","H_67_EPOCH","H_68_EPOCH","H_69_EPOCH","H_70_EPOCH","H_71_EPOCH","H_72_EPOCH","H_73_EPOCH","H_74_EPOCH","H_75_EPOCH","H_76_EPOCH","H_77_EPOCH","H_78_EPOCH","H_79_EPOCH","H_80_EPOCH","H_81_EPOCH","H_82_EPOCH","H_83_EPOCH","H_84_EPOCH","H_85_EPOCH","H_86_EPOCH","H_87_EPOCH","H_88_EPOCH","H_89_EPOCH","H_90_EPOCH","H_91_EPOCH","H_92_EPOCH","H_93_EPOCH","H_94_EPOCH","H_95_EPOCH","H_96_EPOCH","H_97_EPOCH","H_98_EPOCH","H_99_EPOCH","H_100_EPOCH","H_101_EPOCH","H_102_EPOCH","H_103_EPOCH","H_104_EPOCH"];
//Food
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_food = blck_ConsumableItems;
// Tools
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_tools = [["Hatchet",2],["MeleeSledge",2],["ChainSaw",1]];
//Misc
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_Misc = ["PaintCanClear","PaintCanBlk","PaintCanBlu","PaintCanBrn","PaintCanGrn","PaintCanOra","PaintCanPur","PaintCanRed","PaintCanTeal","PaintCanYel","ItemDocument","ItemMixOil","emptyjar_epoch","FoodBioMeat","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","ItemSodaRbull","sardines_epoch","meatballs_epoch","scam_epoch","sweetcorn_epoch","Towelette","HeatPack","ColdPack","VehicleRepair","VehicleRepairLg","CircuitParts","ItemCoolerE","ItemScraps","ItemScraps","lighter_epoch","EnergyPack","EnergyPackLg"];
//Construction
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_build = blck_epochBuildingSupplies;
// Explosives
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_explosives = [["HandGrenade",3],["MiniGrenade",3],["SatchelCharge_Remote_Mag",3],["DemoCharge_Remote_Mag",3],["ClaymoreDirectionalMine_Remote_Mag",3]];
_loot_launchers = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_Titan_short_F"];
// Loot Configuration 1: Heavy Weapons and explosives
_box1_Pistols = 3;
_box1_Rifles = 5;
_box1_LMG = 4;
_box1_Snipers = 3;
_box1_Mags = [2,6];
_box1_Optics = 6;
_box1_Silencers = 5;
_box1_Explosives = 6;
_box1_FoodDrink = 6;
_box1_Misc = 3;
_box1_Backpacks = 3;
_box1_BuildingSupplies = 3;
_box1_Tools = 0;
_box1_launchers = 0;
// Note that the bonus items are listed in a nexted array within the _box1_cbonus array. It was more difficult to ocde otherwise and would have needed indexing to make it work.
_box1_bonus_items = [["SatchelCharge_Remote_Mag",3],["DemoCharge_Remote_Mag",3],["ClaymoreDirectionalMine_Remote_Mag",3]];
_box1_bonus = 1;
// Loot Configuration 2: Sniper Weapons and sniper scopes
_box2_Pistols = 3;
_box2_Rifles = 5;
_box2_LMG = 4;
_box2_Snipers = 3;
_box2_Mags = [2,6]; // [number of times to select a mag, min # of that mag to add, max # of that mag to add]
_box2_Optics = 6;
_box2_Silencers = 5;
_box2_Explosives = 6;
_box2_FoodDrink = 6;
_box2_Misc = 3;
_box2_Backpacks = 3;
_box2_BuildingSupplies = 3;
_box2_Tools = 0;
_box2_Misc = 0;
_box2_launchers = 0;
_box2_bonus_items = [["NVG_EPOCH",2],["ItemGPS",1],["Rangefinder",1],["Hatchet",2],["MeleeSledge",2],["ChainSaw",1],["water_epoch",10]];
_box2_bonus = 1;
// Loot Configuration 3: building materials and tools
_box3_Pistols = 2;
_box3_Rifles = 2;
_box3_LMG = 1;
_box3_Snipers = 1;
_box3_Mags = [4,2,6];
_box3_Optics = 1;
_box3_Silencers = 1;
_box3_Explosives = 2;
_box3_FoodDrink = 3;
_box3_Misc = 3;
_box3_Backpacks = 1;
_box3_BuildingSupplies = [8,15]; // [Number of items, min for item, max for item]
_box3_Tools = 4;
_box3_Misc = 6;
_box3_launchers = 0;
_box3_bonus_items = [["MultiGun",3],["EnergyPack",5],["EnergyPackLg",3],["ItemLockBox",2],["jerrycan_epoch",2],["ItemGoldBar10oz",2],["ItemSilverBar",4],["ItemKiloHemp",4],["Hatchet",2],["MeleeSledge",2],["ChainSaw",1],["water_epoch",10]];
_box3_bonus = 1;
////////////////////////////
// End of configurations

View File

@ -0,0 +1,302 @@
/*
Define constants for SLS for Exile
uncomment the examples below to see it in action.
or use them as a template for your own.
*/
diag_log "[blckeagls] SLS : Loading Static Loot Container Spawning System for Exile";
_lootBoxes =
[
/*[
"altis", // map name
"Camp1", // a name for this region for logging and debuging purpses and to help identify the definition down the road when changing things on the server
2, // number of locations specified from the list below at which to spawn crates
[ // format here is [[position x, y, z], direction, exact / loose placement (true/false), smoke near crate (true/false]
[[23555.9,18422.7,0.730287],0,true, false], // loadout (0-4), false=random placement near position, true = show smoke at position
[[23542.1,18435.9,0.00143886],0,true, false],
[[23514,18452.5,0.00143886],0,true, false],
[[23534.2,18418.8,0.00143886],0,false, true]
]
],
[ "altis",
"refuel",
2,
[ // format here is [[position x, y, z], direction, exact / loose placement (true/false), smoke near crate (true/false]
[[22963.8,17041.3,0.00143886],0,false, false],
[[22942.8,17038,0.00143886],0,false, false],
[[22948.7,17054,0.00143886],0,false, false]
] // No comma after this last one
] // No comma after this last one
*/
];
private["_loot_uniforms","_loot_pistols","_loot_rifles","_loot_snipers","_loot_LMG","_loot_silencers"];
// Edit these to your liking
//Uniforms
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_uniforms = ["U_O_CombatUniform_ocamo", "U_O_GhillieSuit", "U_O_PilotCoveralls", "U_O_Wetsuit", "U_OG_Guerilla1_1", "U_OG_Guerilla2_1", "U_OG_Guerilla2_3", "U_OG_Guerilla3_1", "U_OG_Guerilla3_2", "U_OG_leader", "U_C_Poloshirt_stripped", "U_C_Poloshirt_blue",
"U_C_Poloshirt_burgundy", "U_C_Poloshirt_tricolour", "U_C_Poloshirt_salmon", "U_C_Poloshirt_redwhite", "U_C_Poor_1", "U_C_WorkerCoveralls", "U_C_Journalist", "U_C_Scientist", "U_OrestesBody", "U_Wetsuit_uniform", "U_Wetsuit_White", "U_Wetsuit_Blue",
"U_Wetsuit_Purp", "U_Wetsuit_Camo", "U_CamoRed_uniform", "U_CamoBrn_uniform", "U_CamoBlue_uniform", "U_Camo_uniform", "U_ghillie1_uniform", "U_ghillie2_uniform", "U_ghillie3_uniform","U_B_FullGhillie_ard","U_I_FullGhillie_ard","U_O_FullGhillie_ard",
"Full Ghillie Suit Semi-Arid:","U_B_FullGhillie_sard","U_O_FullGhillie_sard","U_I_FullGhillie_sard","Full Ghillie Suit Lush","U_B_FullGhillie_lsh","U_O_FullGhillie_lsh","U_I_FullGhillie_lsh"];
//Weapons
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_pistols = blck_Pistols;
_loot_rifles = blck_RifleAsault + blck_apexWeapons;
_loot_snipers = blck_RifleSniper + blck_DLC_Sniper;
_loot_LMG = blck_RifleLMG + blck_DLC_MMG;
_loot_magazines = [ // Ignored 5.56, SMG and pistol ammo as most players seem to have little interest in it when given the choice to use higher caliber amo.
"100Rnd_65x39_caseless_mag",
"100Rnd_65x39_caseless_mag_Tracer",
"10Rnd_127x54_Mag",
"10Rnd_338_Mag",
"10Rnd_762x54_Mag",
"10Rnd_93x64_DMR_05_Mag",
"130Rnd_338_Mag", // SPMG
"150Rnd_762x54_Box",
"150Rnd_762x54_Box_Tracer",
"150Rnd_93x64_Mag", // NAVID
"16Rnd_9x21_Mag",
"200Rnd_65x39_cased_Box",
"200Rnd_65x39_cased_Box_Tracer",
"20Rnd_762x51_Mag",
"30Rnd_65x39_caseless_green",
"30Rnd_65x39_caseless_green_mag_Tracer",
"30Rnd_65x39_caseless_mag",
"30Rnd_65x39_caseless_mag_Tracer",
// Apex
"30Rnd_580x42_Mag_F",
"30Rnd_580x42_Mag_Tracer_F",
"100Rnd_580x42_Mag_F",
"100Rnd_580x42_Mag_Tracer_F",
"20Rnd_650x39_Cased_Mag_F",
"10Rnd_50BW_Mag_F",
"150Rnd_556x45_Drum_Mag_F",
"150Rnd_556x45_Drum_Mag_Tracer_F",
"30Rnd_762x39_Mag_F",
"30Rnd_762x39_Mag_Green_F",
"30Rnd_762x39_Mag_Tracer_F",
"30Rnd_762x39_Mag_Tracer_Green_F",
"30Rnd_545x39_Mag_F",
"30Rnd_545x39_Mag_Green_F",
"30Rnd_545x39_Mag_Tracer_F",
"30Rnd_545x39_Mag_Tracer_Green_F",
"200Rnd_556x45_Box_F",
"200Rnd_556x45_Box_Red_F",
"200Rnd_556x45_Box_Tracer_F",
"200Rnd_556x45_Box_Tracer_Red_F",
"10Rnd_9x21_Mag"
];
//Silencers
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_silencers = ["muzzle_sr25S_epoch","muzzle_snds_H","muzzle_snds_M","muzzle_snds_L","muzzle_snds_B","muzzle_snds_H_MG","muzzle_snds_acp","muzzle_snds_93mmg","muzzle_snds_93mmg_tan",
"muzzle_snds_338_black","muzzle_snds_338_greenmuzzle_snds_338_sand"];
private["_loot_optics","_loot_backpacks","_loot_vests","_loot_headgear","_loot_food","_loot_misc","_loot_build"];
//Optics
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_optics = ["optic_NVS","optic_tws","optic_tws_mg","optic_SOS","optic_LRPS","optic_DMS","optic_Arco","optic_Hamr","Elcan_epoch","Elcan_reflex_epoch","optic_MRCO","optic_Holosight",
"optic_Holosight_smg","optic_Aco","optic_ACO_grn","optic_Aco_smg","optic_ACO_grn_smg","optic_Yorris","optic_MRD","optic_AMS","optic_AMS_khk","optic_AMS_snd",
"optic_KHS_blk","optic_KHS_hex","optic_KHS_old","optic_KHS_tan"];
//Backpacks
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_backpacks = blck_backpacks;
//Vests
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_vests = blck_vests;
//Head Gear
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_headgear =
[
"H_Cap_blk",
"H_Cap_blk_Raven",
"H_Cap_blu",
"H_Cap_brn_SPECOPS",
"H_Cap_grn",
"H_Cap_headphones",
"H_Cap_khaki_specops_UK",
"H_Cap_oli",
"H_Cap_press",
"H_Cap_red",
"H_Cap_tan",
"H_Cap_tan_specops_US",
"H_Watchcap_blk",
"H_Watchcap_camo",
"H_Watchcap_khk",
"H_Watchcap_sgg",
"H_MilCap_blue",
"H_MilCap_dgtl",
"H_MilCap_mcamo",
"H_MilCap_ocamo",
"H_MilCap_oucamo",
"H_MilCap_rucamo",
"H_Bandanna_camo",
"H_Bandanna_cbr",
"H_Bandanna_gry",
"H_Bandanna_khk",
"H_Bandanna_khk_hs",
"H_Bandanna_mcamo",
"H_Bandanna_sgg",
"H_Bandanna_surfer",
"H_Booniehat_dgtl",
"H_Booniehat_dirty",
"H_Booniehat_grn",
"H_Booniehat_indp",
"H_Booniehat_khk",
"H_Booniehat_khk_hs",
"H_Booniehat_mcamo",
"H_Booniehat_tan",
"H_Hat_blue",
"H_Hat_brown",
"H_Hat_camo",
"H_Hat_checker",
"H_Hat_grey",
"H_Hat_tan",
"H_StrawHat",
"H_StrawHat_dark",
"H_Beret_02",
"H_Beret_blk",
"H_Beret_blk_POLICE",
"H_Beret_brn_SF",
"H_Beret_Colonel",
"H_Beret_grn",
"H_Beret_grn_SF",
"H_Beret_ocamo",
"H_Beret_red",
"H_Shemag_khk",
"H_Shemag_olive",
"H_Shemag_olive_hs",
"H_Shemag_tan",
"H_ShemagOpen_khk",
"H_ShemagOpen_tan",
"H_TurbanO_blk",
"H_HelmetB",
"H_HelmetB_black",
"H_HelmetB_camo",
"H_HelmetB_desert",
"H_HelmetB_grass",
"H_HelmetB_light",
"H_HelmetB_light_black",
"H_HelmetB_light_desert",
"H_HelmetB_light_grass",
"H_HelmetB_light_sand",
"H_HelmetB_light_snakeskin",
"H_HelmetB_paint",
"H_HelmetB_plain_blk",
"H_HelmetB_sand",
"H_HelmetB_snakeskin",
"H_HelmetCrew_B",
"H_HelmetCrew_I",
"H_HelmetCrew_O",
"H_HelmetIA",
"H_HelmetIA_camo",
"H_HelmetIA_net",
"H_HelmetLeaderO_ocamo",
"H_HelmetLeaderO_oucamo",
"H_HelmetO_ocamo",
"H_HelmetO_oucamo",
"H_HelmetSpecB",
"H_HelmetSpecB_blk",
"H_HelmetSpecB_paint1",
"H_HelmetSpecB_paint2",
"H_HelmetSpecO_blk",
"H_HelmetSpecO_ocamo",
"H_CrewHelmetHeli_B",
"H_CrewHelmetHeli_I",
"H_CrewHelmetHeli_O",
"H_HelmetCrew_I",
"H_HelmetCrew_B",
"H_HelmetCrew_O",
"H_PilotHelmetHeli_B",
"H_PilotHelmetHeli_I",
"H_PilotHelmetHeli_O"
];
//Food
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_food = blck_ConsumableItems;
//Misc
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_Misc = ["Exile_Item_InstaDoc","Exile_Item_Matches","Exile_Item_CookingPot","Exile_Item_CanOpener"];
//Construction
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_build = ["Exile_Item_Rope","Exile_Item_DuctTape","Exile_Item_ExtensionCord","Exile_Item_FuelCanisterEmpty",
"Exile_Item_JunkMetal","Exile_Item_LightBulb","Exile_Item_CamoTentKit","Exile_Item_WorkBenchKit",
"Exile_Item_MetalBoard","Exile_Item_MetalPole"];
_loot_tools = ["Exile_Item_Handsaw","Exile_Item_Pliers","Exile_Item_Grinder","Exile_Item_Foolbox"];
// Explosives
//------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
_loot_explosives = [["HandGrenade",3],["MiniGrenade",3],["SatchelCharge_Remote_Mag",3],["DemoCharge_Remote_Mag",3],["ClaymoreDirectionalMine_Remote_Mag",3]];
_loot_launchers = ["launch_NLAW_F","launch_RPG32_F","launch_B_Titan_F","launch_Titan_short_F"];
// Loot Configuration 1: Heavy Weapons and explosives
_box1_Pistols = 3;
_box1_Rifles = 5;
_box1_LMG = 4;
_box1_Snipers = 3;
_box1_Mags = [2,6];
_box1_Optics = 6;
_box1_Silencers = 5;
_box1_Explosives = 6;
_box1_FoodDrink = 6;
_box1_Misc = 3;
_box1_Backpacks = 3;
_box1_BuildingSupplies = 3;
_box1_Tools = 0;
_box1_launchers = 0;
// Note that the bonus items are listed in a nexted array within the _box1_cbonus array. It was more difficult to ocde otherwise and would have needed indexing to make it work.
_box1_bonus_items = [["ItemGPS",1],["Rangefinder",1],["SatchelCharge_Remote_Mag",3],["DemoCharge_Remote_Mag",3],["ClaymoreDirectionalMine_Remote_Mag",3]];
_box1_bonus = 1;
// Loot Configuration 2: Sniper Weapons and sniper scopes
_box2_Pistols = 3;
_box2_Rifles = 5;
_box2_LMG = 4;
_box2_Snipers = 3;
_box2_Mags = [2,6]; // [number of times to select a mag, min # of that mag to add, max # of that mag to add]
_box2_Optics = 6;
_box2_Silencers = 5;
_box2_Explosives = 6;
_box2_FoodDrink = 6;
_box2_Misc = 3;
_box2_Backpacks = 3;
_box2_BuildingSupplies = 3;
_box2_Tools = 0;
_box2_Misc = 0;
_box2_launchers = 0;
_box2_bonus_items = [["ItemGPS",2],["Rangefinder",2],["SatchelCharge_Remote_Mag",1],["DemoCharge_Remote_Mag",10]];
_box2_bonus = 1;
// Loot Configuration 3: building materials and tools
_box3_Pistols = 2;
_box3_Rifles = 2;
_box3_LMG = 1;
_box3_Snipers = 1;
_box3_Mags = [4,2,6];
_box3_Optics = 1;
_box3_Silencers = 1;
_box3_Explosives = 2;
_box3_FoodDrink = 3;
_box3_Misc = 3;
_box3_Backpacks = 1;
_box3_BuildingSupplies = [8,15]; // [Number of items, min for item, max for item]
_box3_Tools = 4;
_box3_Misc = 6;
_box3_launchers = 0;
_box3_bonus_items = [["Exile_Item_Matches",2],[ "Exile_Item_CookingPot",2],["Exile_Item_CanOpener",3],["Exile_Item_Handsaw",2],["Exile_Item_Pliers",2],["Exile_Item_Grinder",1],["Exile_Item_Foolbox",1]];
_box3_bonus = 1;
////////////////////////////
// End of configurations

View File

@ -0,0 +1,169 @@
//Based on the Random Loot Crates addon by Darth_Rogue & Chisel (tdwhite)
// Re-written by Ghostrider-DBD- to add features and clean up code
// Last updated 11-12-16
// Do not touch anything below this line.
/// ********************************************************************************************************************************************************************************************************************************
_box1_loadout = [[_loot_pistols,_box1_Pistols],[_loot_rifles,_box1_Rifles],[_loot_LMG,_box1_LMG],[_loot_snipers,_box1_Snipers],[_loot_magazines,_box1_Mags],[_loot_optics,_box1_Optics],[_loot_silencers,_box1_Silencers],
[_loot_explosives,_box1_Explosives],[_loot_food,_box1_FoodDrink],[_loot_Misc,_box1_Misc],[_loot_backpacks,_box1_Backpacks],[_loot_build,_box1_BuildingSupplies],[_loot_tools,_box1_Tools],[_loot_Misc,_box1_Misc],
[_loot_launchers,_box1_launchers],[_box1_bonus_items,_box1_bonus]];
_box2_loadout = [[_loot_pistols,_box2_Pistols],[_loot_rifles,_box2_Rifles],[_loot_LMG,_box2_LMG],[_loot_snipers,_box2_Snipers],[_loot_magazines,_box2_Mags],[_loot_optics,_box2_Optics],[_loot_silencers,_box2_Silencers],
[_loot_explosives,_box2_Explosives],[_loot_food,_box2_FoodDrink],[_loot_Misc,_box2_Misc],[_loot_backpacks,_box2_Backpacks],[_loot_build,_box2_BuildingSupplies],[_loot_tools,_box2_Tools],[_loot_Misc,_box2_Misc],
[_loot_launchers,_box2_launchers],[_box2_bonus_items,_box2_bonus]];
_box3_loadout = [[_loot_pistols,_box3_Pistols],[_loot_rifles,_box3_Rifles],[_loot_LMG,_box3_LMG],[_loot_snipers,_box3_Snipers],[_loot_magazines,_box3_Mags],[_loot_optics,_box3_Optics],[_loot_silencers,_box3_Silencers],
[_loot_explosives,_box3_Explosives],[_loot_food,_box3_FoodDrink],[_loot_Misc,_box3_Misc],[_loot_backpacks,_box3_Backpacks],[_loot_build,_box3_BuildingSupplies],[_loot_tools,_box3_Tools],[_loot_Misc,_box3_Misc],
[_loot_launchers,_box3_launchers],[_box3_bonus_items,_box3_bonus]];
// allows a visible cue to be spawned near the crate
_fn_smokeAtCrate = { // adapted from Ritchies heli crash addon
params["_pos"];
private["_wreckChoices"];
_wreckChoices = ["Land_Wreck_Car2_F","Land_Wreck_Car3_F","Land_Wreck_Car_F","Land_Wreck_Offroad2_F","Land_Wreck_Offroad_F","Land_Tyres_F","Land_Pallets_F","Land_MetalBarrel_F"];
// params["_pos","_mode",["_maxDist",12],["_wreckChoices",_wrecks],["_addFire",false]];
[_pos,"random",8,_wreckChoices,false] call blck_fnc_smokeAtCrates;
};
// fill the crate with something
_fn_spawnCrate = {
private["_crate","_minDistfromCenter","_maxDistfromCenter","_clossestObj","_spawnOnWater","_spawnAtShore","_pos","_px","_py","_pz"];
params["_cratePos",["_randomLocation",true]];
// Spawn an Empty a Crate
// find a safe location for the crate
_minDistfromCenter = 0;
_maxDistfromCenter = 25;
_clossestObj = 10;
_spawnOnWater = 0; // water mode 0: cannot be in water , 1: can either be in water or not , 2: must be in water
_spawnAtShore = 0; // 0: does not have to be at a shore , 1: must be at a shore
if (_randomLocation) then{
_pos = [_cratePos,_minDistfromCenter,_maxDistfromCenter,_clossestObj,_spawnOnWater,20,_spawnAtShore] call BIS_fnc_findSafePos; // find a random loc
if (count _pos < 3) then {_pos pushback 0;};
}
else
{
_pos = _cratePos;
//diag_log format["crate spawner using exact position %1",_pos];
};
if (blck_debugON) then
{
diag_log format["[blckeagls[ SLS :: _fn_spawnCrate %1 _randomLocation %2 crate position %3",_cratePos,_randomLocation,_pos];
};
private["_crateTypes","_selectedCrateType"];
//_crateTypes = ["I_CargoNet_01_ammo_F","O_CargoNet_01_ammo_F","B_CargoNet_01_ammo_F","I_supplyCrate_F","Box_East_AmmoVeh_F","Box_NATO_AmmoVeh_F"];
_selectedCrateType = selectRandom blck_crateTypes;
_crate = [[0,0,0],_selectedCrateType] call blck_fnc_spawnCrate;
_crate setPosATL _pos;
_crate setDir round(random(360));
_crate
};
_fn_addItemToCrate = {
params["_itemInfo","_crate"];
private["_isRifle","_isMagazine","_isBackpack"];
_isWeapon = false;
_isMagazine = false;
_isBackpack = false;
_quant = 0;
diag_log format["_fn_addItemToCrate:: -- >> itemInfor = %1",_itemInfo];
if (typeName _itemInfo isEqualTo "STRING") then {_item = _itemInfo; _quant = 1}; // case where only the item descriptor was provided
if (typeName _itemInfo isEqualTo "ARRAY") then {
if (count _itemInfo isEqualTo 2) then {_item = _itemInfo select 0; _quant = _itemInfo select 1;}; // case where item descriptor and quantity were provided
if (count _itemInfo isEqualto 3) then {
_item = _itemInfo select 0;
_quant = (_itemInfo select 1) + round(random((_itemInfo select 2) - (_itemInfo select 1)));
}; // case where item descriptor, min number and max number were provided.
};
if (((typeName _item) isEqualTo "STRING") && (_item != "")) then
{
if (isClass(configFile >> "CfgWeapons" >> _item)) then {_crate addWeaponCargoGlobal [_item,_quant]; _isWeapon = true;};
if (_item isKindOf ["Bag_Base", configFile >> "CfgVehicles"]) then {_crate addBackpackCargoGlobal [_item,_quant]; _isBackpack = true;};
if (isClass(configFile >> "CfgMagazines" >> _item)) then {_crate addMagazineCargoGlobal [_item,_quant]; _isMagazine = true;};
if (!_isWeapon && !_isMagazine && _isBackpack && isClass(configFile >> "CfgVehicles" >> _item)) then {_crate addItemCargoGlobal [_item,_quant]};
};
};
_fn_loadLoot = {
params["_loadout","_crate"];
if ((_loadout select 0) isEqualTo []) exitWith {};
{
private["_tries","_q","_item"];
_tries = 0;
diag_log format["_fn_loadLoot:: -- >> now loading for %1",_x];
_q = _x select 1; // this can be a number or array.
if ( (typeName _q) isEqualTo "ARRAY") then // Assume the array contains a min/max number to add
{
if ((count _q) isEqualTo 2) then {_tries = (_q select 0) + round(random(((_q select 1) - (_q select 0))));} else {_tries = 0;};
};
if ((typeName _q) isEqualTo "SCALAR") then
{
_tries = _q;
};
for "_i" from 1 to _tries do
{
_item = selectRandom (_x select 0);
[_item,_crate] call _fn_addItemToCrate;
};
}forEach _loadout;
};
_fn_setupCrates = {
params["_location","_lootType","_randomPos","_useSmoke"];
private["_crate"];
_crate = [_location,_randomPos] call _fn_SpawnCrate;
if (_lootType isEqualTo 0) then {_lootType = round(random(3));};
switch(_lootType) do
{
case 1:{[_box1_loadout,_crate] call _fn_loadLoot;};
case 2:{[_box2_loadout, _crate] call _fn_loadLoot;};
case 3:{[_box3_loadout, _crate] call _fn_loadLoot;};
};
if (_useSmoke) then {[getPos _crate] call _fn_smokeAtCrate;};
if (blck_debugON) then
{
_blck_localMissionMarker = [format["SLS%1%2",_location select 0, _location select 1],(getPos _crate),"","","ColorGreen",["mil_box",[]]];
diag_log format["[blckeagls] SLS:: spawning diagnostic marker at %1",getPos _crate];
// params["_missionType","_markerPos","_markerLabel","_markerLabelType","_markerColor","_markerType"];
[_blck_localMissionMarker] execVM "debug\spawnMarker.sqf";
};
_crate
};
private["_cratePosnList","_no","_ar","_x","_cratePos","_lootType","_randomPos","_useSmoke"];
{
_map = _x select 0;
_name = _x select 1;
_no = _x select 2;
_ar = _x select 3;
private["_index"];
_index = 1;
if (blck_debugON) then
{
//diag_log format["[blckeagls] SLS :: main function: Location name = %3 |count _ar = %1 | _index = %2", count _ar, _index, _name];
//diag_log format["[blckeagls] SLS :: main function: count _ar = %1", _ar];
};
if (_map isEqualto (toLower(worldName))) then
{
_usedLocations = [];
for "_i" from 1 to _no do
{
// Pick a random element and be sure it has not already been selected_crateParams
_crateParams = selectRandom _ar;
while {_crateParams in _usedLocations} do {_crateParams = selectRandom _ar;}; // selectRandom is about 5X faster than BIS_fnc_selectRandom in my testing.
if (blck_debugON) then
{
diag_log format["[blckeagls] SLS:: spawning crate spawning crate at location name %1 with parameters of %2 --->>> %1",_name,_crateParams];
};
_usedLocations pushback _crateParams;
_crateParams params["_cratePos","_lootType","_randomPos","_useSmoke"]; // params is about 5x faster in my testing over _this select 0 where many local variables are defined by parsing _this.
[_cratePos,_lootType,_randomPos,_useSmoke] call _fn_setupCrates;
};
};
} forEach _lootBoxes;
blck_SLSComplete = true;
diag_log "[blckeagls] SLS System: Static crates loaded successfully for Epoch!";

View File

@ -0,0 +1,19 @@
/*
Static loot crate spawner
by Ghostrider-DbD-
For Arma 3 Exile and Epoch
Last Updated 11/12/16
Written to be independent of blckeagles functions for now.
However, as written it relies on variables defined in in the configurations files for Epoch / Exile for blckeagls.
It could easily be addapted to other purposes.
*/
if not (isNull( configFile >> "CfgPatches" >> "a3_epoch_server" )) then
{
[] execVM "\q\addons\custom_server\SLS\SLS_init_epoch.sqf";
};
if not (isNull ( configFile >> "CfgPatches" >> "exile_server" ) ) then
{
[] execVM "q\addons\custom_server\SLS\SLS_init_exile.sqf";
};

View File

@ -0,0 +1,4 @@
// Assemble the final executable with Epoch crate configurations and SLS code
#include "\q\addons\custom_server\SLS\SLS_defines_epoch.sqf";
#include "\q\addons\custom_server\SLS\SLS_functions.sqf";

View File

@ -0,0 +1,4 @@
// Assemble the final executable with Epoch crate configurations and SLS code
#include "\q\addons\custom_server\SLS\SLS_defines_exlie.sqf";
#include "\q\addons\custom_server\SLS\SLS_functions.sqf";

View File

@ -6,11 +6,15 @@ To cynwncler for many helpful comments along the way
And mostly importantly,
To Vampire, KiloSwiss, blckeagls, theFUCHS, lazylink, Mark311 and Buttface (Face) who wrote the pionering mission and roaming AI systems upon which this one is based and who's code is used with modification in some parts of this addon.
*/
if !(isNil "blck_Initialized") exitWith{};
private["_blck_loadingStartTime"];
_blck_loadingStartTime = diag_tickTime;
#include "\q\addons\custom_server\init\build.sqf";
diag_log format["[blckeagls] Loading version %1 Build %2",_blck_versionDate,_blck_version];
// spawn map addons to give the server time to position them before spawning in crates etc.
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\MapAddons\MapAddons_init.sqf";
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\Compiles\blck_variables.sqf";
waitUntil {(isNil "blck_variablesLoaded") isEqualTo false;};
waitUntil{blck_variablesLoaded};
@ -27,9 +31,6 @@ diag_log format["[blckeagls] debug mode settings:blck_debugON = %1",blck_debugON
private["_modType"];
_modType = [] call blck_getModType;
// spawn map addons to give the server time to position them before spawning in crates etc.
call compileFinal preprocessFileLineNumbers "\q\addons\custom_server\MapAddons\MapAddons_init.sqf";
if (_modType isEqualTo "Epoch") then
{
diag_log format["[blckeagls] Loading Mission System using Parameters for %1",_modType];