Added VEMFr

This commit is contained in:
Zepheris 2020-02-18 09:04:47 -07:00
parent 0ae90d7530
commit d6967bd40e
48 changed files with 3246 additions and 0 deletions

View File

@ -0,0 +1,72 @@
/*
Author: IT07
Description:
a simple addon for VEMFr that makes a unit patrol from one position to the next
Params:
none
Returns:
nothing
*/
( [ [ "addonSettings", "SimplePatrol" ], [ "aiMode", "from", "to", "interval", "enableAttack", "freeze", "combatMode", "behaviour", "speed" ] ] call VEMFr_fnc_config ) params [ "_ms0", "_ms1", "_ms2", "_ms3", "_ms4", "_ms5", "_ms6", "_ms7", "_ms8" ];
if ( _ms0 isEqualTo "random" ) then
{
private "_arr";
_arr = [ 0, 1, 2 ];
if ( ( "Apex" call VEMFr_fnc_modAppID ) in ( getDLCs 1 ) ) then { _arr append [ 3, 4 ] };
_ms0 = selectRandom _arr;
};
if ( _ms0 isEqualTo "manual" ) then { _ms0 = -1 };
if ( _ms7 isEqualTo "random" ) then { _ms7 = selectRandom [ "CARELESS", "SAFE", "AWARE", "DANGER", "STEALTH" ] };
{
_grp = ( [ _x, 1, 1, _ms0, "SimplePatrol" ] call VEMFr_fnc_spawnVEMFrAI ) select 0;
if ( _ms5 isEqualTo "yes" ) then
{
{
_x disableAI "MOVE";
} forEach ( units _grp );
};
_grp allowFleeing 0;
_grp setBehaviour _ms7;
_grp setCombatMode _ms6;
_b = call {
private "_r";
if ( _ms4 isEqualTo "false" ) then { _r = false };
if ( _ms4 isEqualTo "true" ) then { _r = true };
if not ( isNil "_r" ) then { _r };
};
_grp enableAttack _b;
if ( _ms5 isEqualTo "no" ) then
{
_wp0 = _grp addWaypoint [ _ms2 select _forEachIndex, 2, 1 ];
_wp0 setWaypointBehaviour _ms7;
_wp0 setWaypointCombatMode _ms6;
_wp0 setWaypointSpeed _ms8;
_wp0 setWaypointTimeOut [ _ms3, _ms3, _ms3 ];
_wp0 setWaypointType "MOVE";
_wp1 = _grp addWaypoint [ _x, 2, 2 ];
_wp1 setWaypointBehaviour _ms7;
_wp1 setWaypointCombatMode _ms6;
_wp1 setWaypointSpeed _ms8;
_wp1 setWaypointTimeOut [ _ms3, _ms3, _ms3 ];
_wp1 setWaypointType "MOVE";
_wp2 = _grp addWaypoint [ _ms2 select _forEachIndex, 2, 3 ];
_wp2 setWaypointBehaviour _ms7;
_wp2 setWaypointCombatMode _ms6;
_wp2 setWaypointSpeed _ms8;
_wp2 setWaypointTimeOut [ _ms3, _ms3, _ms3 ];
_wp2 setWaypointType "CYCLE";
};
[ _grp ] ExecVM ( "signAI" call VEMFr_fnc_scriptPath );
} forEach _ms1;

View File

@ -0,0 +1,520 @@
/*
Author: IT07
Description:
cpp config file for a3_vemf_reloaded
What is a3_vemf_reloaded? (short: VEMFr)
It is a complete rebuild/remake of VEMF (for Epoch) made by TheVampire.
a3_vemf_reloaded was originally called VEMF but because the original creator (TheVampire) wanted to continue his work on VEMF,
this remade version of VEMF had its name changed into a3_vemf_reloaded.
*/
class CfgVemfReloaded
{
/////// Debugging/learning/logging ///////
debugMode = 3; // 0 = no debugging | 1 = ERRORS only | 2 = INFO only | 3 = ERRORS & INFO
overridesToRPT = yes; // enable/disable logging of override settings to .RPT
///////////////////////////////////////
// Global settings
addons[] = { "SimplePatrol" };
allowTWS = no; // enable/disable the usage of TWS scopes by AI (WARNING: only tested on vanilla equipment)
headlessClientSupport = no;
headlessClientNames[] = { "HC1" };
logCowardKills = yes; // enable/disable logging of who killed AI whilst it was parachuting down
maxGlobalMissions = 10; // enable/disable global mission amount limit
maxNew = 2; // enable/disable MAXIMUM time (in minutes) before new mission can run
minNew = 1; // enable/disable MINIMUM time (in minutes) before new mission can run
minPlayers = 1; // enable/disable minimal required player count for (new) missions to (start) spawn(ing) | NOTE: do NOT set this to 0 or lower than 0
minServerFPS = 20; // enable/disable minimum server FPS for VEMF to keep spawning missions
missionDistance = 2000; // enable/disable minimum distance between missions
missionList[] = { "DynamicLocationInvasion", "BaseAttack" }; // Each entry should represent an .sqf file in the missions folder
noMissionPos[] = { { { 2998.62, 18175.4, 0.00143886 }, 500 }, { { 14601.3, 16799.3, 0.00143814 }, 800 }, { { 23334.8, 24189.5, 0.00132132 }, 600 } }; // Format: {{position},radius} | Default: Exile Altis safezones
nonPopulated = yes; // enable/disable allowance of missions at locations WITHOUT (enterable) buildings
punishRoadKills = no; // enable/disable respect deduction if player roadkills AI
removeAllAssignedItems = no; // enable/disable removal of Map, Compass, Watch and Radio from all AI
sayKilled = yes; // enable/disable AI kill messages
sayKilledName = no; // enable/disable the usage of AI's names instead of just "AI"
timeOutTime = 25; // enable/disable mission timeOutTime (in minutes)
validateLoot = yes; // enable/disable validation of all defined loot classnames. Checks if classnames exist in server's game configFile
class addonSettings
{
class SimplePatrol
{
aiMode = random; // options: random | 0 (Guerilla) | 1 (Regular Police) | 2 (Police SF (Special Forces)) | 3 (Gendarmerie (needs Apex DLC)) | 4 (Apex Bandits (needs Apex DLC)) | manual (uses AIequipment class)
behaviour = "CARELESS"; // optional: random | https://community.bistudio.com/wiki/Arma_3_AI_Behavior
enableAttack = false; // https://community.bistudio.com/wiki/enableAttack
enabled = no; // enable/disable this addon
combatMode = "BLUE"; // https://community.bistudio.com/wiki/Arma_3_AI_Behavior#Combat_modes_.28ROE.29
freeze = no;
from[] = { { position }, { position } };
// NOTE: the first in "from" is connected to the first in "to" and so on...
removeAllAssignedItems = no; // https://community.bistudio.com/wiki/removeAllAssignedItems
speed = "LIMITED";
to[] = { { position }, { position } };
interval = 10;
class AIequipment
{
backpacks[] = { };
faceWear[] = { };
headGear[] = { };
pistols[] = { };
rifles[] = { };
uniforms[] = { };
vests[] = { };
};
};
};
class blacklists
{
class buildings
{
classes[] = { "Land_Pier_F", "Land_Shed_02_F" };
};
class locations
{
// NOTE 1: If the map you use is not listed below, simply add it by yourself or put the locations you want to blacklist into the locations array of the Other class
// NOTE 2: If not sure about capital letters, just type all names in lowercase
class Altis { names[] = { "almyra", "atsalis", "cap makrinos", "chelonisi", "fournos", "kavala", "makrynisi", "monisi", "polemista", "pyrgos", "pyrgi", "sagonisi", "savri", "selakano", "sofia", "surf club", "syrta", "zaros" }; };
class Stratis { names[] = { "jay cove", "kamino bay", "keiros bay", "kyfi bay", "limeri bay", "marina bay", "nisi bay", "strogos bay", "tsoukala bay" }; };
class Namalsk { names[] = { "brensk bay", "lubjansk bay", "nemsk bay", "seraja bay", "sebjan mine", "tara strait" }; };
class Other { names[] = { }; };
class Tanoa { names[] = { "koumac", "ferry", "Regina", "nicolet", "petit nicolet", "galili", "la foa", "lakatoro", "kotomo", "comms bravo", "pénélo", "la rochelle aerodrome", "red spring surface mine", "ovau", "nandai" }; };
};
class loot
{
classes[] = {
"DemoCharge_Remote_Mag", "SatchelCharge_Remote_Mag", "ATMine_Range_Mag", "ClaymoreDirectionalMine_Remote_Mag",
"APERSMine_Range_Mag", "APERSBoundingMine_Range_Mag", "SLAMDirectionalMine_Wire_Mag", "APERSTripMine_Wire_Mag",
"ChainSaw", "srifle_DMR_03_spotter_F"
};
};
class scopes
{
thermal[] = { "optic_tws_mg", "optic_tws", "optic_Nightstalker" }; // WARNING: all classnames are case sensitive
};
};
class Exile // Exile specific settings
{
aiMode = 1; // 0 = Guerilla | 1 = Regular Police | 2 = Police SF (Special Forces) | 3 = Gendarmerie (needs Apex DLC) | 4 = Apex Bandits (needs Apex DLC)
aiMoney = 10; // (max) amount of money that AI will have on them
crateMoney = 200; // (max) amount of money in the loot crate
respectReward = 5; // 0 = no respect for killing AI | respectReward > 0 = amount of minimum respect reward for player
respectRoadKillDeduct = 20; // 0 = no deduction for roadkilling AI | respectRoadKillDeduct > 0 = amount of respect to take from player;
// AI Unit settings
unitClass = "O_G_Sharpshooter_F"; // Default: "O_G_Sharpshooter_F" | optional: "B_G_Soldier_AR_F"
// NOTE: VEMFr will automatically adjust to the AI's side that belongs to the unit of given unitClass
};
class Epoch // Epoch specific settings
{
aiMode = 0; // 0 = Guerilla | 1 = Regular Police | 2 = Police SF (Special Forces) | 3 = Gendarmerie (needs Apex DLC) | 4 = Apex Bandits (needs Apex DLC)
cryptoReward = 5; // Minimal crypto gain for killing AI. VEMFr dynamically adds more depending on shooting skills
cryptoRoadKillPunish = 0; // 0 = no punishment for road-killing AI | energyRoadKillPunish > 0 = amount of energy to take from player
unitClass = "I_G_Soldier_lite_F"; // Default: "I_G_Soldier_lite_F"
// NOTE: VEMFr will automatically adjust to the AI's side that belongs to the unit of given unitClass
};
class missionSettings
{
class BaseAttack // BaseAttack (mission) settings
{
aiSetup[] = { 2, 5 }; // format: {amountOfGroups,unitsInEachGroup};
allowLaunchers = yes; // Allow/disallow AI to have rocket launchers
hasLauncherChance = 25; // In percentage. How big the chance that each AI gets a launcher
killPercentage = 100; // How much of total AI has to be killed for mission completion (in percentage)
maxAttacks = 5; // Maximum amount of active attacks at the same time | can not be turned off
minimumLevel = 2; // Minimum required level of base before it can get attacked
minimumWait = 15; // Minimum time (in minutes) to wait whilst player is present in base
randomModes = no; // enable/disable the randomization of the AI mode for this mission-type
/*
NOTES:
1) every territory flag can only be attacked once every restart
2) only players within a certain range of the attacked territory can see the mission announcement
3) as a "punishment" for killing AI, players do NOT get any respect increase/decrease for killing AI
*/
};
class DynamicLocationInvasion // DynamicLocationInvasion (mission) settings
{
allowCrateLift = 0; // Allow/disallow the loot crate to be lifted with helicopter
allowLaunchers = yes; // Allow/disallow AI to have rocket launchers
allowRepeat = no; // Allow/disallow re-invading of a previously invaded city/town/location
announce = yes; // enable/disable mission notificatons
cal50s = 3; // Max amount of .50 caliber machineguns at mission | Needs to be lower than total unit count per mission
cal50sDelete = yes; // enable/disable the removal of .50cal | optional: destroy
class crateSettings
{
allowThermalHelmets = no; // Allow/disallow special (Apex) thermal-vision helmets in loot crate
rifleSlotsMax = 7; // Maximum primary weapons in each loot crate
rifleSlotsMin = 2; // Minimum primary weapons in each loot crate
pistolSlotsMax = 3; // Maximum number of secondary weapons to be in each loot crate
pistolSlotsMin = 1; // Minimum number of secondary weapons to be in each loot crate
magSlotsMax = 8; // Maximum number of magazine slots in each loot crate
magSlotsMin = 6; // Minimum number of magazine slots in each loot crate
attSlotsMax = 4; // Maximum number of attachment slots in each loot crate
attSlotsMin = 2; // Minimum number of attachment slots in each loot crate
itemSlotsMax = 4; // Maximum number of attachment slots in each loot crate
itemSlotsMin = 2; // Minimum number of attachment slots in each loot crate
vestSlotsMax = 3; // Maximum number of vest slots in each loot crate
vestSlotsMin = 1; // Minimum number of vest slots in each loot crate
headGearSlotsMax = 3; // Maximum number of headGear slots in each loot crate
headGearSlotsMin = 1; // Minimum number of headGear slots in each loot crate
bagSlotsMax = 2;
bagSlotsMin = 1;
};
class crateLootVanilla // Loot crate configuration (vanilla items)
{
// format: {classname,amount}
// WARNING: DO NOT USE NUMBERS WITH DECIMALS!
attachments[] = {
{ "ItemGPS", 2 }, { "ItemRadio", 1 }, { "ItemMap", 2 }, { "MineDetector", 1 }, { "Binocular", 2 }, { "Rangefinder", 1 }, { "muzzle_snds_H", 1 },
{ "muzzle_snds_L", 1 }, { "muzzle_snds_M", 1 }, { "muzzle_snds_B", 1 }, { "muzzle_snds_H_MG", 1 }, { "muzzle_snds_H_SW", 1 },
{ "optic_Arco", 1 }, { "optic_Aco", 1 }, { "optic_ACO_grn", 1 }, { "optic_Aco_smg", 1 }, { "optic_ACO_grn_smg", 1 }, { "optic_Holosight", 1 },
{ "optic_Holosight_smg", 1 }, { "optic_SOS", 1 }, { "acc_flashlight", 1 }, { "acc_pointer_IR", 1 }, { "optic_MRCO", 1 }, { "muzzle_snds_acp", 1 },
{ "optic_NVS", 1 }, { "optic_DMS", 1 }, { "optic_Yorris", 1 }, { "optic_MRD", 1 }, { "optic_LRPS", 1 }, { "muzzle_snds_338_black", 1 }, { "muzzle_snds_338_green", 1 },
{ "muzzle_snds_338_sand", 1 }, { "muzzle_snds_93mmg", 1 }, { "muzzle_snds_93mmg_tan", 1 }, { "optic_AMS", 1 }, { "optic_AMS_khk", 1 }, { "bipod_03_F_oli", 1 },
{ "optic_AMS_snd", 1 }, { "optic_KHS_blk", 1 }, { "optic_KHS_hex", 1 }, { "optic_KHS_old", 1 }, { "optic_KHS_tan", 1 }, { "bipod_01_F_snd", 1 },
{ "bipod_01_F_blk", 1 }, { "bipod_01_F_mtp", 1 }, { "bipod_02_F_blk", 1 }, { "bipod_02_F_tan", 1 }, { "bipod_02_F_hex", 1 }, { "bipod_03_F_blk", 1 }
};
backpacks[] = {
{ "B_AssaultPack_khk", 1 }, { "B_AssaultPack_dgtl", 1 }, { "B_AssaultPack_rgr", 1 }, { "B_AssaultPack_sgg", 1 }, { "B_AssaultPack_cbr", 1 },
{ "B_AssaultPack_mcamo", 1 }, { "B_TacticalPack_rgr", 1 }, { "B_TacticalPack_mcamo", 1 }, { "B_TacticalPack_ocamo", 1 }, { "B_TacticalPack_blk", 1 },
{ "B_TacticalPack_oli", 1 }, { "B_FieldPack_khk", 1 }, { "B_FieldPack_ocamo", 1 }, { "B_FieldPack_oucamo", 1 }, { "B_FieldPack_cbr", 1 },
{ "B_FieldPack_blk", 1 }, { "B_Carryall_ocamo", 1 }, { "B_Carryall_oucamo", 1 }, { "B_Carryall_mcamo", 1 }, { "B_Carryall_khk", 1 }, { "B_Carryall_cbr", 1 },
{ "B_Parachute", 1 }, { "B_FieldPack_oli", 1 }, { "B_Carryall_oli", 1 }, { "B_Kitbag_Base", 1 }, { "B_Kitbag_cbr", 1 }, { "B_Kitbag_mcamo", 1 },
{ "B_Kitbag_rgr", 1 }, { "B_Kitbag_sgg", 1 }, { "B_OutdoorPack_Base", 1 }, { "B_OutdoorPack_blk", 1 }, { "B_OutdoorPack_tan", 1 }
};
headGear[] = {
{ "H_HelmetB", 1 }, { "H_HelmetB_camo", 1 }, { "H_HelmetB_paint", 1 }, { "H_HelmetB_light", 1 }, { "H_Booniehat_khk", 1 }, { "H_Booniehat_oli", 1 }, { "H_Booniehat_indp", 1 },
{ "H_Booniehat_mcamo", 1 }, { "H_Booniehat_grn", 1 }, { "H_Booniehat_tan", 1 }, { "H_Booniehat_dirty", 1 }, { "H_Booniehat_dgtl", 1 }, { "H_Booniehat_khk_hs", 1 }, { "H_HelmetB_plain_mcamo", 1 },
{ "H_HelmetB_plain_blk", 1 }, { "H_HelmetSpecB", 1 }, { "H_HelmetSpecB_paint1", 1 }, { "H_HelmetSpecB_paint2", 1 }, { "H_HelmetSpecB_blk", 1 }, { "H_HelmetIA", 1 }, { "H_HelmetIA_net", 1 },
{ "H_HelmetIA_camo", 1 }, { "H_Helmet_Kerry", 1 }, { "H_HelmetB_grass", 1 }, { "H_HelmetB_snakeskin", 1 }, { "H_HelmetB_desert", 1 }, { "H_HelmetB_black", 1 }, { "H_HelmetB_sand", 1 },
{ "H_Cap_red", 1 }, { "H_Cap_blu", 1 }, { "H_Cap_oli", 1 }, { "H_Cap_headphones", 1 }, { "H_Cap_tan", 1 }, { "H_Cap_blk", 1 }, { "H_Cap_blk_CMMG", 1 }, { "H_Cap_brn_SPECOPS", 1 }, { "H_Cap_tan_specops_US", 1 },
{ "H_Cap_khaki_specops_UK", 1 }, { "H_Cap_grn", 1 }, { "H_Cap_grn_BI", 1 }, { "H_Cap_blk_Raven", 1 }, { "H_Cap_blk_ION", 1 }, { "H_Cap_oli_hs", 1 }, { "H_Cap_press", 1 }, { "H_Cap_usblack", 1 }, { "H_Cap_police", 1 },
{ "H_HelmetCrew_B", 1 }, { "H_HelmetCrew_O", 1 }, { "H_HelmetCrew_I", 1 }, { "H_PilotHelmetFighter_B", 1 }, { "H_PilotHelmetFighter_O", 1 }, { "H_PilotHelmetFighter_I", 1 },
{ "H_PilotHelmetHeli_B", 1 }, { "H_PilotHelmetHeli_O", 1 }, { "H_PilotHelmetHeli_I", 1 }, { "H_CrewHelmetHeli_B", 1 }, { "H_CrewHelmetHeli_O", 1 }, { "H_CrewHelmetHeli_I", 1 }, { "H_HelmetO_ocamo", 1 },
{ "H_HelmetLeaderO_ocamo", 1 }, { "H_MilCap_ocamo", 1 }, { "H_MilCap_mcamo", 1 }, { "H_MilCap_oucamo", 1 }, { "H_MilCap_rucamo", 1 }, { "H_MilCap_gry", 1 }, { "H_MilCap_dgtl", 1 },
{ "H_MilCap_blue", 1 }, { "H_HelmetB_light_grass", 1 }, { "H_HelmetB_light_snakeskin", 1 }, { "H_HelmetB_light_desert", 1 }, { "H_HelmetB_light_black", 1 }, { "H_HelmetB_light_sand", 1 }, { "H_BandMask_blk", 1 },
{ "H_BandMask_khk", 1 }, { "H_BandMask_reaper", 1 }, { "H_BandMask_demon", 1 }, { "H_HelmetO_oucamo", 1 }, { "H_HelmetLeaderO_oucamo", 1 }, { "H_HelmetSpecO_ocamo", 1 }, { "H_HelmetSpecO_blk", 1 },
{ "H_Bandanna_surfer", 1 }, { "H_Bandanna_khk", 1 }, { "H_Bandanna_khk_hs", 1 }, { "H_Bandanna_cbr", 1 }, { "H_Bandanna_sgg", 1 }, { "H_Bandanna_sand", 1 }, { "H_Bandanna_surfer_blk", 1 }, { "H_Bandanna_surfer_grn", 1 },
{ "H_Bandanna_gry", 1 }, { "H_Bandanna_blu", 1 }, { "H_Bandanna_camo", 1 }, { "H_Bandanna_mcamo", 1 }, { "H_Shemag_khk", 1 }, { "H_Shemag_tan", 1 }, { "H_Shemag_olive", 1 }, { "H_Shemag_olive_hs", 1 },
{ "H_ShemagOpen_khk", 1 }, { "H_ShemagOpen_tan", 1 }, { "H_Beret_blk", 1 }, { "H_Beret_blk_POLICE", 1 }, { "H_Beret_red", 1 }, { "H_Beret_grn", 1 }, { "H_Beret_grn_SF", 1 }, { "H_Beret_brn_SF", 1 },
{ "H_Beret_ocamo", 1 }, { "H_Beret_02", 1 }, { "H_Beret_Colonel", 1 }, { "H_Watchcap_blk", 1 }, { "H_Watchcap_cbr", 1 }, { "H_Watchcap_khk", 1 }, { "H_Watchcap_camo", 1 }, { "H_Watchcap_sgg", 1 },
{ "H_TurbanO_blk", 1 }, { "H_Cap_marshal", 1 }
};
itemsExile[] = {
{ "Exile_item_Bandage", 5 }, { "Exile_item_BaseCameraKit", 1 }, { "Exile_Item_BBQSandwich", 4 }, { "Exile_Item_BBQSandwich_Cooked", 3 }, { "Exile_Item_BeefParts", 3 }, { "Exile_Item_Beer", 5 }, { "Exile_Item_BushKit_Green", 1 },
{ "Exile_Item_CamoTentKit", 1 }, { "Exile_Item_CampFireKit", 1 }, { "Exile_Item_CanOpener", 2 }, { "Exile_Item_CarWheel", 2 }, { "Exile_Item_CatFood", 3 }, { "Exile_Item_CatFood_Cooked", 3 }, { "Exile_Item_Cement", 2 }, { "Exile_Item_Cheathas", 5 },
{ "Exile_Item_ChocolateMilk", 4 }, { "Exile_Item_ChristmasTinner", 4 }, { "Exile_Item_ChristmasTinner_Cooked", 2 }, { "Exile_Item_CockONut", 4 }, { "Exile_Item_Codelock", 1 }, { "Exile_Item_ConcreteDoorKit", 1 }, { "Exile_Item_ConcreteDoorwayKit", 1 },
{ "Exile_Item_ConcreteFloorKit", 1 }, { "Exile_Item_ConcreteFloorPortKit", 1 }, { "Exile_Item_ConcreteGateKit", 1 }, { "Exile_Item_ConcreteStairsKit", 1 }, { "Exile_Item_ConcreteSupportKit", 1 }, { "Exile_Item_ConcreteWallKit", 1 },
{ "Exile_Item_ConcreteWindowKit", 1 }, { "Exile_Item_CookingPot", 2 }, { "Exile_Item_CordlessScrewdriver", 1 }, { "Exile_Item_Defibrillator", 1 }, { "Exile_Item_DogFood", 3 }, { "Exile_Item_DogFood_Cooked", 2 }, { "Exile_Item_DsNuts", 3 },
{ "Exile_Item_DuctTape", 4 }, { "Exile_Item_EMRE", 3 }, { "Exile_Item_EnergyDrink", 4 }, { "Exile_Item_ExtensionCord", 1 }, { "Exile_Item_FireExtinguisher", 1 }, { "Exile_Item_Flag", 1 }, { "Exile_Item_FlagStolen1", 1 }, { "Exile_Item_FlagStolen2", 1 },
{ "Exile_Item_FlagStolen3", 1 }, { "Exile_Item_FlagStolen4", 1 }, { "Exile_Item_FloodLightKit", 1 }, { "Exile_Item_Foolbox", 1 }, { "Exile_Item_FortificationUpgrade", 2 }, { "Exile_Item_FuelBarrelEmpty", 2 }, { "Exile_Item_FuelBarrelFull", 1 },
{ "Exile_Item_FuelCanisterEmpty", 2 }, { "Exile_Item_FuelCanisterFull", 1 }, { "Exile_Item_GloriousKnakworst", 5 }, { "Exile_Item_GloriousKnakworst_Cooked", 3 }, { "Exile_Item_Grinder", 1 }, { "Exile_Item_Hammer", 2 }, { "Exile_Item_Handsaw", 2 },
{ "Exile_Item_HBarrier5Kit", 1 }, { "Exile_Item_Heatpack", 4 }, { "Exile_Item_InstaDoc", 4 }, { "Exile_Item_InstantCoffee", 4 }, { "Exile_Item_Knife", 2 }, { "Exile_Item_Laptop", 1 }, { "Exile_Item_Leaves", 3 }, { "Exile_Item_LightBulb", 2 },
{ "Exile_Item_MacasCheese", 4 }, { "Exile_Item_MacasCheese_Cooked", 3 }, { "Exile_Item_Magazine01", 4 }, { "Exile_Item_Magazine02", 5 }, { "Exile_Item_Magazine03", 3 }, { "Exile_Item_Magazine04", 3 }, { "Exile_Item_Matches", 3 }, { "Exile_Item_MetalBoard", 2 },
{ "Exile_Item_MetalHedgehogKit", 2 }, { "Exile_Item_MetalPole", 2 }, { "Exile_Item_MetalScrews", 6 }, { "Exile_Item_MetalWire", 3 }, { "Exile_Item_MobilePhone", 1 }, { "Exile_Item_Moobar", 3 }, { "Exile_Item_MountainDupe", 4 }, { "Exile_Item_Noodles", 3 },
{ "Exile_Item_OilCanister", 2 }, { "Exile_Item_PlasticBottleCoffee", 3 }, { "Exile_Item_PlasticBottleEmpty", 5 }, { "Exile_Item_PlasticBottleFreshWater", 4 }, { "Exile_Item_Pliers", 2 }, { "Exile_Item_PortableGeneratorKit", 1 }, { "Exile_Item_PowerDrink", 3 },
{ "Exile_Item_Raisins", 3 }, { "Exile_Item_RazorWireKit", 1 }, { "Exile_Item_RepairKitConcrete", 2 }, { "Exile_Item_RepairKitMetal", 2 }, { "Exile_Item_RepairKitWood", 4 }, { "Exile_Item_Rope", 2 }, { "Exile_Item_RubberDuck", 2 }, { "Exile_Item_SafeKit", 1 },
{ "Exile_Item_Sand", 1 }, { "Exile_Item_SandBagsKit_Corner", 2 }, { "Exile_Item_SandBagsKit_Long", 1 }, { "Exile_Item_SausageGravy", 4 }, { "Exile_Item_SausageGravy_Cooked", 3 }, { "Exile_Item_Screwdriver", 2 }, { "Exile_Item_SeedAstics", 4 }, { "Exile_Item_Shovel", 2 },
{ "Exile_Item_SleepingMat", 2 }, { "Exile_Item_Storagecratekit", 1 }, { "Exile_Item_Surstromming", 4 }, { "Exile_Item_Surstromming_Cooked", 3 }, { "Exile_Item_ThermalScannerPro", 1 }, { "Exile_Item_ToiletPaper", 4 }, { "Exile_Item_Vishpirin", 4 },
{ "Exile_Item_WaterBarrelKit", 1 }, { "Exile_Item_WaterCanisterDirtyWater", 3 }, { "Exile_Item_WaterCanisterEmpty", 5 }, { "Exile_Item_WireFenceKit", 1 }, { "Exile_Item_WoodDoorKit", 1 }, { "Exile_Item_WoodDoorwayKit", 1 }, { "Exile_Item_WoodFloorKit", 1 },
{ "Exile_Item_WoodFloorPortKit", 1 }, { "Exile_Item_WoodGateKit", 1 }, { "Exile_Item_WoodLog", 2 }, { "Exile_Item_WoodPlank", 4 }, { "Exile_Item_WoodStairsKit", 1 }, { "Exile_Item_WoodSticks", 2 }, { "Exile_Item_WoodSupportKit", 1 }, { "Exile_Item_WoodWallHalfKit", 1 },
{ "Exile_Item_WoodWallKit", 1 }, { "Exile_Item_WoodWindowKit", 1 }, { "Exile_Item_WorkBenchKit", 2 }, { "Exile_Item_Wrench", 2 }, { "Exile_Item_ZipTie", 3 }, { "Exile_Magazine_100Rnd_762x54_PK_Green", 4 }, { "Exile_Magazine_10Rnd_303", 10 }, { "Exile_Magazine_10Rnd_762x54", 11 },
{ "Exile_Magazine_10Rnd_9x39", 9 }, { "Exile_Magazine_20Rnd_762x51_DMR", 7 }, { "Exile_Magazine_20Rnd_762x51_DMR_Green", 8 }, { "Exile_Magazine_20Rnd_762x51_DMR_Red", 8 }, { "Exile_Magazine_20Rnd_762x51_DMR_Yellow", 8 }, { "Exile_Magazine_20Rnd_9x39", 9 },
{ "Exile_Magazine_30Rnd_545x39_AK", 10 }, { "Exile_Magazine_30Rnd_545x39_AK_Green", 8 }, { "Exile_Magazine_30Rnd_545x39_AK_Red", 8 }, { "Exile_Magazine_30Rnd_545x39_AK_White", 8 }, { "Exile_Magazine_30Rnd_545x39_AK_Yellow", 7 }, { "Exile_Magazine_30Rnd_762x39_AK", 11 },
{ "Exile_Magazine_45Rnd_545x39_RPK_Green", 6 }, { "Exile_Magazine_5Rnd_22LR", 10 }, { "Exile_Magazine_6Rnd_45ACP", 13 }, { "Exile_Magazine_75Rnd_545x39_RPK_Green", 7 }, { "Exile_Magazine_7Rnd_45ACP", 9 }, { "Exile_Magazine_8Rnd_74Pellets", 13 }, { "Exile_Magazine_8Rnd_74Slug", 12 },
{ "Exile_Magazine_8Rnd_9x18", 11 }, { "Exile_Magazine_Battery", 2 }, { "Exile_Magazine_Boing", 3 }, { "Exile_Magazine_Swing", 3 }, { "Exile_Magazine_Swoosh", 2 }
};
itemsEpoch[] = {
{ "ChickenCarcass_EPOCH", 3 }, { "CinderBlocks", 1 }, { "clean_water_epoch", 4 }, { "CircuitParts", 2 }, { "ColdPack", 4 }, { "CookedChicken_EPOCH", 3 }, { "CookedDog_EPOCH", 2 },
{ "CookedGoat_EPOCH", 3 }, { "CookedRabbit_EPOCH", 3 }, { "CookedSheep_EPOCH", 3 }, { "CSGAS", 2 }, { "DogCarcass_EPOCH", 2 }, { "EnergyPack", 4 }, { "EnergyPackLg", 2 }, { "FoodBioMeat", 4 },
{ "FoodMeeps", 4 }, { "FoodSnooter", 4 }, { "FoodWalkNSons", 4 }, { "GoatCarcass_EPOCH", 2 }, { "Goldenseal", 1 }, { "hatchet_swing", 2 }, { "HeatPack", 3 }, { "honey_epoch", 3 }, { "WoodLog_EPOCH", 1 },
{ "ItemAluminumBar", 2 }, { "ItemAmethyst", 2 }, { "ItemBarrelE", 2 }, { "ItemBarrelF", 1 }, { "ItemBattery", 2 }, { "ItemBriefcaseE", 1 }, { "ItemBulb", 4 }, { "ItemBurlap", 3 }, { "ItemCables", 3 },
{ "ItemComboLock", 1 }, { "ItemCooler0", 1 }, { "ItemCooler1", 1 }, { "ItemCooler2", 1 }, { "ItemCooler3", 1 }, { "ItemCooler4", 1 }, { "ItemCoolerE", 2 }, { "ItemCopperBar", 2 }, { "ItemGoldBar", 1 },
{ "ItemHotwire", 1 }, { "ItemLockbox", 1 }, { "ItemMixOil", 1 }, { "ItemPipe", 1 }, { "ItemPlywoodPack", 1 }, { "ItemRope", 3 }, { "ItemSafe", 1 }, { "ItemSeaBass", 4 }, { "ItemSeaBassCooked", 1 },
{ "ItemSilverBar", 1 }, { "ItemSodaAlpineDude", 2 }, { "ItemSodaBurst", 4 }, { "ItemSodaMocha", 4 }, { "ItemSodaOrangeSherbet", 2 }, { "ItemSodaPurple", 3 }, { "ItemSodaRbull", 2 }, { "ItemSolar", 1 },
{ "ItemStick", 4 }, { "ItemTinBar", 2 }, { "ItemTrout", 4 }, { "ItemTroutCooked", 2 }, { "ItemTuna", 4 }, { "ItemTunaCooked", 2 }, { "jerrycan_epoch", 1 }, { "jerrycanE_epoch", 2 }, { "KitCinderWall", 1 },
{ "KitFirePlace", 1 }, { "KitFoundation", 1 }, { "KitHesco3", 1 }, { "KitMetalTrap", 1 }, { "KitPlotPole", 1 }, { "KitShelf", 1 }, { "KitSolarGen", 1 }, { "KitSpikeTrap", 1 }, { "KitStudWall", 1 }, { "KitTankTrap", 1 },
{ "KitTiPi", 1 }, { "KitWoodFloor", 1 }, { "KitWoodFoundation", 1 }, { "KitWoodLadder", 1 }, { "KitWoodRamp", 1 }, { "KitWoodStairs", 1 }, { "KitWoodTower", 1 }, { "KitWorkbench", 1 }, { "lighter_epoch", 2 },
{ "meatballs_epoch", 3 }, { "MortarBucket", 1 }, { "PaintCanBlk", 1 }, { "PaintCanBlu", 1 }, { "PaintCanBrn", 1 }, { "PaintCanClear", 1 }, { "PaintCanGrn", 1 }, { "PaintCanOra", 1 }, { "PaintCanPur", 1 },
{ "PaintCanRed", 1 }, { "PaintCanTeal", 1 }, { "PaintCanYel", 1 }, { "PartPlankPack", 1 }, { "Pelt_EPOCH", 1 }, { "RabbitCarcass_EPOCH", 2 }, { "sardines_epoch", 3 }, { "scam_epoch", 3 }, { "SheepCarcass_EPOCH", 2 },
{ "sledge_swing", 2 }, { "SnakeCarcass_EPOCH", 2 }, { "SnakeMeat_EPOCH", 2 }, { "spear_magazine", 2 }, { "stick_swing", 2 }, { "sweetcorn_epoch", 4 }, { "TacticalBacon", 3 }, { "water_epoch", 4 }, { "WhiskeyNoodle", 3 }
};
magazines[] = {
{ "30Rnd_556x45_Stanag", 12 }, { "30Rnd_556x45_Stanag_Tracer_Red", 10 }, { "30Rnd_556x45_Stanag_Tracer_Green", 12 },
{ "30Rnd_556x45_Stanag_Tracer_Yellow", 9 }, { "30Rnd_65x39_caseless_mag", 12 }, { "30Rnd_65x39_caseless_green", 11 }, { "30Rnd_65x39_caseless_mag_Tracer", 10 },
{ "30Rnd_65x39_caseless_green_mag_Tracer", 11 }, { "20Rnd_762x51_Mag", 8 }, { "7Rnd_408_Mag", 7 }, { "5Rnd_127x108_Mag", 6 }, { "100Rnd_65x39_caseless_mag", 11 },
{ "100Rnd_65x39_caseless_mag_Tracer", 4 }, { "200Rnd_65x39_cased_Box", 3 }, { "200Rnd_65x39_cased_Box_Tracer", 3 }, { "30Rnd_9x21_Mag", 13 }, { "16Rnd_9x21_Mag", 16 },
{ "30Rnd_45ACP_Mag_SMG_01", 14 }, { "30Rnd_45ACP_Mag_SMG_01_Tracer_Green", 12 }, { "9Rnd_45ACP_Mag", 14 }, { "150Rnd_762x51_Box", 7 }, { "150Rnd_762x51_Box_Tracer", 6 },
{ "150Rnd_762x54_Box", 4 }, { "150Rnd_762x54_Box_Tracer", 4 }, { "11Rnd_45ACP_Mag", 11 }, { "6Rnd_45ACP_Cylinder", 9 }, { "10Rnd_762x51_Mag", 11 }, { "10Rnd_762x54_Mag", 14 },
{ "5Rnd_127x108_APDS_Mag", 7 }, { "10Rnd_338_Mag", 6 }, { "130Rnd_338_Mag", 3 }, { "10Rnd_127x54_Mag", 9 }, { "150Rnd_93x64_Mag", 3 }, { "10Rnd_93x64_DMR_05_Mag", 5 }
};
pistols[] = {{ "hgun_ACPC2_F", 3 }, { "hgun_P07_F", 3 }, { "hgun_Pistol_heavy_01_F", 3 }, { "hgun_Pistol_heavy_02_F", 3 }, { "hgun_Rook40_F", 3 }};
rifles[] = {
{ "srifle_DMR_01_F", 1 }, { "srifle_EBR_F", 1 }, { "srifle_GM6_F", 1 }, { "LMG_Mk200_F", 1 }, { "LMG_Zafir_F", 1 }, { "arifle_Katiba_F", 1 }, { "arifle_Katiba_GL_F", 1 }, { "arifle_Mk20_F", 2 },
{ "arifle_Mk20_plain_F", 2 }, { "arifle_Mk20C_F", 2 }, { "arifle_Mk20C_plain_F", 2 }, { "arifle_Mk20_GL_F", 2 }, { "arifle_Mk20_GL_plain_F", 2 }, { "arifle_MXC_F", 1 }, { "arifle_MX_F", 1 },
{ "arifle_MX_GL_F", 1 }, { "arifle_MX_SW_F", 1 }, { "arifle_MXM_F", 1 }, { "arifle_MXC_Black_F", 1 }, { "arifle_MX_Black_F", 1 }, { "arifle_MX_GL_Black_F", 1 }, { "arifle_MX_SW_Black_F", 1 },
{ "arifle_MXM_Black_F", 1 }, { "arifle_SDAR_F", 2 }, { "arifle_TRG21_F", 2 }, { "arifle_TRG20_F", 2 }, { "arifle_TRG21_GL_F", 2 }, { "SMG_01_F", 2 }, { "SMG_02_F", 2 }, { "srifle_GM6_camo_F", 1 },
{ "srifle_LRR_camo_F", 1 }, { "srifle_DMR_02_F", 1 }, { "srifle_DMR_02_camo_F", 1 }, { "srifle_DMR_02_sniper_F", 1 }, { "srifle_DMR_03_F", 1 }, { "srifle_DMR_03_khaki_F", 1 }, { "srifle_DMR_03_tan_F", 1 },
{ "srifle_DMR_03_multicam_F", 1 }, { "srifle_DMR_03_woodland_F", 1 }, { "srifle_DMR_04_F", 1 }, { "srifle_DMR_04_Tan_F", 1 }, { "srifle_DMR_05_blk_F", 1 }, { "srifle_DMR_05_hex_F", 1 },
{ "srifle_DMR_05_tan_f", 1 }, { "srifle_DMR_06_camo_F", 1 }, { "srifle_DMR_06_olive_F", 1 }, { "MMG_01_hex_F", 1 }, { "MMG_01_tan_F", 1 }, { "MMG_02_camo_F", 1 }, { "MMG_02_black_F", 1 }, { "MMG_02_sand_F", 1 }
};
vests[] = {
{ "V_PlateCarrier1_rgr", 1 }, { "V_PlateCarrier2_rgr", 1 }, { "V_PlateCarrier3_rgr", 1 }, { "V_PlateCarrierGL_rgr", 1 }, { "V_PlateCarrier1_blk", 1 },
{ "V_PlateCarrierSpec_rgr", 1 }, { "V_Chestrig_khk", 1 }, { "V_Chestrig_rgr", 1 }, { "V_Chestrig_blk", 1 }, { "V_Chestrig_oli", 1 }, { "V_TacVest_khk", 1 },
{ "V_TacVest_brn", 1 }, { "V_TacVest_oli", 1 }, { "V_TacVest_blk", 1 }, { "V_TacVest_camo", 1 }, { "V_TacVest_blk_POLICE", 1 }, { "V_TacVestIR_blk", 1 }, { "V_TacVestCamo_khk", 1 },
{ "V_HarnessO_brn", 1 }, { "V_HarnessOGL_brn", 1 }, { "V_HarnessO_gry", 1 }, { "V_HarnessOGL_gry", 1 }, { "V_HarnessOSpec_brn", 1 }, { "V_HarnessOSpec_gry", 1 },
{ "V_PlateCarrierIA1_dgtl", 1 }, { "V_PlateCarrierIA2_dgtl", 1 }, { "V_PlateCarrierIAGL_dgtl", 1 }, { "V_RebreatherB", 1 }, { "V_RebreatherIR", 1 }, { "V_RebreatherIA", 1 },
{ "V_PlateCarrier_Kerry", 1 }, { "V_PlateCarrierL_CTRG", 1 }, { "V_PlateCarrierH_CTRG", 1 }, { "V_I_G_resistanceLeader_F", 1 }, { "V_Press_F", 1 }
};
};
class crateLootApex // Classnames of (only) Apex Expansion content | classes will be mixed with vanilla if server has Apex
{
// Format: {classname,amount}
attachments[] = {
{ "optic_Arco_blk_F", 1 }, { "optic_Arco_ghex_F", 1 }, { "optic_DMS_ghex_F", 1 }, { "optic_ERCO_blk_F", 1 }, { "optic_ERCO_khk_F", 1 }, { "optic_ERCO_snd_F", 1 }, { "optic_LRPS_ghex_F", 1 },
{ "optic_LRPS_tna_F", 1 }, { "optic_Holosight_blk_F", 1 }, { "optic_Holosight_khk_F", 1 }, { "optic_Holosight_smg_blk_F", 1 }, { "optic_SOS_khk_F", 1 }, { "optic_Hamr_khk_F", 1 },
{ "muzzle_snds_B_khk_F", 1 }, { "muzzle_snds_B_snd_F", 1 }, { "bipod_01_F_khk", 1 }, { "muzzle_snds_58_blk_F", 1 }, { "muzzle_snds_58_wdm_F", 1 }, { "muzzle_snds_H_khk_F", 1 },
{ "muzzle_snds_H_snd_F", 1 }, { "muzzle_snds_m_khk_F", 1 }, { "muzzle_snds_m_snd_F", 1 }, { "muzzle_snds_65_TI_blk_F", 1 }, { "muzzle_snds_65_TI_ghex_F", 1 }, { "muzzle_snds_65_TI_hex_F", 1 }
};
backpacks[] = {
{ "B_AssaultPack_tna_F", 1 }, { "B_Bergen_dgtl_F", 1 }, { "B_Bergen_hex_F", 1 }, { "B_Bergen_mcamo_F", 1 }, { "B_Bergen_tna_F", 1 }, { "B_Carryall_ghex_F", 1 }, { "B_FieldPack_ghex_F", 1 },
{ "B_ViperHarness_blk_F", 1 }, { "B_ViperHarness_ghex_F", 1 }, { "B_ViperHarness_hex_F", 1 }, { "B_ViperHarness_khk_F", 1 }, { "B_ViperHarness_oli_F", 1 }, { "B_ViperLightHarness_blk_F", 1 },
{ "B_ViperLightHarness_ghex_F", 1 }, { "B_ViperLightHarness_hex_F", 1 }, { "B_ViperLightHarness_khk_F", 1 }, { "B_ViperLightHarness_oli_F", 1 }
};
headGear[] = {
{ "H_HelmetSpecO_ghex_F", 1 }, { "H_Booniehat_tna_F", 1 }, { "H_HelmetB_tna_F", 1 }, { "H_HelmetCrew_O_ghex_F", 1 }, { "H_HelmetLeaderO_ghex_F", 1 }, { "H_HelmetB_Enh_tna_F", 1 }, { "H_HelmetB_Light_tna_F", 1 },
{ "H_MilCap_ghex_F", 1 }, { "H_MilCap_tna_F", 1 }, { "H_HelmetO_ghex_F", 1 }, { "H_Helmet_Skate", 1 }, { "H_HelmetB_TI_tna_F", 1 }
};
headGearSpecial[] = {
{ "H_HelmetO_ViperSP_ghex_F", 1 }, { "H_HelmetO_ViperSP_hex_F", 1 }
};
magazines[] = {
{ "10Rnd_9x21_Mag", 5 }, { "30Rnd_580x42_Mag_F", 10 }, { "30Rnd_580x42_Mag_Tracer_F", 8 }, { "100Rnd_580x42_Mag_F", 7 }, { "100Rnd_580x42_Mag_Tracer_F", 6 }, { "20Rnd_650x39_Cased_Mag_F", 8 },
{ "10Rnd_50BW_Mag_F", 6 }, { "150Rnd_556x45_Drum_Mag_F", 5 }, { "150Rnd_556x45_Drum_Mag_Tracer_F", 4 }, { "30Rnd_762x39_Mag_F", 8 }, { "30Rnd_762x39_Mag_Green_F", 9 }, { "30Rnd_762x39_Mag_Tracer_F", 9 },
{ "30Rnd_762x39_Mag_Tracer_Green_F", 8 }, { "30Rnd_545x39_Mag_F", 11 }, { "30Rnd_545x39_Mag_Green_F", 9 }, { "30Rnd_545x39_Mag_Tracer_F", 8 }, { "30Rnd_545x39_Mag_Tracer_Green_F", 9 },
{ "200Rnd_556x45_Box_F", 5 }, { "200Rnd_556x45_Box_Red_F", 4 }, { "200Rnd_556x45_Box_Tracer_F", 4 }, { "200Rnd_556x45_Box_Tracer_Red_F", 4 }, { "RPG7_F", 2 }
};
pistols[] = {{ "hgun_P07_khk_F", 2 }, { "hgun_Pistol_01_F", 2 }};
rifles[] = {
{ "arifle_AK12_F", 1 }, { "arifle_AK12_GL_F", 1 }, { "arifle_AKM_F", 2 }, { "arifle_AKS_F", 2 }, { "arifle_CTAR_blk_F", 1 }, { "arifle_CTAR_ghex_F", 1 }, { "arifle_CTAR_hex_F", 1 }, { "arifle_CTAR_GL_blk_F", 1 },
{ "arifle_CTAR_GL_ghex_F", 1 }, { "arifle_CTAR_GL_hex_F", 1 }, { "arifle_CTARS_blk_F", 1 }, { "arifle_CTARS_ghex_F", 1 }, { "arifle_CTARS_hex_F", 1 }, { "srifle_DMR_07_blk_F", 1 }, { "srifle_DMR_07_ghex_F", 1 },
{ "srifle_DMR_07_hex_F", 1 }, { "srifle_GM6_ghex_F", 1 }, { "LMG_03_F", 1 }, { "srifle_LRR_tna_F", 1 }, { "arifle_MX_GL_khk_F", 1 }, { "arifle_MX_khk_F", 1 }, { "arifle_MX_SW_khk_F", 1 }, { "arifle_MXC_khk_F", 1 },
{ "arifle_MXM_khk_F", 1 }, { "SMG_05_F", 2 }, { "arifle_SPAR_01_blk_F", 1 }, { "arifle_SPAR_01_khk_F", 1 }, { "arifle_SPAR_01_snd_F", 1 }, { "arifle_SPAR_01_GL_blk_F", 1 }, { "arifle_SPAR_01_GL_khk_F", 1 },
{ "arifle_SPAR_01_GL_snd_F", 1 }, { "arifle_SPAR_02_blk_F", 1 }, { "arifle_SPAR_02_khk_F", 1 }, { "arifle_SPAR_02_snd_F", 1 }, { "arifle_SPAR_03_blk_F", 1 }, { "arifle_SPAR_03_khk_F", 1 }, { "arifle_SPAR_03_snd_F", 1 },
{ "arifle_ARX_blk_F", 1 }, { "arifle_ARX_ghex_F", 1 }, { "arifle_ARX_hex_F", 1 }
};
vests[] = {
{ "V_PlateCarrierGL_tna_F", 1 }, { "V_PlateCarrier1_rgr_noflag_F", 1 }, { "V_PlateCarrier1_tna_F", 1 }, { "V_PlateCarrier2_rgr_noflag_F", 1 }, { "V_PlateCarrier2_tna_F", 1 }, { "V_PlateCarrierSpec_tna_F", 1 },
{ "V_HarnessOGL_ghex_F", 1 }, { "V_HarnessO_ghex_F", 1 }, { "V_BandollierB_ghex_F", 1 }, { "V_TacChestrig_cbr_F", 1 }, { "V_TacChestrig_grn_F", 1 }, { "V_TacChestrig_oli_F", 1 }
};
};
class crateParachute
{
enabled = no; // enable/disable parachute of the loot crate
altitude = 250; // loot crate spawn-altitude in meters
};
crateTypes[] = { "Box_FIA_Ammo_F", "Box_FIA_Support_F", "Box_FIA_Wps_F", "I_SupplyCrate_F", "Box_IND_AmmoVeh_F", "Box_NATO_AmmoVeh_F", "Box_East_AmmoVeh_F" };
flairTypes[] = { "Chemlight_green", "Chemlight_red", "Chemlight_yellow", "Chemlight_blue" };
groupCount[] = { 2, 4 }; // In format: {minimum, maximum}; VEMF will pick a random number between min and max. If you want the same amount always, use same numbers for minimum and maximum.
groupUnits[] = { 4, 6 }; // How much units in each group. Works the same like groupCount
hasLauncherChance = 25; // In percentage. How big the chance that each AI gets a launcher
class heliPatrol
{
enabled = yes;
classesVanilla[] = { "B_Heli_Light_01_armed_F", "B_Heli_Attack_01_F", "B_Heli_Transport_01_F", "B_Heli_Transport_01_camo_F", "O_Heli_Attack_02_F", "O_Heli_Attack_02_black_F", "O_Heli_Light_02_F", "O_Heli_Light_02_v2_F", "I_Heli_light_03_F" }; // the types of heli(s)
classesHeliDLC[] = { };
classesApex[] = { "B_CTRG_Heli_Transport_01_sand_F", "B_CTRG_Heli_Transport_01_tropic_F" };
locked = no; // enable/disable heli lock to prevent/allow players from flying it
};
killPercentage = 100; // How much of total AI has to be killed for mission completion (in percentage)
useMarker = yes; // enable/disable mission markers
markCrateOnMap = yes; // enable/disable loot crate marker on map called "Loot"
markCrateVisual = yes; // enable/disable loot crate VISUAL marker (smoke and/or chem)
/* maxDistance NOTE: make sure to keep this number very high. 15000 is for Altis */
maxDistancePrefered = 7000; // Prefered maximum mission distance from player
maxInvasions = 7; // Max amount of active uncompleted invasions allowed at the same time
class mines
{
enabled = no; // enable/disable mines at mission
cleanup = yes; // enable/disable the removal of mines once mission has been completed | optional: explode
count = 20; // how many mines
type = ATAP; // AT = anti-Tank mines | AP = anti-Personell mines | ATAP = both anti-Armor and anti-Personell mines
};
nonPopulated = ignore; // Allow/disallow this mission type being placed at locations without buildings | using -1 will ignore this setting and use the global settting
randomModes = yes; // enable/disable randomization of AI types (linked to aiMode setting)
skipDistance = 800; // No missions at locations which have players within this range (in meters)
skipDistanceReversed = 0; // If set higher than 0, missions will only spawn if player is at least given amount (in meters) away from a location whilst at the same time not be further away than twice the given number (in meters)
smokeTypes[] = { "SmokeShell", "SmokeShellBlue", "SmokeShellGreen", "SmokeShellOrange", "SmokeShellRed", "SmokeShellYellow" };
spawnCrateFirst = no; // enable/disable the spawning of loot crate before mission has been completed
streetLightsEnabled = no; // enable/disable street lights at mission location
streetLightsRestore = yes; // enable/disable restoration of street lights after mission completion
streetLightsRange = 500; // Affects streetlights within this distance from mission's center
};
};
class aiCleanUp // Contains settings for removal of items from each AI that gets eliminated
{
aiDeathRemovalEffect = no; // enable/disable the "death effect" from Virtual Arsenal. Flashes AI and deletes it after being eliminated
removeHeadGear = no; // enable/disable removal of headgear after AI has been eliminated, obviously
removeLaunchers = no; // enable/disable removal of rocket launchers from AI after they are eliminated
};
class aiInventory
{
class ApexBandits
{
backpacks[] = {
"B_AssaultPack_blk", "B_AssaultPack_cbr", "B_AssaultPack_dgtl", "B_AssaultPack_rgr", "B_AssaultPack_ocamo", "B_AssaultPack_khk", "B_AssaultPack_mcamo", "B_AssaultPack_sgg", "B_AssaultPack_tna_F",
"B_FieldPack_blk", "B_FieldPack_cbr", "B_FieldPack_ghex_F", "B_FieldPack_ocamo", "B_FieldPack_khk", "B_FieldPack_oli", "B_Kitbag_cbr", "B_Kitbag_rgr", "B_Kitbag_mcamo", "B_Kitbag_sgg", "B_TacticalPack_blk",
"B_TacticalPack_rgr", "B_TacticalPack_ocamo", "B_TacticalPack_mcamo", "B_TacticalPack_oli"
};
faceWear[] = { "G_Balaclava_blk", "G_Balaclava_oli", "G_Bandanna_aviator", "G_Bandanna_beast", "G_Bandanna_blk", "G_Bandanna_khk", "G_Bandanna_oli", "G_Bandanna_shades", "G_Bandanna_tan" };
headGear[] = { "H_Bandanna_gry", "H_Bandanna_blu", "H_Bandanna_cbr", "H_Bandanna_khk_hs", "H_Bandanna_khk", "H_Bandanna_sgg", "H_Bandanna_sand", "H_Bandanna_camo", "H_Shemag_olive", "H_Shemag_olive_hs", "H_ShemagOpen_tan", "H_ShemagOpen_khk" };
launchers[] = { "launch_RPG7_F" };
rifles[] = { "arifle_AK12_F", "arifle_AKM_F", "arifle_AKS_F", "LMG_03_F" };
uniforms[] = { "U_I_C_Soldier_Bandit_4_F", "U_I_C_Soldier_Bandit_1_F", "U_I_C_Soldier_Bandit_2_F", "U_I_C_Soldier_Bandit_5_F", "U_I_C_Soldier_Bandit_3_F" };
vests[] = {
"V_Chestrig_blk", "V_Chestrig_rgr", "V_Chestrig_khk", "V_Chestrig_oli", "V_PlateCarrierIA1_dgtl", "V_HarnessOGL_brn", "V_HarnessOGL_ghex_F", "V_HarnessOGL_gry", "V_HarnessO_brn", "V_HarnessO_ghex_F", "V_HarnessO_gry", "V_Rangemaster_belt",
"V_BandollierB_blk", "V_BandollierB_cbr", "V_BandollierB_ghex_F", "V_BandollierB_rgr", "V_BandollierB_khk", "V_BandollierB_oli", "V_TacChestrig_cbr_F", "V_TacChestrig_grn_F", "V_TacChestrig_oli_F"
};
};
class Gendarmerie
{
faceWear[] = {
"G_Aviator", "G_Bandanna_aviator", "G_Bandanna_blk", "G_Bandanna_khk", "G_Bandanna_oli", "G_Bandanna_shades", "G_Bandanna_sport", "G_Bandanna_tan", "G_Shades_Black",
"G_Shades_Blue", "G_Shades_Green", "G_Shades_Red", "G_Spectacles", "G_Sport_Red", "G_Sport_Blackyellow", "G_Sport_BlackWhite", "G_Sport_Blackred", "G_Sport_Greenblack",
"G_Squares_Tinted", "G_Balaclava_TI_blk_F", "G_Tactical_Clear", "G_Tactical_Black", "G_Spectacles_Tinted"
};
headGear[] = {
"H_Watchcap_blk", "H_Watchcap_cbr", "H_Watchcap_camo", "H_Watchcap_khk", "H_Beret_gen_F", "H_MilCap_gen_F", "H_Beret_blk", "H_Beret_02", "H_Cap_blk",
"H_Cap_blu", "H_Cap_police", "H_MilCap_blue", "H_MilCap_ghex_F", "H_MilCap_gry", "H_MilCap_ocamo", "H_MilCap_tna_F", "H_MilCap_dgtl", "H_Cap_headphones"
};
pistols[] = { "hgun_Pistol_heavy_01_F", "hgun_ACPC2_F", "hgun_P07_F", "hgun_P07_khk_F", "hgun_Pistol_01_F", "hgun_Rook40_F" };
rifles[] = {
"SMG_01_F", "SMG_02_F", "SMG_05_F", "arifle_AK12_F", "arifle_AK12_GL_F", "arifle_AKM_F", "arifle_AKS_F", "arifle_CTAR_blk_F", "arifle_CTAR_ghex_F",
"arifle_CTAR_hex_F", "arifle_CTAR_GL_blk_F", "arifle_CTAR_GL_ghex_F", "arifle_CTAR_GL_hex_F", "arifle_CTARS_blk_F", "arifle_CTARS_ghex_F", "arifle_CTARS_hex_F",
"srifle_DMR_07_blk_F", "srifle_DMR_07_ghex_F", "srifle_DMR_07_hex_F", "arifle_Katiba_F", "arifle_Katiba_C_F", "arifle_Katiba_GL_F", "arifle_Mk20_plain_F",
"arifle_Mk20_F", "arifle_Mk20_GL_plain_F", "arifle_Mk20_GL_F", "arifle_Mk20C_plain_F", "arifle_Mk20C_F", "arifle_MX_F", "arifle_MX_Black_F", "arifle_MX_khk_F",
"arifle_MX_SW_F", "arifle_MX_SW_Black_F", "arifle_MX_SW_khk_F", "arifle_MXC_F", "arifle_MXC_Black_F", "arifle_MXC_khk_F", "arifle_MXM_F", "arifle_MXM_Black_F",
"arifle_MXM_khk_F", "arifle_SPAR_01_blk_F", "arifle_SPAR_01_khk_F", "arifle_SPAR_01_snd_F", "arifle_SPAR_02_blk_F", "arifle_SPAR_02_khk_F", "arifle_SPAR_02_snd_F",
"arifle_TRG20_F", "arifle_TRG21_F"
};
uniforms[] = { "U_B_GEN_Commander_F", "U_B_GEN_Soldier_F" };
vests[] = {
"V_TacVest_gen_F", "V_Chestrig_blk", "V_Chestrig_rgr", "V_Chestrig_khk", "V_Chestrig_oli", "V_HarnessOGL_brn", "V_HarnessOGL_ghex_F", "V_HarnessO_brn", "V_HarnessO_ghex_F",
"V_TacVestIR_blk", "V_BandollierB_blk", "V_BandollierB_cbr", "V_BandollierB_ghex_F", "V_BandollierB_rgr", "V_BandollierB_khk", "V_BandollierB_oli", "V_TacChestrig_cbr_F",
"V_TacChestrig_grn_F", "V_TacChestrig_oli_F", "V_TacVest_blk", "V_TacVest_brn", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli", "V_TacVest_blk_POLICE"
};
};
class Guerilla
{
backpacks[] = {
"B_AssaultPack_khk", "B_AssaultPack_dgtl", "B_AssaultPack_rgr", "B_AssaultPack_sgg", "B_AssaultPack_cbr",
"B_AssaultPack_mcamo", "B_TacticalPack_rgr", "B_TacticalPack_mcamo", "B_TacticalPack_ocamo", "B_TacticalPack_blk",
"B_TacticalPack_oli", "B_FieldPack_khk", "B_FieldPack_ocamo", "B_FieldPack_oucamo", "B_FieldPack_cbr",
"B_FieldPack_blk", "B_Carryall_ocamo", "B_Carryall_oucamo", "B_Carryall_mcamo", "B_Carryall_khk", "B_Carryall_cbr",
"B_FieldPack_oli", "B_Carryall_oli", "B_Kitbag_Base", "B_Kitbag_cbr", "B_Kitbag_mcamo",
"B_Kitbag_rgr", "B_Kitbag_sgg", "B_OutdoorPack_Base", "B_OutdoorPack_blk", "B_OutdoorPack_blu", "B_OutdoorPack_tan"
};
faceWear[] = { "G_Aviator", "G_Balaclava_blk", "G_Balaclava_oli", "G_Bandanna_aviator", "G_Bandanna_beast", "G_Bandanna_blk", "G_Bandanna_khk", "G_Bandanna_oli", "G_Bandanna_sport", "G_Bandanna_tan" };
headGear[] = {
"H_Bandanna_gry", "H_Bandanna_blu", "H_Bandanna_cbr", "H_Bandanna_khk_hs", "H_Bandanna_khk", "H_Bandanna_sgg", "H_Bandanna_sand", "H_Bandanna_camo", "H_Watchcap_blk",
"H_Watchcap_cbr", "H_Watchcap_camo", "H_Watchcap_khk", "H_Beret_blk", "H_Cap_blk", "H_Cap_grn", "H_Cap_oli", "H_Cap_oli_hs", "H_Cap_tan", "H_Cap_brn_SPECOPS", "H_MilCap_gry",
"H_MilCap_ocamo", "H_Shemag_olive", "H_Shemag_olive_hs", "H_ShemagOpen_tan", "H_ShemagOpen_khk"
};
launchers[] = { "launch_NLAW_F", "launch_RPG32_F", "launch_B_Titan_F", "launch_B_Titan_short_F" };
rifles[] = {
"arifle_Katiba_F", "arifle_Katiba_C_F", "srifle_EBR_F", "arifle_Mk20_plain_F", "arifle_Mk20_F", "arifle_Mk20_GL_plain_F", "arifle_Mk20_GL_F", "LMG_Mk200_F", "arifle_Mk20C_plain_F",
"arifle_Mk20C_F", "arifle_MX_F", "arifle_MX_Black_F", "arifle_MX_SW_F", "arifle_MX_SW_Black_F", "arifle_MXC_F", "arifle_MXC_Black_F", "arifle_MXM_F", "arifle_MXM_Black_F",
"srifle_DMR_01_F", "arifle_TRG20_F", "arifle_TRG21_F", "SMG_01_F", "LMG_Zafir_F"
};
uniforms[] = {
"U_BG_Guerrilla_6_1", "U_BG_Guerilla1_1", "U_BG_Guerilla2_2", "U_BG_Guerilla2_1", "U_BG_Guerilla2_3", "U_BG_Guerilla3_1", "U_BG_leader"
};
vests[] = {
"V_PlateCarrier1_rgr", "V_PlateCarrier2_rgr", "V_PlateCarrier3_rgr", "V_PlateCarrierGL_rgr", "V_PlateCarrier1_blk",
"V_PlateCarrierSpec_rgr", "V_Chestrig_khk", "V_Chestrig_rgr", "V_Chestrig_blk", "V_Chestrig_oli", "V_TacVest_khk",
"V_TacVest_brn", "V_TacVest_oli", "V_TacVest_blk", "V_TacVest_camo", "V_TacVest_blk_POLICE", "V_TacVestIR_blk", "V_TacVestCamo_khk",
"V_HarnessO_brn", "V_HarnessOGL_brn", "V_HarnessO_gry", "V_HarnessOGL_gry", "V_HarnessOSpec_brn", "V_HarnessOSpec_gry",
"V_PlateCarrierIA1_dgtl", "V_PlateCarrierIA2_dgtl", "V_PlateCarrierIAGL_dgtl", "V_PlateCarrierL_CTRG", "V_PlateCarrierH_CTRG", "V_I_G_resistanceLeader_F"
};
};
class PoliceRegular
{
headGear[] = {
"H_Cap_police", "H_Beret_blk_POLICE", "H_Cap_blk_ION", "H_Cap_khaki_specops_UK", "H_Cap_tan_specops_US", "H_Cap_brn_SPECOPS", "H_Cap_blk_CMMG", "H_Cap_blk", "H_Cap_blu", "H_Cap_red",
"H_Cap_press", "H_Cap_usblack", "H_Beret_brn_SF", "H_Beret_Colonel"
};
pistols[] = { "hgun_ACPC2_F", "hgun_P07_F", "hgun_Pistol_heavy_01_F", "hgun_Pistol_heavy_02_F", "hgun_Rook40_F" };
rifles[] = {
"arifle_Katiba_F", "arifle_Katiba_C_F", "arifle_Katiba_GL_F", "arifle_Mk20_F", "arifle_Mk20_plain_F", "arifle_Mk20C_F", "arifle_Mk20C_plain_F", "arifle_Mk20_GL_F", "arifle_Mk20_GL_plain_F",
"arifle_MXC_F", "arifle_MX_F", "arifle_MX_SW_F", "arifle_MXC_Black_F", "arifle_MX_Black_F", "arifle_TRG21_F", "arifle_TRG20_F", "arifle_TRG21_GL_F", "hgun_PDW2000_F", "SMG_01_F", "SMG_02_F"
};
uniforms[] = { "U_Marshal", "U_Rangemaster" };
vests[] = {
"V_PlateCarrier1_blk", "V_PlateCarrier1_rgr", "V_PlateCarrier2_blk", "V_PlateCarrier2_rgr", "V_Chestrig_blk", "V_Chestrig_rgr", "V_Chestrig_khk", "V_Chestrig_oli", "V_PlateCarrierL_CTRG",
"V_PlateCarrierH_CTRG", "V_PlateCarrierIA1_dgtl", "V_PlateCarrierIA2_dgtl", "V_HarnessOGL_brn", "V_HarnessOGL_gry", "V_HarnessO_brn", "V_HarnessO_gry", "V_Rangemaster_belt", "V_TacVestIR_blk",
"V_BandollierB_blk", "V_BandollierB_cbr", "V_BandollierB_rgr", "V_BandollierB_khk", "V_BandollierB_oli", "V_TacVest_blk", "V_TacVest_brn", "V_TacVest_camo", "V_TacVest_khk", "V_TacVest_oli",
"V_TacVest_blk_POLICE"
};
};
class PoliceSpecialForces
{
faceWear[] = {
"G_Balaclava_blk", "G_Balaclava_combat", "G_Balaclava_lowprofile", "G_Balaclava_oli", "G_Bandanna_aviator", "G_Bandanna_blk",
"G_Bandanna_khk", "G_Bandanna_oli", "G_Bandanna_shades", "G_Bandanna_sport", "G_Combat", "G_Lowprofile", "G_Sport_Red",
"G_Sport_Blackyellow", "G_Sport_BlackWhite", "G_Sport_Blackred", "G_Sport_Greenblack", "G_Tactical_Clear", "G_Tactical_Black"
};
headGear[] = {
"H_Watchcap_blk", "H_Cap_usblack", "H_HelmetB_black", "H_HelmetSpecB_blk", "H_HelmetB_light_black"
};
pistols[] = { "hgun_Pistol_heavy_01_F", "hgun_ACPC2_F", "hgun_P07_F", "hgun_Rook40_F", "hgun_Pistol_heavy_02_F" };
rifles[] = {
"srifle_GM6_F", "srifle_GM6_camo_F", "arifle_Katiba_F", "arifle_Katiba_C_F", "srifle_LRR_F", "srifle_EBR_F", "LMG_Mk200_F", "arifle_MX_Black_F", "arifle_MX_SW_Black_F", "arifle_MXC_Black_F",
"arifle_MXM_Black_F", "LMG_Zafir_F"
};
uniforms[] = { "U_B_CTRG_1", "U_B_CTRG_2", "U_B_CTRG_3" };
vests[] = { "V_PlateCarrier1_blk", "V_PlateCarrier2_blk", "V_Chestrig_blk", "V_TacVestIR_blk", "V_BandollierB_blk", "V_TacVest_blk" };
};
};
class aiSkill
{
// Global AI skill settings. They affect each VEMFr unit
difficulty = "Veteran"; // Options: "Easy" "Normal" "Veteran" "Hardcore" | Default: Veteran
class Easy { accuracy = 0.4; aimingShake = 0.20; aimingSpeed = 0.3; endurance = 0.25; spotDistance = 0.5; spotTime = 0.85; courage = 1; reloadSpeed = 0.3; commanding = 1; general = 0.3; };
class Normal { accuracy = 0.4; aimingShake = 0.20; aimingSpeed = 0.3; endurance = 0.25; spotDistance = 0.5; spotTime = 0.85; courage = 1; reloadSpeed = 0.3; commanding = 1; general = 0.4; };
class Veteran { accuracy = 0.4; aimingShake = 0.20; aimingSpeed = 0.3; endurance = 0.25; spotDistance = 0.5; spotTime = 0.85; courage = 1; reloadSpeed = 0.3; commanding = 1; general = 0.5; };
class Hardcore { accuracy = 0.4; aimingShake = 0.20; aimingSpeed = 0.3; endurance = 0.25; spotDistance = 0.5; spotTime = 0.85; courage = 1; reloadSpeed = 0.3; commanding = 1; general = 0.7; };
};
class aiStatic // Simply spawns units at desired positions
{
amount[] = { 10, 20, 12, 11, 40, 21, 19 }; // How much AI units on each seperate position. Example: 1st location, 10. 2nd location, 20. 3rd location, 12. And so on....
enabled = no; // enable/disable static AI spawning
positions[] = { }; // Add positions here. Each position must have { } around it and must be seperated with a comma if multiple positions present. Last position in list should NOT have a comma behind it!
random = yes; // enable/disable randomization of AI units amount
};
};
#include "cpp\CfgPatches.cpp"
#include "cpp\CfgFunctions.cpp"
#include "cpp\CfgVemfrScripts.cpp"
#include "cpp\CfgAppIDs.cpp"

View File

@ -0,0 +1,9 @@
class CfgAppIDs
{
Apex = 395180;
Bundle = 304400;
Heli = 304380;
Kart = 288520;
Marksmen = 332350;
Zeus = 275700;
};

View File

@ -0,0 +1,24 @@
class CfgFunctions
{
class a3_vemf_reloaded
{
tag = "VEMFr";
class serverFunctions
{
file = "a3_vemf_reloaded\fn";
class checkSide {};
class config {};
class findPos {};
class hc {};
class launch { postInit = 1; };
class mines {};
class modAppID {};
class playerNear {};
class scriptPath {};
class spawnInvasionAI {};
class spawnVEMFrAI {};
class waitForPlayers {};
class whichMod {};
};
};
};

View File

@ -0,0 +1,12 @@
class CfgPatches
{
class a3_vemf_reloaded
{
units[] = {};
requiredAddons[] = {};
fileName = "a3_vemf_reloaded.pbo";
requiredVersion = 1.60; // VEMFr does not work on older versions due to use of the latest scripting commands
version = "0752.5"; // Do NOT change
author = "IT07";
};
};

View File

@ -0,0 +1,21 @@
class CfgVemfrScripts
{
checkLoot = "a3_vemf_reloaded\sqf\checkLoot.sqf";
giveFire = "a3_vemf_reloaded\sqf\giveFire.sqf";
handleKillCleanup = "a3_vemf_reloaded\sqf\handleKillCleanup.sqf";
handleKillReward = "a3_vemf_reloaded\sqf\handleKillReward.sqf";
killedMonitor = "a3_vemf_reloaded\sqf\killedMonitor.sqf";
loadLoot = "a3_vemf_reloaded\sqf\loadLoot.sqf";
loadInv = "a3_vemf_reloaded\sqf\loadInv.sqf";
log = "a3_vemf_reloaded\sqf\log.sqf";
missionTimer = "a3_vemf_reloaded\sqf\missionTimer.sqf";
notificationToClient = "a3_vemf_reloaded\sqf\notificationToClient.sqf";
overrides = "a3_vemf_reloaded\sqf\overrides.sqf";
REMOTEguard = "a3_vemf_reloaded\sqf\REMOTEguard.sqf";
sayKilled = "a3_vemf_reloaded\sqf\sayKilled.sqf";
setGroupOwner = "a3_vemf_reloaded\sqf\setGroupOwner.sqf";
signAI = "a3_vemf_reloaded\sqf\signAI.sqf";
spawnStaticAI = "a3_vemf_reloaded\sqf\spawnStaticAI.sqf";
systemChatToClient = "a3_vemf_reloaded\sqf\systemChatToClient.sqf";
warningToClient = "a3_vemf_reloaded\sqf\warningToClient.sqf";
};

View File

@ -0,0 +1,24 @@
/*
Author: IT07
Description: checks the side of given unit and returns it
Params:
_this: STRING - unit classname
Returns: SIDE - unit's side
*/
private "_r";
private _f = getText ( configFile >> "CfgVehicles" >> _this >> "faction" );
if not ( _f isEqualTo "" ) then
{
scopeName "isEqualTo";
if ( _f isEqualTo "BLU_G_F" ) then { _r = WEST; breakOut "isEqualTo" };
if ( _f isEqualTo "CIV_F" ) then { _r = civilian; breakOut "isEqualTo" };
if ( _f isEqualTo "IND_F" ) then { _r = independent; breakOut "isEqualTo" };
if ( _f isEqualTo "IND_G_F" ) then { _r = resistance; breakOut "isEqualTo" };
if ( _f isEqualTo "OPF_G_F" ) then { _r = EAST };
} else { [ "fn_checkSide", 0, format [ "failed to find faction of %1", _this ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
if not ( isNil "_r" ) then { _r };

View File

@ -0,0 +1,73 @@
/*
Author: IT07
Description:
gets config value of given var from VEMF config OR cfgPath
Params:
method 1:
_this: STRING - SINGLE config value to get from root of CfgVemfReloaded
method 2:
_this select 0: ARRAY of STRINGS - MULTIPLE config values to get from root of VEMFconfig
method 3:
_this select 0: ARRAY of STRINGS - config path to get value from. Example: "root","subclass"
_this select 1: ARRAY of STRINGS - MULTIPLE config values to get from given path
Returns:
ARRAY - Result
*/
private [ "_v", "_cfg" ];
private _r = [ ];
private _chck =
{
if ( isNumber _cfg ) then { _v = getNumber _cfg };
if ( isText _cfg ) then { _v = toLower (getText _cfg) };
if ( isArray _cfg ) then { _v = getArray _cfg };
};
if ( _this isEqualType "" ) then
{
if ( isNull ( configFile >> "CfgVemfReloadedOverrides" >> _this ) ) then { _cfg = configFile >> "CfgVemfReloaded" >> _this
} else { _cfg = configFile >> "CfgVemfReloadedOverrides" >> _this };
call _chck;
if not ( isNil "_v" ) then { _r = _v } else { [ "fn_config", 0, format [ "can not find setting '%1' in root", _this ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
};
if ( _this isEqualType [] ) then
{
if ( _this isEqualTypeArray [ [], [] ] ) then
{
private _p = _this select 0;
private _b =
{
{
_cfg = _cfg >> _x;
} forEach _p;
};
{
_cfg = configFile >> "CfgVemfReloadedOverrides";
call _b;
_cfg = _cfg >> _x;
if ( isNull _cfg ) then
{
_cfg = configFile >> "CfgVemfReloaded";
call _b;
_cfg = _cfg >> _x;
};
call _chck;
if not ( isNil "_v" ) then { _r pushBack _v } else { [ "fn_config", 0, format [ "can not find setting '%1' in '%2'", _x, _this select 0 ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
} forEach ( _this select 1 );
};
if ( _this isEqualTypeArray [ [] ] ) then
{
{
_cfg = configFile >> "CfgVemfReloadedOverrides" >> _x;
if ( isNull _cfg ) then { _cfg = configFile >> "CfgVemfReloaded" >> _x };
call _chck;
if not ( isNil "_v" ) then { _r pushBack _v } else { [ "fn_config", 0, format [ "can not find setting '%1' in root", _x ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
} forEach ( _this select 0 );
};
};
if not ( isNil "_r" ) then { _r };

View File

@ -0,0 +1,117 @@
/*
Author: IT07
Description:
can find a location or pos randomly on the map where there are no players
Params:
_this select 0: STRING - Mode to use. Options: "loc" or "pos"
_this select 1: BOOLEAN - True if _pos needs to be a road
_this select 2: POSITION - Center for nearestLocations check
_this select 3: SCALAR - Distance in meters. Locations closer than given position will be excluded/included
_this select 4: SCALAR - Max prefered distance in meters from center. If not achievable, further dest will be selected
_this select 5: SCALAR - Distance in meters to check from _this2 for players
_this select 6: STRING - Exact config name of mission override settings to load
Returns:
if mode == loc: LOCATION
if mode == pos: POSITION
*/
private [ "_r", "_bad" ];
params [ "_this0" , "_this1", "_this2", "_this3", "_this4", "_this5", "_this6" ];
( [ [ "nonPopulated", "noMissionPos", "missionDistance", "missionList" ] ] call VEMFr_fnc_config ) params [ "_s0", "_s1", "_s2", "_s3" ];
private _ms0 = ( [ [ "missionSettings", _this6 ], [ "skipDistanceReversed" ] ] call VEMFr_fnc_config ) select 0;
if ( _this6 in _s3 ) then { _s0 = ( [ [ "missionSettings", _this6 ], [ "nonPopulated" ] ] call VEMFr_fnc_config ) select 0 };
if ( _this0 isEqualTo "loc" ) then
{
// Get a list of locations close to _this2 (position of player)
_t = [ "CityCenter", "Strategic", "StrongpointArea", "NameVillage", "NameCity", "NameCityCapital" ];
if ( _s0 isEqualTo "yes" ) then { _t append [ "nameLocal", "Area", "BorderCrossing", "Hill", "fakeTown", "Name", "RockArea", "ViewPoint" ] };
private _arr = nearestLocations [ _this2, _t, if ( _ms0 > 0 ) then { _ms0 * 2 } else { worldSize } ];
if ( ( count _arr ) > 0 ) then
{
private _maps = "isClass _x" configClasses ( configFile >> "CfgVemfReloaded" >> "blacklists" >> "locations" );
{ _maps set [ _forEachIndex, toLower ( configName _x ) ] } forEach _maps;
if ( ( toLower worldName ) in _maps ) then { _bad = ([[("blacklists"),("locations"),(worldName)],["names"]] call VEMFr_fnc_config) select 0
} else { _bad = ([[("blacklists"),("locations"),("Other")],["names"]] call VEMFr_fnc_config) select 0 };
private _bin = [ ];
private _used = uiNamespace getVariable [ "VEMFrUsedLocs", [] ];
private _fltr =
{
scopeName "filter";
private _xx = _x;
{
if ( ( ( _x select 0 ) distance ( locationPosition _xx ) ) <= ( _x select 1 ) ) then { _bin pushBack _xx; breakOut "filter" };
} forEach _s1;
if ( _x in _used ) then { _bin pushBack _x }
else
{
{
if ( ( ( locationPosition _xx ) distance ( locationPosition _x ) ) < _s2 ) then { _bin pushBack _xx; breakOut "filter" };
} forEach _used;
};
if ( ( ( text _x ) in _bad ) OR ( ( toLower ( text _x ) ) in _bad ) ) then { _bin pushBack _x };
};
{
private _dist = _this2 distance ( locationPosition _x );
if ( _ms0 > 0 ) then
{
if ( ( _dist <= ( _ms0 * 2 ) ) AND ( _dist > _ms0 ) ) then { call _fltr }
else { _bin pushBack _x };
} else
{
if ( _dist > _this3 ) then { call _fltr }
else { _bin pushBack _x };
};
} forEach _arr;
{ // Remove all invalid locations from _arr
_arr deleteAt ( _arr find _x );
} forEach _bin;
// Check what kind of distances we have
private _low = [ ]; // Closer then _this4
private _hi = [ ]; // Further than _this4
{
private _dist = _this2 distance ( locationPosition _x );
if ( _dist > _this4 ) then { _hi pushBack _x };
if ( _dist <= _this4 ) then { _low pushBack _x };
} forEach _arr;
// Check if there are any prefered locations. If yes, randomly select one
if ( ( count _low ) > 0 ) then
{
private _loc = selectRandom _low;
_r = _loc;
_used pushBackUnique _loc;
} else
{
if ( ( count _hi ) > 0 ) then
{
private _loc = selectRandom _hi;
_r = _loc;
_used pushBackUnique _loc;
};
};
};
};
if ( _this0 isEqualTo "pos" ) then
{
for "_p" from 1 to 10 do
{
private _pos = [ _this2, _this3, -1, 2, 0, 50, 0 ] call BIS_fnc_findSafePos;
if _this1 then { _pos = position ( nearRoads select 0 ) };
if not ( [ _pos, _this5 ] call VEMFr_fnc_playerNear ) then { _r = _pos };
};
};
if not ( isNil "_r" ) then { _r };

View File

@ -0,0 +1,41 @@
/*
Author: IT07
Description:
selects a headless client with least (VEMFr) load
Params:
None
Returns:
OBJECT - the headless client
*/
private "_r";
private _n = "headLessClientNames" call VEMFr_fnc_config;
private _arr = [ ];
private _gl = uiNamespace getVariable "VEMFrHcLoad";
{
private _hc = missionNameSpace getVariable [ _x, "nope" ];
if not ( _hc isEqualTo "nope" ) then
{
if ( ( ( typeName _hc ) isEqualTo "OBJECT" ) AND ( ( toLower ( typeOf _hc ) ) isEqualTo ( toLower ( "HeadlessClient_F" ) ) ) ) then
{
_arr pushBackUnique _hc;
if not ( _x in ( _gl select 0 ) ) then
{
_i = ( _gl select 0 ) pushBack _hc;
( _gl select 1 ) set [ _i, 0 ];
};
};
};
} forEach _n;
if ( ( count _arr ) > 0 ) then
{
_l = 99999;
{ if ( _x <= _l ) then { _l = _x } } forEach ( _gl select 1 );
_r = ( _gl select 0 ) select ( ( _gl select 1 ) find _l );
( _gl select 1 ) set [ ( _gl select 0 ) find _r, _l + 1 ];
if not ( isNil "_r" ) then { _r };
};

View File

@ -0,0 +1,36 @@
/*
Author: IT07
Description:
launches VEMFr (You don't say?)
*/
if ( isNil "VEMFrHasStarted" ) then
{
[] spawn
{
VEMFrHasStarted = call compileFinal "true";
[ "Launcher", 2, format [ "/// booting up VEMFr v%1 (%2) \\\", getText ( configFile >> "CfgPatches" >> "a3_vemf_reloaded" >> "version" ), call VEMFr_fnc_whichMod ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
uiSleep 0.5;
[ "Launcher", 2, format [ "Headless client support: %1", if ( ( "headlessClientSupport" call VEMFr_fnc_config) isEqualTo "yes" ) then { "ENABLED" } else { "DISABLED" } ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
uiNamespace setVariable [ "VEMFrUsedLocs", [] ];
uiNamespace setVariable [ "VEMFrHcLoad", [ [], [] ] ];
uiSleep 1;
if ( ( "overridesToRPT" call VEMFr_fnc_config ) isEqualTo "yes" ) then { _h = ExecVM ( "overrides" call VEMFr_fnc_scriptPath ); waitUntil { if ( scriptDone _h ) then {true} else { uiSleep 0.5; false } } };
{
_h = [] ExecVM format [ "a3_vemf_reloaded\sqf\%1.sqf", _x ];
if ( ( _x isEqualTo "checkClasses" ) OR ( _x isEqualTo "spawnStaticAI" ) ) then { waitUntil { if ( scriptDone _h ) then { true } else { uiSleep 0.1; false } } };
} forEach [ "checkClasses", "missionTimer", "REMOTEguard", "spawnStaticAI" ];
{
if ( ( ( [ [ "addonSettings", _x ], [ "enabled" ] ] call VEMFr_fnc_config ) select 0 ) isEqualTo "yes" ) then
{
_h = [] ExecVM format [ "a3_vemf_reloaded\addons\%1.sqf", _x ];
waitUntil { if ( scriptDone _h ) then { true } else { uiSleep 0.1; false } };
};
} forEach ( "addons" call VEMFr_fnc_config );
if ( ( call VEMFr_fnc_whichMod ) isEqualTo "Epoch" ) then { west setFriend [ independent, 0 ]; independent setFriend [ west, 0 ] };
};
} else { [ "Launcher", 0, format [ "a3_vemf_reloaded FAILED to launch! VEMFrHasStarted (%1) is already defined!", VEMFrHasStarted ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };

View File

@ -0,0 +1,36 @@
/*
Author: IT07
Description:
places mines around given position within given radius
Params:
_this select 0: POSITION - center of area to place mines around
_this select 1: SCALAR - the minimum distance
_this select 2: SCALAR - the maximum distance (must be higher than minimum of course)
_this select 3: STRING - exact config name of mission
Returns:
ARRAY - array containing all mine objects
*/
scopeName "mines";
private [ "_r", "_this0", "_this1", "_this2", "_this3", "_t", "_c", "_mt" ];
params [ "_this0", "_this1", "_this2", "_this3" ];
if (_this3 in ( "missionList" call VEMFr_fnc_config ) ) then
{
( [ [ "missionSettings", _this3, "mines" ], [ "count", "type" ] ] call VEMFr_fnc_config ) params [ "_c", "_t" ];
if ( _t isEqualTo "at" ) then { _mt = [ "ATMine" ] };
if ( _t isEqualTo "ap" ) then { _mt = [ "APERSMine" ] };
if ( _t isEqualTo "atap" ) then { _mt = [ "ATMine", "APERSMine" ] };
if ( isNil "_mt" ) exitWith { [ "fn_mines", 0, format [ "invalid mines type: %1", _t ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
_r = [ ];
for "_m" from 1 to _c do
{
_r pushBack ( createMine [ selectRandom _mt, ( [ _this0, _this1, _this2, 2, 0, 20, 0 ] call BIS_fnc_findSafePos ), [], 0 ] );
uiSleep 0.1;
};
};
if not ( isNil "_r" ) then { _r };

View File

@ -0,0 +1,14 @@
/*
Author: IT07
Description:
returns the appID of given DLC
Params:
_this: STRING - name of DLC/Expansion
Returns:
SCALAR - appID
*/
getNumber ( configFile >> "CfgAppIDs" >> _this );

View File

@ -0,0 +1,20 @@
/*
Author: IT07
Description:
checks for players within given distance of given location/position
Params:
_this select 0: POSITION - center of area to check around
_this select 1: SCALAR - radius around the position to check for players
Returns:
BOOL - true if player(s) found
*/
private _r = false;
params [ "_this0", "_this1" ];
{
if ( ( isPlayer _x ) AND ( ( speed _x ) < 250 ) AND ( ( ( position _x ) distance _this0 ) < _this1 ) ) exitWith { _r = true };
} forEach allPlayers;
_r

View File

@ -0,0 +1,11 @@
/*
Author: IT07
Description:
returns the script path of given string
Returns:
STRING - path to sqf file
*/
getText ( configFile >> "CfgVemfrScripts" >> _this );

View File

@ -0,0 +1,137 @@
/*
Author: IT07
Description:
spawns AI using given _this0 and unit/group count.
Params:
_this select 0: POSITION - where to spawn the units around
_this select 1: SCALAR - AI mode
_this select 2: STRING - exact config name of mission
_this select 3: SCALAR (optional) - maximum spawn distance from center
Returns:
ARRAY format [[groups],[50cals]]
*/
params [ "_this0", "_this1", "_this2", "_this3" ];
private _r = [ [ ], [ ] ];
private _grps = [ ];
( [ [ "aiSkill", ( ( [ [ "aiSkill" ], [ "difficulty" ] ] call VEMFr_fnc_config ) select 0 ) ], [ "accuracy", "aimingShake", "aimingSpeed", "endurance", "spotDistance", "spotTime", "courage", "reloadSpeed", "commanding", "general" ] ] call VEMFr_fnc_config ) params [ "_ccrcy", "_mShk", "_mSpd", "_stmna", "_sptDst", "_sptTme", "_crge", "_rldSpd", "_cmmndng", "_gnrl" ];
private _bad = ( [ [ "blacklists", "buildings" ], [ "classes" ] ] call VEMFr_fnc_config ) select 0;
( [ [ "missionSettings", _this2 ], [ "groupCount", "groupUnits" ] ] call VEMFr_fnc_config ) params [ "_ms0", "_ms1" ];
_ms0 = ( round random ( _ms0 select 1 ) ) max ( _ms0 select 0 );
_ms1 = ( round random ( _ms1 select 1 ) ) max ( _ms1 select 0 );
private _gdHss = [ ];
{ if not ( ( typeOf _x ) in _bad ) then { if ( [ _x, _ms1 ] call BIS_fnc_isBuildingEnterable ) then { _gdHss pushBack _x } } } forEach ( nearestTerrainObjects [ _this0, [ "House" ], if not ( isNil "_this3" ) then { _this3 } else { 150 } ] );
_gdHss = _gdHss call BIS_fnc_arrayShuffle;
private _nHss = false;
if ( ( count _gdHss ) < _ms0 ) then { _nHss = true };
private _cl50s = ( [ [ "missionSettings", _this2 ], [ "cal50s" ] ] call VEMFr_fnc_config ) select 0;
private _nts = [ ]; // Define units array. the for loops below will fill it with units
for "_g" from 1 to _ms0 do // Spawn Groups near Position
{
if not _nHss then { if ( ( count _gdHss ) < 1 ) then { _nHss = true } };
private [ "_hsPstns", "_plcd50", "_i" ];
private _grp = createGroup ( ( ( [ [ call VEMFr_fnc_whichMod ], [ "unitClass" ] ] call VEMFr_fnc_config ) select 0 ) call VEMFr_fnc_checkSide );
( _r select 0 ) pushBack _grp;
_grp allowFleeing 0;
if not _nHss then
{
private _hs = selectRandom _gdHss;
_gdHss deleteAt ( _gdHss find _hs );
_hsPstns = [ _hs ] call BIS_fnc_buildingPositions;
};
_plcd50 = false;
for "_u" from 1 to _ms1 do
{
private [ "_spwnPs", "_hmg" ];
if _nHss then { _spwnPs = [ _this0, 20, if not ( isNil "_this3" ) then { _this3 } else { 150 }, 1, 0, 200, 0 ] call BIS_fnc_findSafePos }
else
{
_spwnPs = selectRandom _hsPstns;
if not _plcd50 then
{
_plcd50 = true;
if ( _cl50s > 0 ) then
{
_hmg = createVehicle [ "O_HMG_01_high_F", _spwnPs, [], 0, "CAN_COLLIDE" ];
_hmg setVehicleLock "LOCKEDPLAYER";
( _r select 1 ) pushBack _hmg;
};
};
};
private _nt = _grp createUnit [ ( ( [ [ call VEMFr_fnc_whichMod ], [ "unitClass" ] ] call VEMFr_fnc_config ) select 0 ), _spwnPs, [], 0, "CAN_COLLIDE" ]; // Create Unit There
if ( ( not _nHss ) AND ( _cl50s > 0 ) ) then
{
if not ( isNil "_hmg" ) then
{
if not ( isNull _hmg ) then
{
_nt moveInGunner _hmg;
_hmg = nil;
_cl50s = _cl50s - 1;
};
};
_hsPstns deleteAt ( _hsPstns find _spwnPs );
};
_nt addMPEventHandler [ "mpkilled", "if isDedicated then { [ _this select 0 ] ExecVM ( 'handleKillCleanup' call VEMFr_fnc_scriptPath ); [ _this select 0, name ( _this select 0 ), _this select 1, name (_this select 1) ] ExecVM ( 'handleKillReward' call VEMFr_fnc_scriptPath ); ( _this select 0 ) removeAllEventHandlers 'MPKilled' } " ];
// Set skills
_nt setSkill [ "aimingAccuracy", _ccrcy ];
_nt setSkill [ "aimingShake", _mShk ];
_nt setSkill [ "aimingSpeed", _mSpd ];
_nt setSkill [ "endurance", _stmna ];
_nt setSkill [ "spotDistance", _sptDst ];
_nt setSkill [ "spotTime", _sptTme ];
_nt setSkill [ "courage", _crge ];
_nt setSkill [ "reloadSpeed", _rldSpd ];
_nt setSkill [ "commanding", _cmmndng ];
_nt setSkill [ "general", _gnrl ];
_nt enableAI "TARGET";
_nt enableAI "AUTOTARGET";
_nt enableAI "MOVE";
_nt enableAI "ANIM";
_nt disableAI "TEAMSWITCH";
_nt enableAI "FSM";
_nt enableAI "AIMINGERROR";
_nt enableAI "SUPPRESSION";
_nt enableAI "CHECKVISIBLE";
_nt enableAI "COVER";
_nt enableAI "AUTOCOMBAT";
_nt enableAI "PATH";
};
[ units _grp, _this2, _this1 ] ExecVM ( "loadInv" call VEMFr_fnc_scriptPath ); // Load the AI's inventory
_grps pushBack _grp; // Push it into the _grps array
};
if ( ( ( count _grps ) isEqualTo _ms0 ) AND _nHss ) then
{
private _wypnts =
[
[ _this0 select 0, ( ( _this0 select 1 ) + 50 ), 0 ],
[ ( _this0 select 0 ) + 50, _this0 select 1, 0 ],
[ _this0 select 0, (_this0 select 1) - 50, 0 ],
[ (_this0 select 0) - 50, _this0 select 1, 0 ]
];
{ // Make them Patrol
for "_z" from 1 to (count _wypnts) do
{
private _wp = _x addWaypoint [ _wypnts select (_z-1), 10 ];
_wp setWaypointType "SAD";
_wp setWaypointCompletionRadius 20;
};
private _cyc = _x addWaypoint [ _this0, 100 ];
_cyc setWaypointType "CYCLE";
_cyc setWaypointCompletionRadius 20;
} forEach _grps;
};
_r

View File

@ -0,0 +1,65 @@
/*
Author: original by Vampire, completely rewritten by IT07
Description:
spawns VEMFr AI using given _this0 and unit/group count. Handles their inventory and transfers them to a client
Params:
_this select 0: POSITION - where to spawn the units around
_this select 1: SCALAR - how many groups to spawn
_this select 2: SCALAR - how many units to put in each group
_this select 3: SCALAR - AI mode
_this select 4: STRING - exact config name of mission or addon
_this select 5: SCALAR - (optional) altitude to create units at
_this select 6: SCALAR - (optional) spawn radius
Returns:
ARRAY with group(s)
*/
params [ "_this0", "_this1", "_this2", "_this3", "_this4", "_this5", "_this6" ];
private _r = [];
private _allUnits = [];
_this0 = [ _this0 select 0, _this0 select 1, if not ( isNil "_this5" ) then { _this5 } else { 0 } ];
( [ [ "aiSkill", ( [ [ "aiSkill" ], [ "difficulty" ] ] call VEMFr_fnc_config ) select 0 ], [ "accuracy", "aimingShake", "aimingSpeed", "endurance", "spotDistance", "spotTime", "courage", "reloadSpeed", "commanding", "general" ] ] call VEMFr_fnc_config ) params [("_ccrcy"),("_mshk"),("_mspd"),("_stmn"),("_sptDst"),("_sptTm"),("_crg"),("_rldSpd"),("_cmmndng"),("_gnrl")];
for "_g" from 1 to _this1 do
{
private _grp = createGroup ( ( ( [ [ call VEMFr_fnc_whichMod ], [ "unitClass" ] ] call VEMFr_fnc_config ) select 0 ) call VEMFr_fnc_checkSide );
_grp allowFleeing 0;
for "_u" from 1 to _this2 do
{
private _unit = _grp createUnit [ ( [ [ call VEMFr_fnc_whichMod ], [ "unitClass" ] ] call VEMFr_fnc_config ) select 0, _this0, [], if not ( isNil "_this6" ) then { _this6 } else { 0 }, "FORM" ];
_allUnits pushBack _unit;
_unit addMPEventHandler [ "mpkilled", "if isDedicated then { [ _this select 0 ] ExecVM ( 'handleKillCleanup' call VEMFr_fnc_scriptPath ); [ _this select 0, name (_this select 0), _this select 1, name (_this select 1) ] ExecVM ( 'handleKillReward' call VEMFr_fnc_scriptPath ); ( _this select 0 ) removeAllEventHandlers 'MPKilled' }" ];
// Set skills
_unit setSkill [ "aimingAccuracy" , _ccrcy ];
_unit setSkill [ "aimingShake", _mshk ];
_unit setSkill [ "aimingSpeed", _mspd ];
_unit setSkill [ "endurance", _stmn ];
_unit setSkill [ "spotDistance", _sptDst ];
_unit setSkill [ "spotTime", _sptTm ];
_unit setSkill [ "courage", _crg ];
_unit setSkill [ "reloadSpeed", _rldSpd ];
_unit setSkill [ "commanding", _cmmndng ];
_unit setSkill [ "general", _gnrl ];
_unit enableAI "TARGET";
_unit enableAI "AUTOTARGET";
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit disableAI "TEAMSWITCH";
_unit enableAI "FSM";
_unit enableAI "AIMINGERROR";
_unit enableAI "SUPPRESSION";
_unit enableAI "CHECKVISIBLE";
_unit enableAI "COVER";
_unit enableAI "AUTOCOMBAT";
_unit enableAI "PATH";
};
_r pushBack _grp;
};
[ _allUnits, _this4, _this3 ] ExecVM ( "loadInv" call VEMFr_fnc_scriptPath ); // Load the AI's inventory
_r

View File

@ -0,0 +1,25 @@
/*
Author: IT07
Description:
fn_waitForPlayers - waits for player to be nearby given pos
Params:
_this select 0: POSITION - center of area to check for players
_this select 1: SCALAR - radius to check around POSITION
Returns:
BOOL - true if there is a player present
*/
params [ "_this0", "_this1" ];
private _r = false;
if ( [ _this0, _this1 ] call VEMFr_fnc_playerNear ) then { _r = true }
else
{
private _t = round time;
private _tot = ( "timeOutTime" call VEMFr_fnc_config ) * 60;
waitUntil { if ( ( [ _this0, _this1 ] call VEMFr_fnc_playerNear ) OR ( ( ( round time ) - _t ) > _tot ) ) then { true } else { uiSleep 4; false } };
if ( [ _this0, _this1 ] call VEMFr_fnc_playerNear ) then { _r = true };
};
_r

View File

@ -0,0 +1,14 @@
/*
Author: IT07
Description:
returns the current server mod (Exile or Epoch)
Returns:
STRING - the name of the current server mod
*/
private _r = "unknown";
if not ( isNull ( configFile >> "CfgPatches" >> "exile_server" ) ) then { _r = "Exile" };
if not ( isNull ( configFile >> "CfgPatches" >> "a3_epoch_server" ) ) then { _r = "Epoch" };
_r

View File

@ -0,0 +1,128 @@
/*
Author: IT07
Description:
a mission for VEMFr that will paradrop units above a randomly selected base
*/
VEMFrMissionCount = VEMFrMissionCount + 1;
_mn = _this select 0;
if ( isNil "VEMFrAttackCount" ) then { VEMFrAttackCount = 0 };
VEMFrAttackCount = VEMFrAttackCount + 1;
( [ [ "missionSettings", _mn ], [ "maxAttacks", "aiSetup", "minimumLevel", "randomModes", "minimumWait" ] ] call VEMFr_fnc_config ) params [ "_s0", "_s1", "_s2", "_s3", "_s4" ];
if ( VEMFrAttackCount <= _s0 ) then
{
scopeName "outer";
_mod = call VEMFr_fnc_whichMod;
_hist = uiNamespace getVariable [ "VEMFrAttackedBases", [] ];
_objs = [];
{
if ( ( ( speed _x ) < 25 ) AND ( ( vehicle _x ) isEqualTo _x ) ) then
{
if ( _mod isEqualTo "Exile" ) then
{
{
if ( not ( _x in _hist ) AND ( ( _x getVariable "ExileTerritoryLevel" ) >= _s2 ) ) then { _objs pushBack _x };
} forEach ( nearestObjects [ position _x, [ "Exile_Construction_Flag_Static" ], 150 ] );
};
if (_mod isEqualTo "Epoch") then
{
{
if not ( _x in _hist ) then { _objs pushBack _x };
} forEach ( nearestObjects [ position _x, [ "PlotPole_EPOCH" ], 150 ] );
};
};
} forEach allPlayers;
if ( ( count _objs ) > 0 ) then
{
_base = selectRandom _objs;
_hist pushBack _base;
uiNamespace setVariable [ "VEMFrAttackedBases", _hist ];
_pos = position _base;
private "_c";
if ( _mod isEqualTo "Epoch" ) then { _c = [ "Epoch_Male_F", "Epoch_Female_F", "Epoch_Female_Camo_F", "Epoch_Female_CamoBlue_F", "Epoch_Female_CamoBrn_F", "Epoch_Female_CamoRed_F", "Epoch_Female_Ghillie3_F", "Epoch_Female_Ghillie2_F", "Epoch_Female_Ghillie1_F", "Epoch_Female_Wetsuit_F", "Epoch_Female_WetsuitB_F", "Epoch_Female_WetsuitC_F", "Epoch_Female_WetsuitP_F", "Epoch_Female_WetsuitW_F" ] };
if ( _mod isEqualTo "Exile" ) then { _c = [ "Exile_Unit_Player" ] };
_a = nearestObjects [ _pos, _c, _base getVariable [ "ExileTerritorySize", 200 ] ];
if ( ( count _a ) > 0 ) then
{
for "_i" from 0 to _s4 do
{
if ( ( count ( nearestObjects [ _pos, _c, _base getVariable [ "ExileTerritorySize", 120 ] ] ) ) > 0 ) then { uiSleep ( 60 + ( round random 30 ) ) } else { breakOut "outer" };
};
};
_nrPlyr = selectRandom _a;
if not ( isNil "_nrPlyr" ) then
{
_baseNm = "a base";
if ( _mod isEqualTo "Exile" ) then { _baseNm = _base getVariable [ "exileterritoryname", "ERROR: UNKNOWN NAME" ] };
_m = ( [ ( [ _mod ] ), ( [ "aiMode" ] ) ] call VEMFr_fnc_config ) select 0;
if ( _s3 isEqualTo "yes" ) then { _m = [ 0, 1, 2 ]; if ( ( "Apex" call VEMFr_fnc_modAppID ) in ( getDLCs 1 ) ) then { _m pushBack 3; _m pushBack 4 }; _m = selectRandom _m };
_prGrps = [ _pos, _s1 select 0, _s1 select 1, _m, _mn, 1000 + ( random 1000 ), 50 ] call VEMFr_fnc_spawnVEMFrAI;
if not ( isNil "_prGrps" ) then
{
_ntCnt = 0;
{
if ( count ( units _x ) isEqualTo ( _s1 select 1 ) ) then { _ntCnt = _ntCnt + ( count ( units _x ) ) };
} forEach _prGrps;
if ( _ntCnt isEqualTo ( ( _s1 select 0 ) * ( _s1 select 1 ) ) ) then
{
_wyPnts = [];
_nts = [];
{
_wp = _x addWaypoint [ _pos, 50, 1 ];
_wp setWaypointBehaviour "COMBAT";
_wp setWaypointCombatMode "RED";
_wp setWaypointCompletionRadius 10;
_wp setWaypointFormation "DIAMOND";
_wp setWaypointSpeed "FULL";
_wp setWaypointType "SAD";
_x setCurrentWaypoint _wp;
_wyPnts pushback _wp;
{ _nts pushback _x } forEach ( units _x );
[ _x ] ExecVM ( "signAI" call VEMFr_fnc_scriptPath );
} forEach _prGrps;
_plyrs = nearestObjects [ _pos, _c, 275 ];
[ "a", _plyrs ] ExecVM ( "warningToClient" call VEMFr_fnc_scriptPath );
[ "BaseAttack", 1, format [ "a para team is on the way to %1 @ %2's location!", _baseNm, name _nrPlyr ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
_h = [ _nts, _mn ] ExecVM ( "killedMonitor" call VEMFr_fnc_scriptPath );
_loop = [ _pos, _c, _plyrs ] spawn {
params [ "_pos", "_c", "_plyrs" ];
while { true } do
{
[ "a", _plyrs ] ExecVM ( "warningToClient" call VEMFr_fnc_scriptPath );
uiSleep 7;
};
};
waitUntil { if ( scriptDone _h ) then { terminate _loop; true } else { uiSleep 1; false } };
[ "d", _plyrs ] ExecVM ( "warningToClient" call VEMFr_fnc_scriptPath );
breakOut "outer";
} else
{
{
{
deleteVehicle _x;
} forEach (units _x);
} forEach _prGrps;
[ "BaseAttack", 0, format [ "incorrect amount of total units (%1). Should be %2", _ntCnt, (_s1 select 0) * (_s1 select 1) ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
breakOut "outer";
};
} else
{
[ "BaseAttack", 0, format [ "incorrect spawned group count (%1). Should be %2", count _prGrps, _s1 select 0 ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
breakOut "outer";
};
} else
{
_hist deleteAt ( _hist find _base );
[ "BaseAttack", 0, "can not find player near base!" ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
breakOut "outer";
};
} else { breakOut "outer" };
};
VEMFrAttackCount = VEMFrAttackCount - 1;
VEMFrMissionCount = VEMFrMissionCount - 1;

View File

@ -0,0 +1,316 @@
/*
DynamicLocationInvasion by IT07
*/
VEMFrMissionCount = VEMFrMissionCount + 1;
if ( isNil "VEMFrInvasionCount" ) then { VEMFrInvasionCount = 0; };
VEMFrInvasionCount = VEMFrInvasionCount + 1;
_this0 = _this select 0;
if ( VEMFrInvasionCount <= ( ( [ [ "missionSettings", _this0 ], [ "maxInvasions" ] ] call VEMFr_fnc_config ) select 0 ) ) then
{
scopeName "outer";
_mod = call VEMFr_fnc_whichMod;
// Define the settings
( [
[ "missionSettings", _this0 ],
[ "groupCount", "groupUnits", "maxDistancePrefered", "skipDistance", "useMarker", "markCrateVisual", "markCrateOnMap", "announce", "streetLightsEnabled", "streetLightsRestore", "streetLightsRange", "allowCrateLift", "allowRepeat", "randomModes", "spawnCrateFirst", "flairTypes", "smokeTypes", "skipDistanceReversed" ]
] call VEMFr_fnc_config ) params [ "_ms0", "_ms1", "_ms2", "_ms3", "_ms4", "_ms5", "_ms6", "_ms7", "_ms8", "_ms9", "_ms10", "_ms11", "_ms12", "_ms13", "_ms14", "_ms15", "_ms16", "_ms17" ];
( [ [ "missionSettings", _this0, "crateParachute" ], [ "enabled", "altitude" ] ] call VEMFr_fnc_config ) params [ "_cp0", "_cp1" ];
( [ [ "missionSettings", _this0, "mines" ], [ "enabled", "cleanup" ] ] call VEMFr_fnc_config ) params [ "_ms18", "_ms19" ];
_l = [ "loc", false, position ( selectRandom allPlayers ), if ( _ms17 > 0 ) then { _ms17 } else { _ms3 }, _ms2, if ( _ms17 > 0 ) then { _ms17 } else { _ms3 }, _this0 ] call VEMFr_fnc_findPos;
if not ( isNil "_l" ) then
{
_ln = text _l;
_lp = position _l;
if ( _ln isEqualTo "" ) then { _ln = "Area" };
[ _this0, 1, format [ "invading %1...", _ln ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
_m = ( [ [ _mod ], [ "aiMode" ] ] call VEMFr_fnc_config ) select 0;
if ( _ms13 isEqualTo "yes" ) then { _m = [ 0, 1, 2 ]; if ( ( "Apex" call VEMFr_fnc_modAppID ) in ( getDLCs 1 ) ) then { _m pushBack 3; _m pushBack 4 }; _m = selectRandom _m };
if ( _ms7 isEqualTo "yes" ) then
{
if ( _m isEqualTo 0 ) then { [ "ColorEAST", "NEW MISSION", format [ "%1 Guerillas have invaded %2 @ %3", worldName, _ln, mapGridPosition _lp ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
if ( _m isEqualTo 1 ) then { [ "ColorWEST", "NEW MISSION", format [ "%1 Police forces are now controlling %2 @ %3", worldName, _ln, mapGridPosition _lp ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
if ( _m isEqualTo 2 ) then { [ "ColorGrey", "NEW MISSION", format [ "%1 Special Forces are now raiding %2 @ %3", worldName, _ln, mapGridPosition _lp ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
if ( _m isEqualTo 3 ) then { [ "ColorWEST", "NEW MISSION", format [ "The Gendarmerie has invaded %1 @ %2", _ln, mapGridPosition _lp ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
if ( _m isEqualTo 4 ) then { [ "ColorEAST", "NEW MISSION", format [ "%1 bandits have taken %2 @ %3", worldName, _ln, mapGridPosition _lp ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
};
private "_mrkr";
if ( _ms4 isEqualTo "yes" ) then
{ // Create/place the marker if enabled
_mrkr = createMarker [ format [ "VEMFrMarker%1", _ln ], _lp ];
_mrkr setMarkerShape "ICON";
_mrkr setMarkerType "o_art";
_mrkr setMarkerSize [ 0.85, 0.85 ];
if ( ( _m isEqualTo 0 ) OR ( _m isEqualTo 4 ) ) then { _mrkr setMarkerColor "ColorEAST" };
if ( ( _m isEqualTo 1 ) OR ( _m isEqualTo 3 ) ) then { _mrkr setMarkerColor "ColorWEST" };
if ( _m isEqualTo 2 ) then { _mrkr setMarkerColor "ColorGrey" };
};
// If enabled, kill all the lights
if ( _ms8 isEqualTo "no" ) then
{
{
if ( ( damage _x ) < 0.95 ) then
{
_x setDamage 0.95;
uiSleep 0.1;
};
} forEach ( nearestObjects [ _lp, [ "Lamps_Base_F", "PowerLines_base_F", "Land_PowerPoleWooden_L_F" ], _ms10 ] );
};
private "_crate";
_dSpwnCrt =
{
// Choose a box
_bx = selectRandom ( ( [ [ "missionSettings", _this0], [ "crateTypes" ] ] call VEMFr_fnc_config ) select 0 );
_ps = [ _lp, 0, 200, 0, 0, 300, 0 ] call bis_fnc_findSafePos;
if ( _cp0 isEqualTo "yes" ) then
{
_cht = createVehicle [ "I_Parachute_02_F", _ps, [], 0, "FLY" ];
if ( _mod isEqualTo "Epoch" ) then { _cht call EPOCH_server_setVToken };
_cht setPos [ ( getPos _cht ) select 0, ( getPos _cht ) select 1, _cp1 ];
_cht enableSimulationGlobal true;
if not ( isNull _cht ) then
{
_crate = createVehicle [ _bx, getPos _cht, [], 0, "NONE" ];
_crate allowDamage false;
_crate enableSimulationGlobal true;
_crate attachTo [ _cht, [ 0, 0, 0 ] ];
[ _this0, 1, format [ "crate parachuted at: %1 / Grid: %2", ( getPosATL _crate ), mapGridPosition ( getPosATL _crate ) ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
[ _crate, _ln, _lp ] ExecVM ( "loadLoot" call VEMFr_fnc_scriptPath );
waitUntil { if ( ( ( getPos _crate ) select 2 ) < 7 ) then { true } else { uiSleep 1; false } };
detach _crate;
} else { [ _this0, 0, "where is the chute??" ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
} else
{
_crate = createVehicle [ _bx, _ps, [], 0, "NONE" ];
_crate allowDamage false;
[ _crate, _ln, _lp ] ExecVM ( "loadLoot" call VEMFr_fnc_scriptPath );
};
if ( _ms11 > 0 ) then { _crate enableRopeAttach false } else { _crate enableRopeAttach true };
};
if ( [ _lp, 800 ] call VEMFr_fnc_waitForPlayers ) then
{
_spwnd = [ _lp, _m, _this0, 200 ] call VEMFr_fnc_spawnInvasionAI;
_nts = [ ];
{
[ _x ] ExecVM ( "signAI" call VEMFr_fnc_scriptPath );
{
_nts pushBack _x;
} forEach ( units _x );
} forEach ( _spwnd select 0 );
_cl50s = _spwnd select 1;
( [ [ "missionSettings", _this0, "heliPatrol" ], [ "enabled", "classesVanilla", "classesHeliDLC", "classesApex", "locked" ] ] call VEMFr_fnc_config ) params [ "_hp0", "_hp1", "_hp2", "_hp3", "_hp4" ];
if ( ( _hp0 isEqualTo "yes" ) AND ( ( _m isEqualTo 1 ) OR ( _m isEqualTo 2 ) OR (_m isEqualTo 3) ) ) then
{
[ _this0, 1, format [ "adding a heli patrol to the invasion of %1 at %2", _ln, mapGridPosition _lp ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
_classes = _hp1;
if ( ( "Heli" call VEMFr_fnc_modAppID ) in ( getDLCs 1 ) ) then { _classes append _hp2 };
if ( ( "Apex" call VEMFr_fnc_modAppID ) in ( getDLCs 1 ) ) then { _classes append _hp3 };
_heli = createVehicle [ selectRandom _classes, _lp, [], 5, "FLY" ];
if ( _mod isEqualTo "Epoch" ) then { _heli call EPOCH_server_setVToken };
_heli setPosATL [ ( getPos _heli ) select 0, ( getPos _heli ) select 1, 750 ];
_heli flyInHeight 80;
if ( _hp4 isEqualTo "yes" ) then { _heli lock true };
_trrts = allTurrets [ _heli, false ];
_hlGrp = ( [ _lp, 1, ( ( count _trrts ) + ( _heli emptyPositions "commander" ) + 1 ), _m, _this0 ] call VEMFr_fnc_spawnVEMFrAI ) select 0;
{
if ( ( ( _heli emptyPositions "driver" ) isEqualTo 1 ) AND ( _x isEqualTo ( leader ( group _x ) ) ) ) then { _x moveInDriver _heli }
else
{
private "_path";
{
if ( isNull ( _heli turretUnit _x ) ) then { _path = _x };
} forEach _trrts;
if not ( isNil "_path" ) then { _x moveInTurret [ _heli, _path ] }
else
{
if ( ( _heli emptyPositions "commander" ) > 0 ) then { _x moveInCommander _heli };
};
};
if not ( ( backPack _x ) isEqualTo "" ) then { removeBackpack _x };
_x addBackpack "B_Parachute";
_nts pushBack _x;
} forEach ( units _hlGrp );
_wp = _hlGrp addWaypoint [ [ _lp select 0, _lp select 1, 50 ], 1, 1 ];
_wp setWaypointBehaviour "AWARE";
_wp setWaypointCombatMode "RED";
_wp setWaypointSpeed "NORMAL";
_wp setWaypointType "SAD";
//_wp setWaypointLoiterType "CIRCLE";
//_wp setWaypointLoiterRadius 200;
_hlGrp setCurrentWaypoint _wp;
[ _hlGrp ] ExecVM ( "signAI" call VEMFr_fnc_scriptPath );
};
// Place the crate if enabled
if (_ms14 isEqualTo "yes") then { call _dSpwnCrt };
// Place mines if enabled
private [ "_mnsPlcd", "_mines" ];
if ( _ms18 isEqualTo "yes" ) then
{
_mnsPlcd = [ _lp, 5, 100, _this0 ] call VEMFr_fnc_mines;
if not ( isNil "_mnsPlcd" ) then { [ _this0, 1, format [ "%1 mines placed at %2", count _mnsPlcd, _ln ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) }
else { [ _this0, 0, format [ "failed to place %1 mines at %2", count _mnsPlcd, _ln ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
};
// Wait for Mission Completion
_h = [ _nts, _this0 ] ExecVM ( "killedMonitor" call VEMFr_fnc_scriptPath );
waitUntil { if ( scriptDone _h ) then { true } else { uiSleep 1; false } };
[ "DynamicLocationInvasion", 1, format [ "mission in %1 has been completed!", _ln ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
if ( _ms12 isEqualTo "yes" ) then
{
_u = uiNamespace getVariable "VEMFrUsedLocs";
_u deleteAt (_u find _l);
};
// Broadcast
if ( _ms7 isEqualTo "yes" ) then
{
if ( _m isEqualTo 0 ) then { [ "ColorEAST", "MISSION ENDED", format [ "%1 @ %2 is now clear of %3 Guerillas", _ln, mapGridPosition _lp, worldName ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
if ( _m isEqualTo 1 ) then { [ "ColorWEST", "MISSION ENDED", format [ "%1 @ %2 is now clear of %3 Police Forces", _ln, mapGridPosition _lp, worldName ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
if ( _m isEqualTo 2 ) then { [ "ColorGrey", "MISSION ENDED", format [ "%1 @ %2 is now clear of %3 Special Forces", _ln, mapGridPosition _lp, worldName ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
if ( _m isEqualTo 3 ) then { [ "ColorWEST", "MISSION ENDED", format [ "%1 @ %2 is now clear of %3 Gendarmerie", _ln, mapGridPosition _lp, worldName ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
if ( _m isEqualTo 4 ) then { [ "ColorEAST", "MISSION ENDED", format [ "%1 @ %2 is now clear of %3 bandits", _ln, mapGridPosition _lp, worldName ] ] ExecVM ( "notificationToClient" call VEMFr_fnc_scriptPath ) };
};
// Deal with the 50s
if not ( isNil "_cl50s" ) then
{
_d = ( [ [ "missionSettings", _this0 ], [ "cal50sDelete" ] ] call VEMFr_fnc_config ) select 0;
if ( _d isEqualTo "yes" ) then { { deleteVehicle _x } forEach _cl50s };
if ( _d isEqualTo "destroy" ) then { { _x setDamage 1 } forEach _cl50s };
};
if not ( isNil "_mrkr" ) then { deleteMarker _mrkr };
if ( _ms14 isEqualTo "no" ) then { call _dSpwnCrt };
// Put a marker on the crate if enabled
if not ( isNil "_crate" ) then
{
if not ( isNull _crate ) then
{
if not ( [ getPos _crate, 3 ] call VEMFr_fnc_playerNear ) then
{
if ( _ms5 isEqualTo "yes" ) then
{
// If night, attach a chemlight
if ( sunOrMoon <= 0.35 ) then
{
[ _this0, 1, "attaching a chemlight to the crate" ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
_lightType = selectRandom _ms15;
( _lightType createVehicle ( position _crate ) ) attachTo [ _crate, [ 0, 0, 0 ] ];
} else
{
[ _this0, 1, "attaching smoke to the crate" ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
// Attach smoke
_rndmColor = selectRandom _ms16;
( createVehicle [ _rndmColor, getPos _crate, [], 0, "CAN_COLLIDE" ] ) attachTo [ _crate, [ 0, 0, 0 ] ];
};
};
if ( _ms6 isEqualTo "yes" ) then
{
private "_mrkr";
_mrkr = createMarker [ format [ "VEMF_lootCrate_ID%1", random 9000 ], position _crate ];
_mrkr setMarkerShape "ICON";
_mrkr setMarkerType "mil_box";
_mrkr setMarkerColor "colorBlack";
_mrkr setMarkerText " Loot";
[ _crate, _mrkr ] spawn
{
_crate = _this select 0;
_mrkr = _this select 1;
waitUntil { if ( [ getPos _crate, 3 ] call VEMFr_fnc_playerNear ) then { true } else { uiSleep 4; false } };
deleteMarker _mrkr;
};
};
};
} else
{
[ _this0, 0, "isNull _crate!" ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
};
} else
{
[ _this0, 0, "isNil _crate!" ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
};
// Explode or remove the mines
if not ( isNil "_mnsPlcd" ) then
{
if ( _ms19 isEqualTo "explode" ) then
{
[ _this0, _ln, _mnsPlcd ] spawn
{
uiSleep ( 5 + ( random 2 ) );
[ _this select 0, 1, format [ "starting to explode all %1 mines at %2", count ( _this select 2 ), _this select 1 ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
{
if not ( isNull _x ) then
{
_x setDamage 1;
uiSleep ( 1.25 + ( random 3.5 ) );
};
} forEach ( _this select 2 );
[ _this select 0, 1, format [ "successfully exploded all %1 mines at %2", count ( _this select 2 ), ( _this select 1 ) ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
};
_mnsPlcd = nil;
};
if ( _ms19 isEqualTo "yes" ) then
{
[ _mnsPlcd ] spawn
{
{
if not ( isNull _x ) then { deleteVehicle _x };
} forEach ( _this select 0 );
};
[ _this0, 1, format [ "successfully deleted all %1 mines at %2", count _mnsPlcd, _ln ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
};
};
// If enabled, fix all the lights
if ( _ms9 isEqualTo "yes" ) then
{
{
if ( ( damage _x ) > 0.94 ) then
{
_x setDamage 0;
uiSleep ( 1 + ( random 2 ) );
};
} forEach ( nearestObjects [ _lp, [ "Lamps_Base_F", "PowerLines_base_F", "Land_PowerPoleWooden_L_F" ], _ms10 ] );
};
} else
{ // If done waiting, and no players were detected
[ _this0, 1, format [ "invasion of %1 @ %2 timed out.", _ln, mapGridPosition _lp ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
if not ( isNil "_mrkr" ) then { deleteMarker _mrkr };
_arr = uiNamespace getVariable "VEMFrUsedLocs";
_arr deleteAt ( _arr find _l );
};
};
};
VEMFrInvasionCount = VEMFrInvasionCount - 1;
VEMFrMissionCount = VEMFrMissionCount - 1;

View File

@ -0,0 +1,32 @@
/*
Author: IT07
Description:
this function makes sure that AI spawned by VEMF does NOT become local to the server.
On detection of a local group, it will reassign it to a client or Headless Client if enabled.
Params:
none, this is a Standalone function
Returns:
nothing
*/
while { true } do
{
if ( ( count playableUnits ) > 0 ) then
{
{
if ( ( local _x ) AND ( _x getVariable [ "isVEMFrGroup", false ] ) AND ( _x getVariable [ "isVEMFrGroupLocal", false ] ) ) then
{
if ( ( count ( units _x ) ) > 0 ) then
{
// Group still has units, check if there is anyone that can be the owner
[ _x ] ExecVM ( "setGroupOwner" call VEMFr_fnc_scriptPath );
} else { deleteGroup _x };
};
if ( not ( local _x ) AND ( _x getVariable [ "isVEMFrGroupLocal", false ] ) ) then { _x setVariable [ "isVEMFrGroupLocal", false, true ] };
} forEach allGroups;
uiSleep 0.5;
} else { uiSleep 5 };
};

View File

@ -0,0 +1,49 @@
/*
Author: IT07
Description:
checks the VEMF loot table for invalid classnames. Reports to RPT if invalid classes found.
Params:
none
Returns:
nothing
*/
if ( ( "validateLoot" call VEMFr_fnc_config ) isEqualTo "yes" ) then
{ // _validateLoot is enabled, go ahead...
if ( ( "debugMode" call VEMFr_fnc_config ) < 1 ) then { [ "checkLoot", 0, "Can not validate classnames: no output allowed in RPT" ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) }
else
{
[ "checkLoot", 1, "validating VEMFr config classes..." ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
uiSleep 0.5;
_bin = [ ];
_cfgMags = [ ];
"_cfgMags pushBack ( toLower ( configName _x ) ); true" configClasses ( configFile >> "cfgMagazines" );
_cfgWpns = [ ];
"_cfgWpns pushBack ( toLower ( configName _x ) ); true" configClasses ( configFile >> "cfgWeapons" );
_cfgBags = "( toLower ( getText ( _x >> 'vehicleClass' ) ) ) isEqualTo 'backpacks'" configClasses ( configFile >> "cfgVehicles" );
{ _cfgBags set [ _forEachIndex, toLower ( configName _x ) ] } forEach _cfgBags;
_cfgGlasses = [ ];
"_cfgGlasses pushBack ( toLower ( configName _x ) ); true" configClasses ( configFile >> "CfgGlasses" );
if ( ( "Apex" call VEMFr_fnc_modAppID ) in ( getDLCs 1 ) ) then
{
{ { if not ( ( ( toLower _x ) in _cfgMags ) OR ( ( toLower _x ) in _cfgWpns ) OR ( ( toLower _x ) in _cfgBags ) OR ( ( toLower _x ) in _cfgGlasses ) ) then { _bin pushBack ( toLower _x ) } } forEach _x } forEach ( [ [ "aiInventory", "ApexBandits" ], [ "backpacks", "faceWear", "headGear", "launchers", "rifles", "uniforms", "vests" ] ] call VEMFr_fnc_config );
{ { if not ( ( ( toLower _x ) in _cfgMags ) OR ( ( toLower _x ) in _cfgWpns ) OR ( ( toLower _x ) in _cfgBags ) OR ( ( toLower _x ) in _cfgGlasses ) ) then { _bin pushBack ( toLower _x ) } } forEach _x } forEach ( [ [ "aiInventory", "Gendarmerie" ], [ "headGear", "faceWear", "pistols", "rifles", "uniforms", "vests" ] ] call VEMFr_fnc_config );
{ { _x0 = toLower ( _x select 0 ); if not ( ( _x0 in _cfgMags ) OR ( _x0 in _cfgWpns ) OR ( _x0 in _cfgBags ) OR ( _x in _cfgGlasses ) ) then { _bin pushBack ( toLower _x ) } } forEach _x } forEach ( [ [ "missionSettings", "DynamicLocationInvasion", "crateLootApex" ], [ "attachments", "backpacks", "headGear", "headGearSpecial", "magazines", "pistols", "rifles", "vests" ] ] call VEMFr_fnc_config );
};
{ { if not ( ( ( toLower _x ) in _cfgMags ) OR ( ( toLower _x ) in _cfgWpns ) OR ( ( toLower _x ) in _cfgBags ) OR ( ( toLower _x ) in _cfgGlasses ) ) then { _bin pushBack ( toLower _x ) } } forEach _x } forEach ( [ [ "aiInventory", "Guerilla" ], [ "backpacks", "headGear", "launchers", "pistols", "rifles", "uniforms", "vests" ] ] call VEMFr_fnc_config );
{ { if not ( ( ( toLower _x ) in _cfgMags ) OR ( ( toLower _x ) in _cfgWpns ) OR ( ( toLower _x ) in _cfgBags ) OR ( ( toLower _x ) in _cfgGlasses ) ) then { _bin pushBack ( toLower _x ) } } forEach _x } forEach ( [ [ "aiInventory", "PoliceRegular" ], [ "headGear", "pistols", "rifles", "uniforms", "vests" ] ] call VEMFr_fnc_config );
{ { if not ( ( ( toLower _x ) in _cfgMags ) OR ( ( toLower _x ) in _cfgWpns ) OR ( ( toLower _x ) in _cfgBags ) OR ( ( toLower _x ) in _cfgGlasses ) ) then { _bin pushBack ( toLower _x ) } } forEach _x } forEach ( [ [ "aiInventory", "PoliceSpecialForces" ], [ "faceWear", "headGear", "pistols", "rifles", "uniforms", "vests" ] ] call VEMFr_fnc_config );
{ { _x0 = toLower ( _x select 0 ); if not ( ( _x0 in _cfgMags ) OR ( _x0 in _cfgWpns ) OR ( _x0 in _cfgBags ) OR ( _x in _cfgGlasses ) ) then { _bin pushBack _x } } forEach _x } forEach ( [ [ "missionSettings", "DynamicLocationInvasion", "crateLootVanilla" ], [ "attachments", "backpacks", "headGear", format [ "itemsLoot%1", call VEMFr_fnc_whichMod ], "magazines", "pistols", "rifles", "vests" ] ] call VEMFr_fnc_config );
if ( ( count _bin ) isEqualTo 0 ) then { [ "checkLoot", 1, "All classnames are valid! :)" ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) }
else { [ "checkLoot", 0, format [ "invalid classes found in config! | %1", _bin ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
};
};

View File

@ -0,0 +1,93 @@
/*
Author: IT07
Description:
Adds magazines to given unit's vest/backpack if it flairTypes
Params:
_this: ARRAY
_this select 0: OBJECT - unit to give ammo to
_this select 1: STRING - primaryWeapon classname
_this select 2: STRING - secondaryWeapon classname
_this select 3: STRING - handGunWeapon classname
Returns:
nothing
*/
params [ "_this0", "_this1", "_this2", "_this3" ];
if not ( _this1 isEqualTo "" ) then // primaryWeapon
{
private _m = selectRandom ( getArray ( configFile >> "CfgWeapons" >> _this1 >> "magazines" ) );
for "_l" from 1 to 5 do
{
if not ( _this0 canAdd _m ) exitWith { };
_this0 addItem _m;
};
_this0 addWeapon _this1;
_this0 selectWeapon _this1;
private _p = [ 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1 ];
if ( ( selectRandom _p ) isEqualTo 1 ) then
{ // Select random scope
private _a = getArray ( configFile >> "CfgWeapons" >> _this1 >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems" );
if ( ( "allowTWS" call VEMFr_fnc_config ) isEqualTo "no" ) then
{
private _b = ( [ [ "blacklists", "scopes" ], [ "thermal" ] ] call VEMFr_fnc_config ) select 0;
private _bin = [ ];
{
if ( ( ( ( toLower _x ) find "tws" ) > -1 ) OR ( _x in _b ) ) then { _bin pushBack _x };
} forEach _a;
{ _a deleteAt ( _a find _x ) } forEach _bin;
};
_this0 addPrimaryWeaponItem ( selectRandom _a );
};
if ( ( selectRandom _p ) isEqualTo 1 ) then
{ // Select random muzzle
_this0 addPrimaryWeaponItem ( selectRandom ( getArray ( configFile >> "CfgWeapons" >> _this1 >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems" ) ) );
};
if ( ( selectRandom _p ) isEqualTo 1 ) then
{ // Select random pointer
_this0 addPrimaryWeaponItem ( selectRandom ( getArray ( configFile >> "CfgWeapons" >> _this1 >> "WeaponSlotsInfo" >> "PointerSlot" >> "compatibleItems" ) ) );
};
if ( ( selectRandom _p ) isEqualTo 1 ) then
{ // Select random bipod
_this0 addPrimaryWeaponItem ( selectRandom ( getArray ( configFile >> "CfgWeapons" >> _this1 >> "WeaponSlotsInfo" >> "UnderbarrelSlot" >> "compatibleItems" ) ) );
};
};
if not ( _this2 isEqualTo "" ) then // secondaryWeapon
{
if not ( ( backPack _this0 ) isEqualTo "" ) then
{
private _m = selectRandom ( getArray ( configFile >> "CfgWeapons" >> _this2 >> "magazines" ) );
for "_l" from 1 to 3 do
{
if not ( _this0 canAdd _m ) exitWith { };
_this0 addItem _m;
};
};
_this0 addWeapon _this2;
};
if not ( _this3 isEqualTo "" ) then // handgunWeapon
{
private _m = selectRandom ( getArray ( configFile >> "CfgWeapons" >> _this3 >> "magazines" ) );
for "_l" from 1 to 4 do
{
if not ( _this0 canAdd _m ) exitWith { };
_this0 addItem _m;
};
_this0 addWeapon _this3;
_p = [ 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1 ];
if ( ( selectRandom _p ) isEqualTo 1 ) then
{ // Select random scope
_this0 addHandgunItem ( selectRandom ( getArray ( configFile >> "CfgWeapons" >> _this3 >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems" ) ) );
};
if ( ( selectRandom _p ) isEqualTo 1 ) then
{ // Select random muzzle
_this0 addHandgunItem ( selectRandom ( getArray ( configFile >> "CfgWeapons" >> _this3 >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems" ) ) );
};
};

View File

@ -0,0 +1,63 @@
/*
Author: IT07
Description:
handles the cleanup of AI gear and handles kill effects
Params:
_this select 0: OBJECT (the AI)
*/
_t = _this select 0;
( [ [ "aiCleanup" ], [ "removeLaunchers", "aiDeathRemovalEffect", "removeHeadGear" ] ] call VEMFr_fnc_config ) params [ "_ms0", "_ms1", "_ms2" ];
if ( _ms0 isEqualTo "yes" ) then
{
_sw = secondaryWeapon _t;
if not ( _sw isEqualTo "" ) then
{
_t removeWeaponGlobal _sw;
_mssls = getArray ( configFile >> "cfgWeapons" >> _sw >> "magazines" );
{
if ( _x in _mssls ) then { _t removeMagazineGlobal _x };
} forEach ( magazines _t );
} else
{
{
_xx = _x;
{
_xxx = _x;
if ( _xxx isKindOf [ "Launcher", ( configFile >> "CfgWeapons" ) ] ) then
{
clearWeaponCargoGlobal _xx;
_mssls = getArray ( configFile >> "cfgWeapons" >> _xxx >> "magazines" );
{ if ( _x in _mssls ) then { _t removeMagazineGlobal _x } } forEach ( magazines _t );
};
} forEach ( weaponCargo _xx );
} forEach ( nearestObjects [ _t, [ "GroundWeaponHolder", "WeaponHolderSimulated" ], 3.5 ] );
};
};
if ( _ms2 isEqualTo "yes" ) then { removeHeadGear _t };
if ( _ms1 isEqualTo "yes" ) then // If killEffect enabled
{
playSound3D [ "A3\Missions_F_Bootcamp\data\sounds\vr_shutdown.wss", _t, false, getPosASL _t, 2, 1, 60 ];
for "_u" from 1 to 12 do
{
if not ( isObjectHidden _t ) then { _t hideObjectGlobal true }
else { _t hideObjectGlobal false };
uiSleep 0.12;
};
_t hideObjectGlobal true;
removeAllWeapons _t;
// Automatic cleanup yaaay
deleteVehicle _t;
} else
{
_mod = call VEMFr_fnc_whichMod;
if ( _mod isEqualTo "Exile" ) then
{
_v = ( [ [ _mod ],[ "aiMoney" ] ] call VEMFr_fnc_config ) select 0;
if ( _v > 0 ) then { _t setVariable [ "exilemoney", 2 + ( ( round random _v ) - 2 ), true ] };
};
};

View File

@ -0,0 +1,163 @@
/*
Author: IT07
Description:
handles the things that need to be rewarded when player kills an AI
Params:
*/
params [ "_t", "_nt", "_k", "_nk" ];
if ( isPlayer _k ) then
{
scopeName "isPlayer";
private [ "_rspct", "_crpt" ];
_mod = call VEMFr_fnc_whichMod;
if ( _mod isEqualTo "Exile" ) then
{
_rspct =
{
_arr = [ [ ] ];
( _arr select 0 ) pushBack [ ( selectRandom [ "AI WACKED", "AI CLIPPED", "AI WIPED", "AI ERASED", "AI LYNCHED", "AI WRECKED", "AI SNUFFED", "AI WASTED", "AI ZAPPED" ] ), _rw ];
_dist = _t distance _k;
_bns = call
{
private "_r";
if ( _dist <= 10 ) exitWith { _r = 25; _r };
if ( _dist <= 25 ) exitWith { _r = 23; _r };
if ( _dist <= 45 ) exitWith { _r = 20; _r };
if ( _dist <= 65 ) exitWith { _r = 18; _r };
if ( _dist <= 85 ) exitWith { _r = 16; _r };
if ( _dist <= 100 ) exitWith { _r = 14; _r };
if ( _dist <= 150 ) exitWith { _r = 12; _r };
if ( _dist <= 175 ) exitWith { _r = 14; _r };
if ( _dist <= 200 ) exitWith { _r = 16; _r };
if ( _dist <= 250 ) exitWith { _r = 18; _r };
if ( _dist <= 350 ) exitWith { _r = 21; _r };
if ( _dist <= 475 ) exitWith { _r = 24; _r };
if ( _dist > 475 ) exitWith { _r = 25; _r };
};
( _arr select 0 ) pushBack [ "BONUS", _bns ];
_score = ( _k getVariable [ "ExileScore", 0 ] ) + ( ( ( _arr select 0 ) select 1 ) select 1 ) + _rw;
[ _k, "showFragRequest", _arr ] call ExileServer_system_network_send_to;
_k setVariable [ "ExileScore", _score ];
ExileClientPlayerScore = _score;
( owner _k ) publicVariableClient "ExileClientPlayerScore";
ExileClientPlayerScore = nil;
_kllCnt = ( _k getVariable [ "ExileKills" , 0 ] ) + 1;
_k setVariable [ "ExileKills", _kllCnt ];
ExileClientPlayerKills = _kllCnt;
( owner _k ) publicVariableClient "ExileClientPlayerKills";
ExileClientPlayerKills = nil;
format [ "addAccountKill:%1", getPlayerUID _k ] call ExileServer_system_database_query_fireAndForget;
format ["setAccountScore:%1:%2", _score, getPlayerUID _k ] call ExileServer_system_database_query_fireAndForget;
};
};
if ( _mod isEqualTo "Epoch" ) then
{
_crpt =
{
_ffct =
{
_vrs = _k getVariable [ "VARS", nil ];
_crptId = EPOCH_customVars find "Crypto";
_nwCrpt = ( _vrs select _crptId ) + _rwrd + ( ( [ [ _mod ], [ "cryptoReward" ] ] call VEMFr_fnc_config ) select 0 );
_vrs set [ _crptId, _nwCrpt ];
_k setVariable [ "VARS", _vrs ];
_nwCrpt remoteExec [ "EPOCH_effectCrypto", owner _k ];
};
_rwrd = 0;
_dist = _t distance _k;
if ( _dist < 2500 ) then
{
scopeName "dist";
if ( _dist <= 5 ) then { _rwrd = 25; call _ffct; breakOut "dist" };
if ( _dist <= 10 ) then { _rwrd = 15; call _ffct; breakOut "dist" };
if ( _dist <= 50 ) then { _rwrd = 15; call _ffct; breakOut "dist" };
if ( _dist <= 100 ) then { _rwrd = 20; call _ffct; breakOut "dist" };
if ( _dist <= 200 ) then { _rwrd = 25; call _ffct; breakOut "dist" };
if ( _dist <= 500 ) then { _rwrd = 30; call _ffct; breakOut "dist" };
if ( _dist <= 1000 ) then { _rwrd = 45; call _ffct; breakOut "dist" };
if ( _dist <= 2000 ) then { _rwrd = 50; call _ffct; breakOut "dist" };
if ( _dist > 2000 ) then { _rwrd = 65; call _ffct; breakOut "dist" };
};
};
};
_rw = ( [ [ "Exile" ], [ "respectReward" ] ] call VEMFr_fnc_config ) select 0;
_cw = ( [ [ "Epoch" ], [ "cryptoReward" ] ] call VEMFr_fnc_config ) select 0;
_sk = "sayKilled" call VEMFr_fnc_config;
if ( _k isKindOf "Man" ) then // Roadkill or regular kill
{
if ( ( vehicle _k ) isEqualTo _k ) then // If on foot
{
if ( ( vehicle _t ) isEqualTo _t ) then
{
if ( ( _mod isEqualTo "Exile" ) AND ( _rw > 0 ) ) then { call _rspct };
if ( ( _mod isEqualTo "Epoch" ) AND ( _cw > 0 ) ) then { call _crpt };
if ( _sk isEqualTo "yes" ) then { [ _t, _nt, _k, _nk ] ExecVM ( "sayKilled" call VEMFr_fnc_scriptPath ) };
} else
{
if ( ( typeOf ( vehicle _t ) ) isEqualTo "Steerable_Parachute_F" ) then
{
if ( ( "logCowardKills" call VEMFr_fnc_config ) isEqualTo "yes") then { [ "fn_aiKilled", 1, format [ "a coward (%1 @ %2) killed a parachuting AI", _nk, mapGridPosition _k ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
} else
{
if ( ( _mod isEqualTo "Exile" ) AND ( _rw > 0 ) ) then { call _rspct };
if ( ( _mod isEqualTo "Epoch" ) AND ( _cw > 0 ) ) then { call _crpt };
if ( _sk isEqualTo "yes" ) then { [ _t, _nt, _k, _nk] ExecVM ( "sayKilled" call VEMFr_fnc_scriptPath ) };
};
};
} else // If in vehicle (a.k.a. roadkill)
{
if ( ( "punishRoadKills" call VEMFr_fnc_config ) isEqualTo "yes" ) then
{
if ( _mod isEqualTo "Exile" ) then
{
_pnsh = ( [ [ "Exile" ], [ "respectRoadKillDeduct" ] ] call VEMFr_fnc_config ) select 0;
_nwRspct = ( _k getVariable [ "ExileScore", 0 ] ) - _pnsh;
_k setVariable [ "ExileScore", _nwRspct ];
ExileClientPlayerScore = _nwRspct;
( owner _k ) publicVariableClient "ExileClientPlayerScore";
ExileClientPlayerScore = nil;
[ _k, "showFragRequest", [ [ [ "ROADKILL..." ], [ "Penalty:", -_pnsh ] ] ] ] call ExileServer_system_network_send_to;
format [ "setAccountScore:%1:%2", _nwRspct, getPlayerUID _k ] call ExileServer_system_database_query_fireAndForget;
if ( ( "sayKilled" call VEMFr_fnc_config ) isEqualTo "yes" ) then { [ format [ "%1 roadkilled %2", _nk, if ( ( "sayKilledName" call VEMFr_fnc_config ) isEqualTo "yes" ) then { _nt + " (AI)" } else { "an AI" } ] ] ExecVM ( "systemChatToClient" call VEMFr_fnc_scriptPath ) };
};
if ( _mod isEqualTo "Epoch" ) then
{
_vrs = _k getVariable [ "VARS", nil ];
_crptId = EPOCH_customVars find "Crypto";
_nwCrpt = ( _vrs select _crptId ) - ( ( [ [ "Epoch" ], [ "cryptoRoadKillPunish" ] ] call VEMFr_fnc_config ) select 0 );
_vrs set [ _crptId, _nwCrpt ];
_k setVariable [ "VARS", _vrs ];
_nwCrpt remoteExec [ "EPOCH_effectCrypto", owner _k ];
};
};
};
} else // If kill from vehicle (NOT a roadkill)
{
if ( ( typeOf ( vehicle _t ) ) isEqualTo "Steerable_Parachute_F" ) then
{
if ( "logCowardKills" call VEMFr_fnc_config isEqualTo "yes" ) then
{
[ "fn_aiKilled", 1, format [ "a coward (%1 @ %2) killed a parachuting AI", _nk, mapGridPosition _k ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
};
} else
{
_k = effectiveCommander _k;
if ( ( _mod isEqualTo "Exile" ) AND ( _rw > 0 ) ) then { call _rspct };
if ( ( _mod isEqualTo "Epoch" ) AND ( _cw > 0 ) ) then { call _crpt };
if ( _sk isEqualTo "yes" ) then { [ _t, _nt, _k, _nk ] ExecVM ( "sayKilled" call VEMFr_fnc_scriptPath ) };
};
};
};

View File

@ -0,0 +1,28 @@
/*
Author: IT07
Description:
will loop until all given objects are dead
Params:
_this select 0: ARRAY - array of objects to monitor
_this select 1: STRING - name of mission (must match config name)
Returns:
nothing
*/
params [ "_a", "_m" ];
if ( ( count _a ) > 0 ) then
{
_k = 0;
_cnt = count _a;
_kp = round ( ( ( [ [ "missionSettings", _m ], [ "killPercentage" ] ] call VEMFr_fnc_config ) select 0 ) / 100 *_cnt );
while {true} do
{
scopeName "while";
_k = 0;
{ if ( ( ( damage _x ) isEqualTo 1 ) OR ( isNull _x ) ) then { _k = _k + 1 } } forEach _a;
if ( _k < _kp ) then { uiSleep 3 } else { breakOut "while" };
};
};

View File

@ -0,0 +1,213 @@
/*
Author: IT07
Description:
gives inventory to given units
Param:
_this: ARRAY
_this select 0: ARRAY - units to load inventory for
_this select 1: STRING - must be in missionList or addons
_this select 2: SCALAR - inventory mode
Returns:
BOOLEAN - true if nothing failed
*/
params [ "_this0", "_this1", "_this2" ];
if ( _this2 isEqualTo -1 ) then // Whatever
{
if ( _this1 isEqualTo "SimplePatrol" ) then
{
// Define settings
( [ [ "addonSettings", "SimplePatrol", "AIequipment" ], [ "backpacks", "faceWear", "headGear", "pistols", "rifles", "uniforms", "vests" ] ] call VEMFr_fnc_config ) params [ "_packs", "_faceWr", "_headGr", "_pstls", "_rfles", "_unifs", "_vests" ];
{
private _xx = _x;
// Strip it
removeVest _xx;
_xx addVest ( selectRandom _vests );
removeBackpack _xx;
removeGoggles _xx;
_xx addGoggles ( selectRandom _faceWr );
removeHeadGear _xx;
_xx addHeadGear ( selectRandom _headGr );
if ( ( count _unifs ) > 0 ) then
{
removeUniform _xx;
_xx forceAddUniform ( selectRandom _unifs ); // Give the poor naked guy some clothing :)
};
removeAllWeapons _xx;
removeAllItems _xx;
if ( ( ( [ [ "addonSettings", "SimplePatrol" ], [ "removeAllAssignedItems" ] ] call VEMFr_fnc_config ) select 0 ) isEqualTo "yes" ) then { removeAllAssignedItems _xx };
[ _xx, ( selectRandom _rfles ), "", ( selectRandom _pstls ) ] ExecVM ( "giveFire" call VEMFr_fnc_scriptPath );
} forEach _this0;
};
};
if ( _this2 isEqualTo 0 ) then // Guerilla
{
// Define settings
( [ [ "aiInventory", "Guerilla" ], [ "backpacks", "faceWear", "headGear", "launchers", "rifles", "uniforms", "vests" ] ] call VEMFr_fnc_config) params [ "_packs", "_faceWr", "_headGr", "_lnchers", "_rfles", "_unifs", "_vests" ];
{
private _xx = _x;
// Strip it
if ( ( "removeAllAssignedItems" call VEMFr_fnc_config ) isEqualTo "yes" ) then { removeAllAssignedItems _xx };
removeAllItems _xx;
removeAllWeapons _xx;
removeBackpack _xx;
if ( _this1 isEqualTo "BaseAttack" ) then { _xx addBackpack "B_Parachute" };
removeVest _xx;
_xx addVest ( selectRandom _vests );
removeGoggles _xx;
_xx addGoggles ( selectRandom _faceWr );
removeHeadGear _xx;
_xx addHeadGear ( selectRandom _headGr );
if ( ( count _unifs ) > 0 ) then
{
removeUniform _xx;
_xx forceAddUniform ( selectRandom _unifs ); // Give the poor naked guy some clothing :)
};
if ( _this1 in ( "missionList" call VEMFr_fnc_config ) ) then
{
_ls = [ [ "missionSettings", _this1 ], [ "allowLaunchers", "hasLauncherChance" ] ] call VEMFr_fnc_config;
if ( ( _ls select 0 ) isEqualTo "yes" ) then
{
_lc = _ls select 1;
if ( ( _lc isEqualTo 100 ) OR ( ( ceil random ( 100 / _lc ) isEqualTo ( ceil random ( 100 / _lc ) ) ) ) ) then
{
if not ( _this1 isEqualTo "BaseAttack" ) then { _xx addBackpack ( selectRandom _packs ) };
private _g = selectRandom _lnchers;
_a = getArray ( configFile >> "cfgWeapons" >> _g >> "magazines" );
if ( ( count _a ) > 2 ) then { _a resize 2 };
for "_i" from 0 to ( 2 + ( round random 1 ) ) do { _xx addMagazine ( selectRandom _a ) };
_xx addWeapon _g;
};
};
};
[ _xx, ( selectRandom _rfles ), "", "" ] ExecVM ( "giveFire" call VEMFr_fnc_scriptPath );
} forEach _this0;
};
if ( _this2 isEqualTo 1 ) then // Regular police
{
( [ [ "aiInventory", "PoliceRegular" ], [ "headGear", "pistols", "rifles" , "uniforms", "vests" ] ] call VEMFr_fnc_config ) params [ "_headGr", "_pstls", "_rfles", "_unifs", "_vests" ];
{
private _xx = _x;
// Strip it
if ( ( "removeAllAssignedItems" call VEMFr_fnc_config ) isEqualTo "yes" ) then { removeAllAssignedItems _xx };
removeAllItems _xx;
removeAllWeapons _xx;
removeUniform _xx;
_xx forceAddUniform ( selectRandom _unifs );
removeVest _xx;
_xx addVest ( selectRandom _vests );
removeBackpack _xx;
if ( _this1 isEqualTo "BaseAttack" ) then { _xx addBackpack "B_Parachute" };
removeHeadGear _xx;
_xx addHeadGear ( selectRandom _headGr );
removeGoggles _xx;
[ _xx, ( selectRandom _rfles ), "", ( selectRandom _pstls ) ] ExecVM ( "giveFire" call VEMFr_fnc_scriptPath );
} forEach _this0;
};
if ( _this2 isEqualTo 2 ) then // Police Special Forces
{
( [ [ "aiInventory", "PoliceSpecialForces" ], [ "faceWear", "headGear", "pistols", "rifles", "uniforms", "vests" ] ] call VEMFr_fnc_config ) params [ "_faceWr", "_headGrr", "_pstls", "_rfles", "_unifs", "_vests" ];
{
private _xx = _x;
// Strip it
if ( ( "removeAllAssignedItems" call VEMFr_fnc_config ) isEqualTo "yes" ) then { removeAllAssignedItems _xx };
removeAllItems _xx;
removeAllWeapons _xx;
removeBackpack _xx;
if ( _this1 isEqualTo "BaseAttack" ) then { _xx addBackpack "B_Parachute" };
removeGoggles _xx;
_xx addGoggles ( selectRandom _faceWr );
removeHeadGear _xx;
_xx addHeadGear ( selectRandom _headGrr );
removeUniform _xx;
_xx forceAddUniform ( selectRandom _unifs );
removeVest _xx;
_xx addVest ( selectRandom _vests );
[ _xx, ( selectRandom _rfles ), "", ( selectRandom _pstls ) ] ExecVM ( "giveFire" call VEMFr_fnc_scriptPath ); // Give this guy some fire power
} forEach _this0;
};
if ( _this2 isEqualTo 3 ) then // Gendarmerie
{
private [ "_rfles", "_pstls" ];
( [ [ "aiInventory", "Gendarmerie" ], [ "headGear", "faceWear", "pistols", "rifles", "uniforms", "vests" ] ] call VEMFr_fnc_config ) params [ "_headGrr" , "_facewr", "_pstls", "_rfles", "_unifs", "_vests" ];
{
private [ "_xx", "_g", "_pw", "_hw" ];
_xx = _x;
// Strip it
if ( ( "removeAllAssignedItems" call VEMFr_fnc_config ) isEqualTo "yes" ) then { removeAllAssignedItems _xx };
removeAllItems _xx;
removeAllWeapons _xx;
removeBackpack _xx;
if ( _this1 isEqualTo "BaseAttack" ) then { _xx addBackpack "B_Parachute" };
removeGoggles _xx;
_xx addGoggles ( selectRandom _facewr );
removeHeadGear _xx;
_xx addHeadGear ( selectRandom _headGrr );
removeUniform _xx;
_xx forceAddUniform ( selectRandom _unifs );
removeVest _xx;
_xx addVest ( selectRandom _vests );
// Give this guy some fire power
[ _xx, ( selectRandom _rfles ), "", ( selectRandom _pstls ) ] ExecVM ( "giveFire" call VEMFr_fnc_scriptPath );
} forEach _this0;
};
if ( _this2 isEqualTo 4 ) then // Raiders
{
private [ "_s", "_unifs", "_headGr", "_vests", "_packs", "_lnchers", "_rfles", "_pstls", "_ls", "_lc", "_a" ];
// Define settings
( [ [ "aiInventory", "ApexBandits" ], [ "backpacks", "headGear", "launchers", "rifles", "uniforms", "vests" ] ] call VEMFr_fnc_config) params [ "_packs", "_headGrr", "_lnchers", "_rfles", "_unifs", "_vests" ];
{
private [ "_xx", "_g", "_a", "_pw" ];
_xx = _x;
// Strip it
if ( ( "removeAllAssignedItems" call VEMFr_fnc_config ) isEqualTo "yes" ) then { removeAllAssignedItems _xx };
removeAllWeapons _xx;
removeAllItems _xx;
removeBackpack _xx;
if ( _this1 isEqualTo "BaseAttack" ) then { _xx addBackpack "B_Parachute" };
removeGoggles _xx;
removeHeadGear _xx;
_xx addHeadGear ( selectRandom _headGrr );
removeVest _xx;
_xx addVest ( selectRandom _vests );
if ( ( count _unifs ) > 0 ) then
{
removeUniform _xx;
_xx forceAddUniform ( selectRandom _unifs ); // Give the poor naked guy some clothing :)
};
if ( _this1 in ( "missionList" call VEMFr_fnc_config ) ) then
{
_ls = [ [ "missionSettings", _this1 ], [ "allowLaunchers", "hasLauncherChance" ] ] call VEMFr_fnc_config;
if ( ( _ls select 0 ) isEqualTo "yes" ) then
{
_lc = _ls select 1;
if ( ( _lc isEqualTo 100 ) OR ( ( ceil random ( 100 / _lc ) isEqualTo ( ceil random ( 100 / _lc ) ) ) ) ) then
{
if not ( _this1 isEqualTo "BaseAttack" ) then
{
_g = selectRandom _packs;
_xx addBackpack _g;
};
_g = selectRandom _lnchers;
_a = getArray (configFile >> "cfgWeapons" >> _g >> "magazines");
if ( ( count _a ) > 2 ) then { _a resize 2 };
for "_i" from 0 to ( 2 + ( round random 1 ) ) do { _xx addMagazine (selectRandom _a) };
_xx addWeapon _g;
};
};
};
[ _xx, ( selectRandom _rfles ), "", "" ] ExecVM ( "giveFire" call VEMFr_fnc_scriptPath ); // Give this guy some fire power
} forEach _this0;
};

View File

@ -0,0 +1,139 @@
/*
Author: IT07
Description:
loads loot crate inventory
Params:
_this: ARRAY
_this select 0: OBJECT - the crate
_this select 1: STRING - name of the location where crate is
_this select 2: ARRAY - position of location where crate is
Returns:
nothing
*/
params [ "_obj", "_locName", "_locPos" ];
_obj setVariable [ "isVEMFrCrate", 1, true ];
clearBackpackCargoGlobal _obj;
clearItemCargoGlobal _obj;
clearMagazineCargoGlobal _obj;
clearWeaponCargoGlobal _obj;
( [
[ "missionSettings", "DynamicLocationInvasion", "crateSettings" ],
[ "rifleSlotsMax", "rifleSlotsMin", "pistolSlotsMax", "pistolSlotsMin", "magSlotsMax", "magSlotsMin", "attSlotsMax", "attSlotsMin", "itemSlotsMax", "itemSlotsMin",
"vestSlotsMax", "vestSlotsMin", "headGearSlotsMax", "headGearSlotsMin", "bagSlotsMax", "bagSlotsMin" ]
] call VEMFr_fnc_config ) params [ "_cs0", "_cs1", "_cs2", "_cs3", "_cs4", "_cs5", "_cs6", "_cs7", "_cs8", "_cs9", "_cs10", "_cs11", "_cs12", "_cs13", "_cs14", "_cs15" ];
( [
[ "missionSettings", "DynamicLocationInvasion", "crateLootVanilla" ],
[ "attachments", "backpacks", "headGear", format [ "items%1", call VEMFr_fnc_whichMod ], "magazines", "pistols", "rifles", "vests" ]
] call VEMFr_fnc_config ) params [ "_vl0", "_vl1", "_vl2", "_vl3", "_vl4", "_vl5", "_vl6", "_vl7" ];
if ( ( call VEMFr_fnc_whichMod ) isEqualTo "Exile" ) then
{
private "_c";
_c = ( [ [ "Exile" ], [ "crateMoney" ] ] call VEMFr_fnc_config ) select 0;
if ( _c > 0 ) then { _obj setVariable [ "ExileMoney", ( ( _c / 2 ) + ( round random ( _c / 2 ) ) ), true ] };
};
if ( ( "Apex" call VEMFr_fnc_modAppID ) in ( getDLCs 1 ) ) then
{
private [ "_el0", "_el1", "_el2", "_el3", "_el4", "_el5", "_el6", "_el7" ];
([
[ "missionSettings", "DynamicLocationInvasion", "crateLootApex" ],
[ "attachments", "backpacks", "headGear", "headGearSpecial", "magazines", "pistols", "rifles", "vests" ]
] call VEMFr_fnc_config ) params [ "_el0", "_el1", "_el2", "_el3", "_el4", "_el5", "_el6", "_el7" ];
_vl0 append _el0;
_vl1 append _el1;
_vl2 append _el2;
if ( ( ( [ [ "missionSettings", "DynamicLocationInvasion", "crateSettings" ],[ "allowThermalHelmets" ] ] call VEMFr_fnc_config ) select 0 ) isEqualTo "yes" ) then { _vl2 append _el3 };
_vl4 append _el4;
_vl5 append _el5;
_vl6 append _el6;
_vl7 append _el7;
};
_bad = ( [ [ "blacklists", "loot" ],[ "classes" ] ] call VEMFr_fnc_config ) select 0;
if ( ( round random 30 ) > 1 ) then
{
// Rifles
for "_l" from 0 to ( ( _cs0 - _cs1 ) + ( floor random _cs1 ) ) do
{
_g = selectRandom _vl6;
if not ( ( _g select 0 ) in _bad ) then { _obj addWeaponCargoGlobal [ _g select 0, ( 1 + ( floor random ( _g select 1 ) ) ) ] };
};
};
if ( ( round random 10 ) > 1 ) then
{
// Pistols
for "_l" from 0 to ( ( _cs2 - _cs3 ) + ( floor random _cs3 ) ) do
{
_g = selectRandom _vl5;
if not ( ( _g select 0 ) in _bad ) then { _obj addWeaponCargoGlobal [ _g select 0, ( 1 + ( floor random ( _g select 1 ) ) ) ] };
};
};
if ( ( round random 2 ) isEqualTo 1 ) then
{
// Magazines
for "_l" from 0 to ( ( _cs4 - _cs5 ) + ( floor random _cs5 ) ) do
{
_g = selectRandom _vl4;
if not ( ( _g select 0 ) in _bad ) then { _obj addMagazineCargoGlobal [ _g select 0, ( 1 + ( floor random ( _g select 1 ) ) ) ] };
};
};
if ( ( round random 4 ) isEqualTo 1 ) then
{
// Weapon attachments
for "_l" from 0 to ( ( _cs6 - _cs7 ) + ( floor random _cs7) ) do
{
_g = selectRandom _vl0;
if not ( ( _g select 0 ) in _bad ) then { _obj addItemCargoGlobal [ _g select 0, ( 1 + ( floor random ( _g select 1 ) ) ) ] };
};
};
// Items
for "_l" from 0 to ( ( _cs8 - _cs9 ) + ( floor random _cs9 ) ) do
{
_g = selectRandom _vl3;
if not ( ( _g select 0 ) in _bad ) then { _obj addItemCargoGlobal [ _g select 0, ( 1 + ( floor random ( _g select 1 ) ) ) ] };
};
if ( ( round random 4 ) isEqualTo 1 ) then
{
// Vests
for "_l" from 0 to ( ( _cs10 - _cs11 ) + ( floor random _cs11 ) ) do
{
_g = selectRandom _vl7;
if not ( ( _g select 0 ) in _bad ) then { _obj addItemCargoGlobal [ _g select 0, ( 1 + ( floor random ( _g select 1 ) ) ) ] };
};
};
if ( ( round random 2 ) isEqualTo 1 ) then
{
// Helmets / caps / berets / bandanas
for "_l" from 0 to ( ( _cs12 - _cs13 ) + ( floor random _cs13 ) ) do
{
_g = selectRandom _vl2;
if not ( ( _g select 0 ) in _bad ) then { _obj addItemCargoGlobal [ _g select 0, ( 1 + ( floor random ( _g select 1 ) ) ) ] };
};
};
if ( ( round random 3 ) isEqualTo 1 ) then
{
// Backpacks
for "_l" from 0 to ( ( _cs14 - _cs15 ) + ( floor random _cs15 ) ) do
{
_g = selectRandom _vl1;
if not ( ( _g select 0 ) in _bad ) then { _obj addBackpackCargoGlobal [ _g select 0, ( 1 + ( floor random ( _g select 1 ) ) ) ] };
};
};
["loadLoot", 1, format [ "loot loaded into crate located in '%1' at %2", _locName, mapGridPosition _obj ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );

View File

@ -0,0 +1,44 @@
/*
Author: IT07
Description:
will log given data if debug is enabled
Params:
_this: ARRAY - contains data required for logging
_this select 0: STRING - prefix. Use "" if none
_this select 1: SCALAR - 0 = error, 1 = info, 2 = special
_this select 2: STRING - the thing to log
Returns:
nothing (use spawn, not call)
*/
if ( ( "debugMode" call VEMFr_fnc_config ) > 0 ) then
{
scopeName "_top";
params [ "_p", "_t", "_l" ];
_do = { diag_log text format [ "IT07: [VEMFr] %1 -- %2: %3", _p, _this, _l ] };
_m = "debugMode" call VEMFr_fnc_config;
if ( _t isEqualTo 0 ) then
{
if ( ( _m isEqualTo 1 ) OR ( _m isEqualTo 3 ) ) then
{
"ERROR" call _do;
breakOut "_top";
};
};
if ( _t isEqualTo 1 ) then
{
if ( ( _m isEqualTo 2 ) OR ( _m isEqualTo 3 ) ) then
{
"INFO" call _do;
breakOut "_top";
};
};
if ( _t isEqualTo 2 ) then // This bypasses _m setting. Always logs given params even if debugMode is set to 0
{
"SYSTEM" call _do;
breakOut "_top";
};
};

View File

@ -0,0 +1,64 @@
/*
Author: IT07
Description:
Handles the start and timeout of missions
Params:
none
Returns:
nothing
*/
scopeName "outer";
_mgm = "maxGlobalMissions" call VEMFr_fnc_config;
[ "missionTimer", 1, format [ "global mission-limit is set at: %1", _mgm ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
_minNew = "minNew" call VEMFr_fnc_config;
if ( _minNew > -1 ) then
{
_maxNew = "maxNew" call VEMFr_fnc_config;
if ( _maxNew > 0 ) then
{
_ml = "missionList" call VEMFr_fnc_config;
if ( ( count _ml ) > 0 ) then
{
_minFps = "minServerFPS" call VEMFr_fnc_config;
_mnPlyrs = "minPlayers" call VEMFr_fnc_config;
if ( isNil "VEMFrForceStart" ) then { VEMFrForceStart = false };
waitUntil { if ( ( ( ( count allPlayers ) >= _mnPlyrs ) AND ( diag_fps > _minFps ) ) OR VEMFrForceStart ) then { true } else { uiSleep 5; false } };
if VEMFrForceStart then { ["missionTimer", 1, format["VEMFr has been forced to start. Server FPS: %1", diag_fps]] ExecVM ("log" call VEMFr_fnc_scriptPath) }
else { [ "missionTimer", 1, format [ "enough players online (%1) and server FPS (%2) is above %3. Starting missionTimer...", count allPlayers, diag_fps, _minFps ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
VEMFrMissionCount = 0;
_im = false;
if ( _mgm isEqualTo 0 ) then { _im = true };
_zz = { uiSleep ( ( _minNew * 60 ) + ( floor random ( ( _maxNew * 60 ) - ( _minNew * 60 ) ) ) ) };
call _zz;
while {true} do
{
// Pick A Mission if enough players online
if ( ( count allPlayers ) >= _mnPlyrs ) then
{
scopeName "pick";
if ( ( VEMFrMissionCount < _mgm ) AND ( VEMFrMissionCount >= 0 ) OR _im ) then
{
_mssnNm = selectRandom _ml;
_h = [ _mssnNm ] execVM format [ "a3_vemf_reloaded\missions\%1.sqf", _mssnNm ];
uiSleep 5;
if ( scriptDone _h ) then { breakOut "pick" } else { call _zz };
} else
{
if ( VEMFrMissionCount < 0 ) then
{
[ "missionTimer", 0, format [ "VEMFrMissionCount (%1) is BELOW 0! Stopping missionTimer...", VEMFrMissionCount ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
breakOut "outer";
};
call _zz;
};
} else { uiSleep 60 };
};
};
};
};

View File

@ -0,0 +1,22 @@
/*
Author: IT07
Description:
will put mission notification on either all screens or just on given
Params:
_this select 0: SCALAR - mission color
_this select 1: STRING - notification title
_this select 2: STRING - notification message
_this select 3: ARRAY (optional) - specific clients to (ONLY) send notification to
Returns:
nothing
*/
params [ "_mc", "_title", "_line", "_to" ];
if ( isNil "_to" ) then { _to = allPlayers };
{
VEMFrMsgToClient = [ [ _mc, _title, _line ], "" ];
( owner _x ) publicVariableClient "VEMFrMsgToClient";
} forEach _to;

View File

@ -0,0 +1,53 @@
/*
Author: IT07
Description:
will log all used overrides to the server's RPT
Returns:
nothing
*/
{
if ( isClass _x ) then
{
_c1 = configName _x;
{
if ( isClass _x ) then
{
_c2 = configName _x;
{
if ( isClass _x ) then
{
_c3 = configName _x;
{
if ( not ( isClass _x ) ) then
{
if not ( isNull ( configFile >> "CfgVemfReloaded" >> _c1 >> _c2 >> _c3 >> ( configName _x ) ) ) then
{
[ "Overrides", 1, format [ "Overriding 'CfgVemfReloaded >> %1 >> %2 >> %3 >> %4'", _c1, _c2, _c3, configName _x ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
} else { [ "Overrides", 0, format [ "setting 'CfgVemfReloaded >> %1 >> %2 >> %3 >> %4' does not exist!", _c1, _c2, _c3, configName _x ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
};
} forEach ( configProperties [ configFile >> "CfgVemfReloadedOverrides" >> _c1 >> _c2 >> _c3, "true", false ] );
} else
{
if not ( isNull ( configFile >> "CfgVemfReloaded" >> _c1 >> _c2 >> ( configName _x ) ) ) then
{
[ "Overrides", 1, format [ "Overriding 'CfgVemfReloaded >> %1 >> %2 >> %3'", _c1, _c2, configName _x ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
} else { [ "Overrides", 0, format [ "setting 'CfgVemfReloaded >> %1 >> %2 >> %3' does not exist!", _c1, _c2, configName _x ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
};
} forEach ( configProperties [ configFile >> "CfgVemfReloadedOverrides" >> _c1 >> _c2, "true", false ] );
} else
{
if not ( isNull ( configFile >> "CfgVemfReloaded" >> _c1 >> ( configName _x ) ) ) then
{
[ "Overrides", 1, format [ "Overriding 'CfgVemfReloaded >> %1 >> %2", _c1, configName _x ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
} else { [ "Overrides", 0, format [ "setting 'CfgVemfReloaded >> %1 >> %2' does not exist!", _c1, configName _x ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
};
} forEach ( configProperties [ configFile >> "CfgVemfReloadedOverrides" >> _c1, "true", false] );
} else
{
if not ( isNull ( configFile >> "CfgVemfReloaded" >> ( configName _x ) ) ) then { [ "Overrides", 1, format [ "Overriding 'CfgVemfReloaded >> %1'", configName _x ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) }
else { [ "Overrides", 0, format [ "setting 'CfgVemfReloaded >> %1' does not exist!", configName _x ] ] ExecVM ( "log" call VEMFr_fnc_scriptPath ) };
};
} forEach ( configProperties [ configFile >> "CfgVemfReloadedOverrides", "true", false ] );

View File

@ -0,0 +1,15 @@
/*
Author: IT07
Description:
handles the broadcast of a systemChat kill message
*/
params [ "_t", "_nt", "_k", "_nk" ];
private [ "_crWpn", "_cfg" ];
if ( ( vehicle _k ) isEqualTo _k ) then { _crWpn = currentWeapon _k; _cfg = "CfgWeapons" }
else { _crWpn = typeOf ( vehicle _k ); _cfg = "CfgVehicles" };
_dist = _t distance _k;
_dspName = getText ( configFile >> _cfg >> _crWpn >> "displayName" );
_dspName = _dspName select [ 0, _dspName find " " ];
[ format [ "%1 killed %2 with %3 from %4m", _nk, if ( ( "sayKilledName" call VEMFr_fnc_config ) isEqualTo "yes" ) then { _nt + " (AI)" } else { "an AI" }, _dspName, round _dist ] ] ExecVM ( "systemChatToClient" call VEMFr_fnc_scriptPath );

View File

@ -0,0 +1,50 @@
/*
Author: IT07
Description:
handles the transfer of ownership to another given unit/client/object.
Will transfer complete group to the same (new) owner.
Params:
_this select 0: GROUP - the group of which the ownership should be transfered
Returns:
nothing
*/
_grp = _this select 0;
if not ( isNull _grp ) then
{
// Check if HC is enabled
_hcNbld = "headLessClientSupport" call VEMFr_fnc_config;
_force = uiNamespace getVariable [ "VEMFr_forceAItoClients", nil ];
if not ( isNil "_force" ) then { if ( _force isEqualType true ) then { if _force then { _hcNbld = -1 } } };
private "_to";
if ( _hcNbld isEqualTo "yes" ) then
{
_to = call VEMFr_fnc_hc;
if ( isNil "_to" ) then { uiNamespace setVariable [ "VEMFr_forceAItoClients", true ] };
};
if ( ( _hcNbld isEqualTo "no" ) OR ( uiNamespace getVariable [ "VEMFr_forceAItoClients", false ] ) ) then
{
if ( ( count allPlayers ) > 0 ) then
{
_distToX = worldSize;
{
_dist = _x distance ( leader _grp );
if ( _dist <= _distToX ) then
{
_distToX = _dist;
_to = _x;
};
} forEach allPlayers;
};
};
if not ( isNil "_to" ) then
{
_grp setGroupOwner ( owner _to );
_grp setVariable [ "isVEMFrGroupLocal", false, true ];
};
};

View File

@ -0,0 +1,18 @@
/*
Author: IT07
Description:
marks given group(!) as VEMF AI which will then be used by REMOTEguard for monitor of groupOwner
Params:
_this: ARRAY
_this select 0: GROUP - group to sign as VEMF AI
Returns:
nothing
*/
private "_grp";
_grp = param [ 0, grpNull, [ grpNull ] ];
_grp setVariable [ "isVEMFrGroup", true, true ];
_grp setVariable [ "isVEMFrGroupLocal", true, true ];

View File

@ -0,0 +1,19 @@
/*
Author: IT07
Description:
spawns AI at all given locations in config file
Params:
none
Returns:
nothing
*/
( [ [ "aiStatic" ], [ "enabled", "positions", "amount" ] ] call VEMFr_fnc_config ) params [ "_s0", "_s1", "_s2" ];
if ( _s0 isEqualTo "yes" ) then
{
[ "spawnStaticAI", 2, "spawning AI on positions..." ] ExecVM ( "log" call VEMFr_fnc_scriptPath );
{ _uc = _s2 select _forEachIndex; [ _x, 2, ( _uc / 2 ) + ( round random ( _uc / 2 ) ), ( [ [ call VEMFr_fnc_whichMod ], [ "aiMode" ] ] call VEMFr_fnc_config ) select 0, "Static" ] spawn VEMFr_fnc_spawnVEMFrAI } forEach _s1;
};

View File

@ -0,0 +1,17 @@
/*
Author: IT07
Params:
_this select 0: FORMATTED STRING - line to broadcast
_this select 1: ARRAY - specific clients to (ONLY) send line to
Returns:
nothing
*/
params [ "_line", "_to" ];
if ( isNil "_to" ) then { _to = allPlayers };
{
VEMFrMsgToClient = [ _line, "sys" ];
( owner _x ) publicVariableClient "VEMFrMsgToClient";
} forEach _to;

View File

@ -0,0 +1,15 @@
/*
Author: IT07
Params:
_this select 0: ARRAY - list of objects to send a warning to
Returns:
nothing
*/
params [ "_m", "_to" ];
{
VEMFrMsgToClient = [ _m, "ba" ];
( owner _x ) publicVariableClient "VEMFrMsgToClient";
} forEach _to;

View File

@ -0,0 +1,10 @@
class CfgPatches
{
class a3_vemf_reloaded_config
{
units[] = {};
requiredAddons[] = {};
fileName = "a3_vemf_reloaded_config.pbo";
author = "IT07";
};
};

View File

@ -0,0 +1,36 @@
#include "CfgPatches.hpp"
class CfgVemfReloadedOverrides
{
/*
File: config.cpp
Description: put all of the settings you always change in here and simply keep this pbo. Then you don't have to redo all your changes to the config.cpp everytime
Description 2: the only thing you will have to do now is simply check the CHANGELOG.md on GitHub everytime there is an update to check if there are any deprecated settings
Description 3: instead of changing the config.cpp settings everytime, just add your changes here. Saves a lot of time. Yes you are welcome you lucky bastard
Note: it is extremely difficult for a coder to explain with text how to do this so I have put a few examples in this file instead
Note 2: the already present lines below line 10 are just examples so feel free to delete them
*/
// Put all the settings you want to override below this line
/*
debugMode = 2; // Overrides CfgVemfReloaded >> debugMode
maxGlobalMissions = 5; // Overrides CfgVemfReloaded >> maxGlobalMissions
minServerFPS = 5; // Overrides CfgVemfReloaded >> minServerFPS
class crateLoot
{
primarySlotsMax = 3; // Overrides CfgVemfReloaded >> crateLoot >> primarySlotsMax
primarySlotsMin = 1; // Overrides CfgVemfReloaded >> crateLoot >> primarySlotsMin
};
class locationBlackLists
{ // NOTE: If the map you use is not listed below, simply add it by yourself or put the locations you want to blacklist into the locations array of the Other class
class Altis
{
locations[] = {}; // Overrides CfgVemfReloaded >> locationBlackLists >> Altis >> locations
};
};
class aiGear
{
aiPistols[] = {"hgun_ACPC2_F","hgun_Rook40_F"}; // Overrides CfgVemfReloaded >> aiGear >> aiPistols
};
*/
}; // Do not touch this line

View File

@ -0,0 +1,50 @@
class RscDisplayBaseAttack
{
duration = 99999;
fadeIn = 0.2;
fadeOut = 1;
idd = 2992;
onLoad = "uiNamespace setVariable ['RscDisplayBaseAttack', _this select 0]; ExecVM 'VEMFr_client\sqf\RscDisplayBaseAttack\onLoad.sqf'";
onUnLoad = "uiNamespace setVariable ['RscDisplayBaseAttack', displayNull]";
class RscText
{
access = 0;
colorBackground[] = {0.071, 0.024, 0.024, 0.75};
colorShadow[] = {0, 0, 0, 0.5};
colorText[] = {1, 0.333, 0.333, 1};
deletable = 0;
fade = 0;
fixedWidth = 0;
font = "PuristaMedium";
h = 0.037;
idc = -1;
linespacing = 1;
shadow = 1;
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
style = 2;
text = "";
tooltipColorBox[] = {1, 1, 1, 1};
tooltipColorShade[] = {0, 0, 0, 0.65};
tooltipColorText[] = {1, 1, 1, 1};
type = 0;
w = 0.3;
x = 0;
y = 0;
};
class controls
{
class text:RscText {
x = 0.4 * safezoneW + safezoneX;
y = 0.88 * safezoneH + safezoneY;
w = 0.2 * safezoneW; //w = 0.35 * safezoneW;
h = 0.0275 * safezoneH;
font = "PuristaBold";
idc = 1;
shadow = 0;
text = " // [ WARNING! Base is under attack ] \\";
};
};
};

View File

@ -0,0 +1,127 @@
class RscDisplayVEMFrClient
{
idd = 2991;
fadeIn = 0.2;
fadeOut = 1;
duration = 99999;
onLoad = "uiNamespace setVariable ['RscDisplayVEMFrClient', _this select 0]; ExecVM 'VEMFr_client\sqf\RscDisplayVEMFrClient\onLoad.sqf'";
onUnLoad = "uiNamespace setVariable ['RscDisplayVEMFrClient', displayNull]";
class RscBackground
{
access = 0;
colorBackground[] = {0.48,0.5,0.35,1};
colorShadow[] = {0,0,0,0.5};
colorText[] = {0.1,0.1,0.1,1};
deletable = 0;
fade = 0;
fixedWidth = 0;
font = "PuristaLight";
h = 1;
idc = -1;
linespacing = 1;
shadow = 0;
SizeEx = 1;
style = 512;
text = "";
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
tooltipColorText[] = {1,1,1,1};
type = 0;
w = 1;
x = 0;
y = 0;
};
class RscPictureKeepAspect
{
access = 0;
colorBackground[] = {0,0,0,1};
colorText[] = {1,1,1,1};
deletable = 0;
fade = 0;
fixedWidth = 0;
font = "PuristaMedium";
h = 0.15;
idc = -1;
lineSpacing = 0;
shadow = 0;
sizeEx = 0;
style = "0x30 + 0x800";
text = "";
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
tooltipColorText[] = {1,1,1,1};
type = 0;
w = 0.2;
x = 0;
y = 0;
};
class RscText
{
access = 0;
colorBackground[] = {0.071,0.078,0.094,1};
colorShadow[] = {0,0,0,0.5};
colorText[] = {0.22,0.745,0.882,1};
deletable = 0;
fade = 0;
fixedWidth = 0;
font = "PuristaMedium";
h = 0.037;
idc = -1;
linespacing = 1;
shadow = 1;
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
style = 0;
text = "";
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
tooltipColorText[] = {1,1,1,1};
type = 0;
w = 0.3;
x = 0;
y = 0;
};
class controls
{
class icon:RscPictureKeepAspect
{
x = 0.25 * safezoneW + safezoneX;
y = 0.825 * safezoneH + safezoneY;
w = 0.025 * safezoneW;
h = 0.05 * safezoneH;
fade = 1;
idc = 10;
text = "\A3\ui_f\data\map\markers\nato\o_art.paa";
};
class txtTitle: RscText
{
x = 0.2875 * safezoneW + safezoneX;
y = 0.8235 * safezoneH + safezoneY;
w = 0 * safezoneW;
h = 0.02 * safezoneH;
colorBackground[] = {0,0,0,0.75};
colorText[] = {1,1,1,0.9};
fade = 1;
idc = 11;
shadow = 0;
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.85)";
text = "";
};
class txtMsg: RscText
{
x = 0.2875 * safezoneW + safezoneX;
y = 0.845 * safezoneH + safezoneY;
w = 0 * safezoneW;
h = 0.03 * safezoneH;
colorBackground[] = {0,0,0,0.75};
colorText[] = {1,1,1,0.9};
fade = 1;
idc = 12;
shadow = 0;
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.25)";
text = "";
};
};
};

View File

@ -0,0 +1,31 @@
/*
Author: IT07
Description:
handles the things that need to be done when RscDisplayBaseAttack is active
*/
disableSerialization;
_dsp = uiNamespace getVariable [ "RscDisplayBaseAttack", displayNull ];
if not ( isNull _dsp ) then
{
_dsp setVariable [ "doFlash", true ];
while { not ( isNull _dsp ) } do
{
if ( _dsp getVariable [ "doFlash", false ] ) then
{
_dsp setVariable [ "doingFlash", true ];
uiSleep 1.5;
{
_x ctrlSetFade 1; _x ctrlCommit 0.25;
uiSleep 0.25;
} forEach ( allControls _dsp );
uiSleep 0.5;
{
_x ctrlSetFade 0; _x ctrlCommit 0.25;
uiSleep 0.25;
} forEach ( allControls _dsp );
_dsp setVariable [ "doingFlash", false ];
} else { uiSleep 0.5 };
};
};

View File

@ -0,0 +1,92 @@
disableSerialization;
_dsp = uiNamespace getVariable [ "RscDisplayVEMFrClient", displayNull ];
if not isNull _dsp then
{
if ( count ( uiNamespace getVariable [ "VEMFrMsgQueue", [] ] ) isEqualTo 0 ) then
{
( [ "RscDisplayVEMFrClient" ] call BIS_fnc_rscLayer ) cutFadeOut 0;
systemChat "[VEMFrClient] No messages to display";
} else
{
playSound "HintExpand";
// do stuff
_ctrlPic = _dsp displayCtrl 10;
_ctrlTitle = _dsp displayCtrl 11;
_ctrlMsg = _dsp displayCtrl 12;
{
[ _dsp, _x ] spawn
{
disableSerialization;
_dsp = _this select 0;
_data = _this select 1;
_ctrlPic = _dsp displayCtrl 10;
if ( ( ctrlFade _ctrlPic ) < 1 ) then
{
_ctrlPic ctrlSetFade 1;
_ctrlPic ctrlCommit 0.5;
uiSleep 0.75;
};
_ctrlPic ctrlSetTextColor call
{
private _a = getArray ( configFile >> "CfgMarkerColors" >> ( _data select 0 ) >> "color" );
{
if ( _x isEqualType "" ) then { _a set [ _forEachIndex, call compile _x ] };
} forEach _a;
_a
};
_ctrlPic ctrlSetFade 0;
_ctrlPic ctrlCommit 0.5;
};
if ( _ctrlTitle getVariable [ "expanded", false ] AND ( _ctrlMsg getVariable [ "expanded", false ] ) ) then
{
_ctrlPos = ctrlPosition _ctrlTitle;
_ctrlTitle ctrlSetPosition [ _ctrlPos select 0, _ctrlPos select 1, 0 * safezoneW, _ctrlPos select 3 ];
_ctrlTitle ctrlSetFade 1;
_ctrlTitle ctrlCommit 0.5;
_ctrlTitle setVariable [ "expanded", false ];
uiSleep 0.75;
_ctrlTitle ctrlSetText toUpper ( _x select 1 );
_ctrlPos = ctrlPosition _ctrlTitle;
_ctrlTitle ctrlSetPosition [ _ctrlPos select 0, _ctrlPos select 1, 0.1 * safezoneW, _ctrlPos select 3 ];
_ctrlTitle ctrlSetFade 0;
_ctrlTitle ctrlCommit 0.5;
_ctrlTitle setVariable [ "expanded", true ];
_ctrlPos = ctrlPosition _ctrlMsg;
_ctrlMsg ctrlSetPosition [ _ctrlPos select 0, _ctrlPos select 1, 0 * safezoneW, _ctrlPos select 3 ];
_ctrlMsg ctrlSetFade 1;
_ctrlMsg ctrlCommit 0.5;
_ctrlMsg setVariable [ "expanded", false ];
uiSleep 0.75;
_ctrlMsg ctrlSetText ( _x select 2 );
_ctrlPos = ctrlPosition _ctrlMsg;
_ctrlMsg ctrlSetPosition [ _ctrlPos select 0, _ctrlPos select 1, 0.425 * safezoneW, _ctrlPos select 3 ];
_ctrlMsg ctrlSetFade 0;
_ctrlMsg ctrlCommit 0.5;
_ctrlMsg setVariable [ "expanded", true ];
uiSleep ( count ( _x select 2 ) / 5 );
} else
{
_ctrlTitle ctrlSetText toUpper ( _x select 1 );
_ctrlPos = ctrlPosition _ctrlTitle;
_ctrlTitle ctrlSetPosition [ _ctrlPos select 0, _ctrlPos select 1, 0.1 * safezoneW, _ctrlPos select 3 ];
_ctrlTitle ctrlSetFade 0;
_ctrlTitle ctrlCommit 0.5;
_ctrlTitle setVariable [ "expanded", true ];
_ctrlMsg ctrlSetText ( _x select 2 );
_ctrlPos = ctrlPosition _ctrlMsg;
_ctrlMsg ctrlSetPosition [ _ctrlPos select 0, _ctrlPos select 1, 0.425 * safezoneW, _ctrlPos select 3 ];
_ctrlMsg ctrlSetFade 0;
_ctrlMsg ctrlCommit 0.5;
_ctrlMsg setVariable [ "expanded", true ];
uiSleep ( count ( _x select 2 ) / 5 );
};
} forEach ( uiNamespace getVariable [ "VEMFrMsgQueue", [] ] );
uiNamespace setVariable [ "VEMFrMsgQueue", [] ];
( [ "RscDisplayVEMFrClient" ] call BIS_fnc_rscLayer ) cutFadeOut 0.5;
};
} else { systemChat "Nope." };

View File

@ -0,0 +1,73 @@
if hasInterface then
{
uiNamespace setVariable [ "VEMFrMsgQueue", [] ];
uiNamespace setVariable [ "RscDisplayVEMFrClient", displayNull ];
uiNamespace setVariable [ "RscDisplayBaseAttack", displayNull ];
if isMultiplayer then
{
_handleMessage =
{
_data = _this;
params [ "_msg", "_mode" ];
if ( _mode isEqualTo "sys" ) then { systemChat _msg };
if ( _mode isEqualTo "" ) then
{
( uiNamespace getVariable [ "VEMFrMsgQueue", [] ] ) pushBack _msg;
if ( isNull ( uiNamespace getVariable [ "RscDisplayVEMFrClient", displayNull ] ) ) then
{
( [ "RscDisplayVEMFrClient" ] call BIS_fnc_rscLayer ) cutRsc [ "RscDisplayVEMFrClient", "PLAIN", 0, true ]
};
};
if ( _mode isEqualTo "ba" ) then
{
disableSerialization;
_dsp = uiNamespace getVariable [ "RscDisplayBaseAttack", displayNull ];
if ( ( _msg isEqualTo "a" ) AND ( isNull _dsp ) ) then
{
( [ "RscDisplayBaseAttack" ] call BIS_fnc_rscLayer ) cutRsc [ "RscDisplayBaseAttack", "PLAIN", 0, true ];
};
if ( ( _msg isEqualTo "d" ) AND not ( isNull _dsp ) ) then
{
_dsp setVariable [ "doFlash", false ];
waitUntil { if ( _dsp getVariable [ "doingFlash", false ] ) then { uiSleep 0.5; false } else { true } };
_ctrl = _dsp displayCtrl 1;
_oldTxt = ctrlText _ctrl;
for "_i" from ( count ( ctrlText _ctrl ) ) to 0 step -1 do
{
_ctrl ctrlSetText ( _oldTxt select [ 0, _i ] );
uiSleep 0.035;
};
_ctrl ctrlSetTextColor [ 0.333, 1, 0.557, 1 ];
_nwTxt = "// [ Attack on Base ended ] \\";
for "_i" from 0 to ( count _nwTxt ) do
{
_ctrl ctrlSetText ( _nwTxt select [ 0, _i ] );
uiSleep 0.035;
};
_dsp setVariable [ "doFlash", true ];
uiSleep 12.5;
( [ "RscDisplayBaseAttack" ] call BIS_fnc_rscLayer ) cutFadeOut 0.5;
};
};
};
while { true } do
{
if not ( isNil "VEMFrMsgToClient" ) then
{
VEMFrMsgToClient spawn _handleMessage;
VEMFrMsgToClient = nil;
} else { uiSleep 0.05 };
};
} else
{
_arr = uiNamespace getVariable [ "VEMFrMsgQueue", [] ];
_arr pushBack [ 0, "NEW TAKEOVER", "Raiders have taken over ..." ];
_arr pushBack [ 1, "NEW POLICE RAID", format [ "%1 Police forces are raiding ...", worldName ] ];
_arr pushBack [ 2, "NEW S.W.A.T. RAID", format [ "%1's S.W.A.T. teams are raiding ...", worldName ] ];
waitUntil { if not ( isNull ( findDisplay 46 ) ) then { true } else { uiSleep 0.5; false } };
player addAction [ "Trigger VEMFr Message", { ( [ "RscDisplayVEMFrClient" ] call BIS_fnc_rscLayer ) cutRsc [ "RscDisplayVEMFrClient", "PLAIN", 0, true ] }, "", -1, false, true, "User2", "alive player" ];
player addAction [ "Trigger BaseAttack", { ( [ "RscDisplayBaseAttack" ] call BIS_fnc_rscLayer ) cutRsc [ "RscDisplayBaseAttack", "PLAIN", 0, true ] }, "", -1, false, true, "", "alive player" ];
};
};

View File

@ -1,2 +1,8 @@
// Epoch Survival Gamemode
#include "epoch_config\sandbox_config.hpp"
class RscTitles
{
#include "VEMFr_client\gui\RscDisplayVEMFrClient.hpp"
#include "VEMFr_client\gui\RscDisplayBaseAttack.hpp"
};

View File

@ -0,0 +1,9 @@
if hasInterface then
{
[] ExecVM "VEMFr_client\sqf\initClient.sqf"; // Client-side part of VEMFr
};