diff --git a/f/assignGear/f_assignGear_3IFB.sqf b/f/assignGear/f_assignGear_3IFB.sqf new file mode 100644 index 00000000..58c22598 --- /dev/null +++ b/f/assignGear/f_assignGear_3IFB.sqf @@ -0,0 +1,354 @@ +// F3 - Folk ARPS Assign Gear Script - 3IFB +// Credits: Please see the F3 online manual (http://www.ferstaberinde.com/f3/en/) +// ==================================================================================== + +// DEFINE EQUIPMENT TABLES +// The blocks of code below identifies equipment for this faction +// +// Defined loadouts: +// co - commander +// dc - deputy commander / squad leader +// m - medic +// ftl - fire team leader +// ar - automatic rifleman +// aar - assistant automatic rifleman +// rat - rifleman (AT) +// dm - designated marksman +// mmgl - medium mg team leader +// mmgg - medium mg gunner +// mmgag - medium mg assistant +// matl - medium AT team leader +// matg - medium AT gunner +// matag - medium AT assistant +// hmgg - heavy mg gunner (deployable) +// hmgag - heavy mg assistant (deployable) +// hatl - heavy AT team leader +// hatg - heavy AT gunner +// hatag - heavy AT assistant +// mtrg - mortar gunner (deployable) +// mtrag - mortar assistant (deployable) +// msaml - medium SAM team leader +// msamg - medium SAM gunner +// msamag - medium SAM assistant gunner +// hsamg - heavy SAM gunner (deployable) +// hsamag - heavy SAM assistant gunner (deployable) +// sn - sniper +// sp - spotter (for sniper) +// vc - vehicle commander +// vg - vehicle gunner +// vd - vehicle driver (repair) +// pc - air vehicle crew +// jp - jet pilot +// eng - engineer (demo) +// engm - engineer (mines) +// uav - UAV operator +// div - divers +// +// r - rifleman +// car - carabineer +// smg - submachinegunner +// gren - grenadier +// +// v_car - car/4x4 +// v_tr - truck +// v_ifv - ifv +// v_tank - tank +// v_helo_l - Rotary Transport Light +// v_helo_m - Rotary Transport Medium +// v_helo_h - Rotary Transport Heavy +// v_helo_a - Rotary Attack +// v_jet - Jet +// +// crate_small - small ammocrate +// crate_med - medium ammocrate +// crate_large - large ammocrate +// +// ==================================================================================== + +// GENERAL EQUIPMENT USED BY MULTIPLE CLASSES + +// ATTACHMENTS - PRIMARY +_attach1 = ""; // IR Laser +_attach2 = "acc_flashlight"; // Flashlight + +_silencer1 = "mmuzzle_snds_B"; // 7.62 suppressor +_silencer2 = "muzzle_snds_H"; // 6.5 suppressor + +_scope1 = "optic_ACO"; // ACO +_scope2 = "optic_MRCO"; // MRCO Scope - 1x - 6x +_scope3 = "optic_KHS_old"; // SOS Scope - 18x - 75x + +_bipod1 = "bipod_01_F_mtp"; // Default bipod +_bipod2 = "bipod_02_F_blk"; // Black bipod + +// Default setup +_attachments = []; // The default attachment set for most units, overwritten in the individual unitType + +// [] = remove all +// [_attach1,_scope1,_silencer] = remove all, add items assigned in _attach1, _scope1 and _silencer1 +// [_scope2] = add _scope2, remove rest +// false = keep attachments as they are + +// ==================================================================================== + +// ATTACHMENTS - HANDGUN +_hg_silencer1 = ""; // No suppressor for Zubr + +_hg_scope1 = "optic_MRD"; // MRD + +// Default setup +_hg_attachments= []; // The default attachment set for handguns, overwritten in the individual unitType + +// ==================================================================================== + +// WEAPON SELECTION + +// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman) +_rifle = selectRandom ["arifle_AK12_F","arifle_AKM_F","arifle_AKM_F"];// Slight randomization, biased towards AKM +_riflemag = "30Rnd_762x39_Mag_F"; +_riflemag_tr = "30Rnd_762x39_Mag_Tracer_F"; + +// Standard Carabineer (Medic, Rifleman (AT), MAT Gunner, MTR Gunner, Carabineer) +_carbine = selectRandom ["arifle_AK12_F","arifle_AKM_F","arifle_AKM_F"]; // Slight randomization, biased towards AKM +_carbinemag = "30Rnd_762x39_Mag_F"; +_carbinemag_tr = "30Rnd_762x39_Mag_Tracer_F"; + +// Standard Submachine Gun/Personal Defence Weapon (Aircraft Pilot, Submachinegunner) +_smg = "arifle_AKS_F"; +_smgmag = "30Rnd_545x39_Mag_F"; + +// Diver +_diverWep = "arifle_SDAR_F"; +_diverMag1 = "30Rnd_762x39_Mag_F"; +_diverMag2 = "30Rnd_556x45_Stanag_Tracer_Yellow"; +_diverMag3 = "20Rnd_556x45_UW_mag"; + +// Rifle with GL and HE grenades (CO, DC, FTLs) +_glrifle = "arifle_AK12_GL_F"; // Slight randomization, biased towards TRG +_glriflemag = "30Rnd_762x39_Mag_F"; +_glriflemag_tr = "30Rnd_762x39_Mag_Tracer_F"; +_glmag = "1Rnd_HE_Grenade_shell"; + +// Smoke for FTLs, Squad Leaders, etc +_glsmokewhite = "1Rnd_Smoke_Grenade_shell"; +_glsmokegreen = "1Rnd_SmokeGreen_Grenade_shell"; +_glsmokered = "1Rnd_SmokeRed_Grenade_shell"; + +// Flares for FTLs, Squad Leaders, etc +_glflarewhite = "UGL_FlareWhite_F"; +_glflarered = "UGL_FlareRed_F"; +_glflareyellow = "UGL_FlareYellow_F"; +_glflaregreen = "UGL_FlareGreen_F"; + +// Pistols (CO, DC, Automatic Rifleman, Medium MG Gunner) +_pistol = "hgun_Pistol_01_F"; +_pistolmag = "10Rnd_9x21_Mag"; + +// Grenades +_grenade = "HandGrenade"; +_Mgrenade = "MiniGrenade"; +_smokegrenade = "SmokeShell"; +_smokegrenadegreen = "SmokeShellGreen"; +_smokegrenadeblue = "SmokeShellBlue"; +_smokegrenadepurple = "SmokeShellPurple"; + +// misc medical items. +_firstaid = "FirstAidKit"; +_medkit = "Medikit"; + +// Night Vision Goggles +//_nvg = "NVGoggles_OPFOR"; + +// Laserdesignator +_laserdesignator = "Laserdesignator_03"; + +// UAV Terminal +_uavterminal = "I_UavTerminal"; + +// Chemlights +_chemgreen = "Chemlight_green"; +_chemred = "Chemlight_red"; +_chemyellow = "Chemlight_yellow"; +_chemblue = "Chemlight_blue"; + +// Backpacks +_bag = "B_FieldPack_khk"; // carries 160, weighs 20 +_baglarge = "B_Carryall_khk"; // carries 320, weighs 60 +_bagdiver = "B_AssaultPack_blk"; // used by divers +_baguav = "I_UAV_01_backpack_F"; // used by UAV operator +_baghmgg = "B_HMG_01_weapon_F"; // used by Heavy MG gunner +_baghmgag = "B_HMG_01_support_F"; // used by Heavy MG assistant gunner +_baghatg = "B_AssaultPack_rgr"; // Used by Heavy AT Gunner +_bagmtrg = "B_Mortar_01_weapon_F"; // used by Mortar gunner +_bagmtrag = "B_Mortar_01_support_F"; // used by Mortar assistant gunner +_baghsamg = "B_AA_01_weapon_F"; // used by Heavy SAM gunner + +// ==================================================================================== + +// UNIQUE, ROLE-SPECIFIC EQUIPMENT + +// Automatic Rifleman +_AR = "LMG_03_F"; +_ARmag = "200Rnd_556x45_Box_F"; +_ARmag_tr = "200Rnd_556x45_Box_Tracer_F"; + +// Medium MG +_MMG = "LMG_Zafir_F"; +_MMGmag = "150Rnd_762x54_Box"; +_MMGmag_tr = "150Rnd_762x54_Box_Tracer"; + +// Marksman rifle +_DMrifle = "srifle_DMR_06_olive_F"; +_DMriflemag = "20Rnd_762x51_Mag"; +_DMriflemag_tr = "20Rnd_762x51_Mag"; + +// Rifleman AT +_RAT = "launch_RPG32_ghex_F"; +_RATmag1 = "RPG32_F"; +_RATmag2 = "RPG32_HE_F"; + +// Medium AT +_MAT = "launch_MRAWS_green_F"; +_MATmag1 = "MRAWS_HEAT_F"; +_MATmag2 = "MRAWS_HE_F"; + +// Surface Air +_SAM = "launch_Titan_F"; +_SAMmag = "Titan_AA"; + +// Heavy AT +_HAT = "launch_O_Vorona_green_F"; +_HATmag1 = "Vorona_HEAT"; +_HATmag2 = "Vorona_HE"; + +// Sniper +_SNrifle = "srifle_DMR_05_blk_F"; +_SNrifleMag = "10Rnd_93x64_DMR_05_Mag"; + +// Engineer items +_ATmine = "ATMine_Range_Mag"; +_satchel = "SatchelCharge_Remote_Mag"; +_democharge = "DemoCharge_Remote_Mag"; +_APmine1 = "APERSBoundingMine_Range_Mag"; +_APmine2 = "APERSMine_Range_Mag"; + +// ==================================================================================== + +// CLOTHES AND UNIFORMS + +// Define classes. This defines which gear class gets which uniform +// "medium" vests are used for all classes if they are not assigned a specific uniform + +_diver = ["div"]; +_pilot = ["pp","pcc","pc"]; +_crew = ["vc","vg","vd"]; +_ghillie = ["sn","sp"]; +_specOp = []; +_jet = ["jp"]; + +// Basic clothing +// The outfit-piece is randomly selected from the array for each unit + +_baseUniform = ["U_BG_Guerrilla_6_1","U_BG_Guerilla2_2","U_BG_Guerilla2_1","U_BG_Guerilla2_3","U_BG_Guerilla1_1","U_BG_Guerilla1_2_F","U_BG_Leader", + "U_I_C_Soldier_Bandit_3_F","U_I_C_Soldier_Para_2_F","U_I_C_Soldier_Para_3_F","U_I_C_Soldier_Para_4_F","U_I_C_Soldier_Para_1_F", + "U_I_G_Story_Protagonist_F","U_I_G_resistanceLeader_F","U_C_WorkerCoveralls" +]; +_baseHelmet = ["H_Beret_Colonel"]; +_baseGlasses = []; + +// Vests +// +//_lightRig = ["V_TacVest_Camo","V_I_G_resistanceLeader_F","V_TacVest_oli","V_TacVest_khk"]; +// ^^ Alternate Light Rigs ^^ +_lightRig = ["V_PlateCarrier1_blk","V_PlateCarrier1_rgr_noflag_F","V_PlateCarrierIA1_dgtl"]; +_standardRig = ["V_PlateCarrier1_blk","V_PlateCarrier1_rgr_noflag_F","V_PlateCarrierIA1_dgtl"]; + +// Diver +_diverUniform = ["U_B_Wetsuit"]; +_diverHelmet = []; +_diverRig = ["V_RebreatherB"]; +_diverGlasses = ["G_Diving"]; + +// Pilot +_pilotUniform = ["U_C_WorkerCoveralls"]; +_pilotHelmet = _baseHelmet; +_pilotRig = ["V_Chestrig_blk"]; +_pilotGlasses = []; + +// Jet Pilot +_jetUniform = ["U_I_pilotCoveralls"]; +_jetHelmet = ["H_PilotHelmetFighter_I"]; +_jetRig = []; +_jetGlasses = []; + +// Crewman +_crewUniform = _baseUniform; +_crewHelmet = _baseHelmet; +_crewRig = ["V_Chestrig_blk"]; +_crewGlasses = []; + +// Ghillie +_ghillieUniform = ["U_B_GhillieSuit"]; //DLC alternatives: ["U_B_FullGhillie_lsh","U_B_FullGhillie_ard","U_B_FullGhillie_sard"]; +_ghillieHelmet = []; +_ghillieRig = ["V_Chestrig_rgr"]; +_ghillieGlasses = []; + +// Spec Op +_sfuniform = _baseUniform; +_sfhelmet = _baseHelmet; +_sfRig = _standardRig; +_sfGlasses = []; + +// ==================================================================================== + +// This block needs only to be run on an infantry unit +if (_isMan) then { + + // PREPARE UNIT FOR GEAR ADDITION + // The following code removes all existing weapons, items, magazines and backpacks + + removeBackpack _unit; + removeAllWeapons _unit; + removeAllItemsWithMagazines _unit; + removeAllAssignedItems _unit; + + // ==================================================================================== + + // HANDLE CLOTHES + // Handle clothes and helmets and such using the include file called next. + + #include "f_assignGear_clothes.sqf"; + + // ==================================================================================== + + // ADD UNIVERSAL ITEMS + // Add items universal to all units of this faction + + _unit linkItem _nvg; // Add and equip the faction's nvg + _unit addItem _firstaid; // Add a single first aid kit (FAK) + _unit linkItem "ItemMap"; // Add and equip the map + _unit linkItem "ItemCompass"; // Add and equip a compass + _unit linkItem "ItemRadio"; // Add and equip A3's default radio + _unit linkItem "ItemWatch"; // Add and equip a watch + _unit linkItem "ItemGPS"; // Add and equip a GPS + +}; + +// ==================================================================================== + +// SELECT LOADOUT +// Pick the appropriate loadout depending on the parameter + +_loadout = f_param_loadouts; + +// Light Loadout +if (_loadout == 0) then { + #include "f_assignGear_3IFB_light.sqf" +}; + +// Standard Loadout +if (_loadout == 1) then { + #include "f_assignGear_3IFB_standard.sqf" +}; + +// ==================================================================================== diff --git a/f/assignGear/f_assignGear_3IFB_light.sqf b/f/assignGear/f_assignGear_3IFB_light.sqf new file mode 100644 index 00000000..088188f7 --- /dev/null +++ b/f/assignGear/f_assignGear_3IFB_light.sqf @@ -0,0 +1,582 @@ +// F3 - Folk ARPS Assign Gear Script - 3IFB - Light Loadout +// Credits: Please see the F3 online manual (http://www.ferstaberinde.com/f3/en/) +// ==================================================================================== + +// DEFINE UNIT TYPE LOADOUTS +// The following blocks of code define loadouts for each type of unit (the unit type +// is passed to the script in the first variable) + +switch (_typeofUnit) do +{ + +// ==================================================================================== +// Automatic Rifleman Loadout: + case "ar": + { + _unit addBackpack _bag; + _unit addmagazines [_ARmag, 1]; + _unit addweapon _AR; + _attachments pushback (_bipod1); // Adds the bipod + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_ARmag, 1]; + _unit addmagazines [_ARmag_tr, 1]; + _unit addmagazines [_grenade, 1]; + }; +// Rifleman (AT) Loadout: + case "rat": + { + _unit addBackpack _bag; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addmagazines [_RATmag1, 1]; + _unit addweapon _RAT; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_RATmag1, 1]; + }; +// Assistant Autorifleman Loadout: + case "aar": + { + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_ARmag, 1]; + }; +// Fire Team Leader Loadout: + case "ftl": + { + _unit addmagazines [_glriflemag, 1]; + _unit addmagazines [_glmag, 1]; + _unit addweapon _glrifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_glriflemag, 4]; + _unit addmagazines [_glriflemag_tr, 2]; + _unit addmagazines [_glmag, 5]; + _unit addmagazines [_glsmokewhite, 3]; + _attachments pushback (_attach1); // Adds laser pointer, keeps default scope + _unit addWeapon "Rangefinder"; + _unit addmagazines [_smokegrenadegreen, 2]; + }; +// Squad Leader / DC Loadout: + case "dc": + { + _unit addmagazines [_glriflemag, 1]; + _unit addmagazines [_glmag, 1]; + _unit addweapon _glrifle; + _unit addmagazines [_pistolmag, 1]; + _unit addweapon _pistol; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_glriflemag, 4]; + _unit addmagazines [_glriflemag_tr, 2]; + _unit addmagazines [_glmag, 5]; + _unit addmagazines [_glsmokewhite, 3]; + _unit addmagazines [_glsmokered, 3]; + _unit addmagazines [_pistolmag, 2]; + _attachments pushback (_attach1); // Adds laser pointer, keeps default scope + _unit addWeapon "Rangefinder"; + _unit addmagazines [_smokegrenadepurple, 3]; + }; +// Platoon CO Loadout: + case "co": + { + _unit addmagazines [_glriflemag, 1]; + _unit addmagazines [_glsmokewhite, 1]; + _unit addweapon _glrifle; + _unit addmagazines [_pistolmag, 1]; + _unit addweapon _pistol; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_glriflemag, 4]; + _unit addmagazines [_glriflemag_tr, 2]; + _unit addmagazines [_glsmokewhite, 4]; + _unit addmagazines [_glsmokered, 2]; + _unit addmagazines [_glsmokegreen, 2]; + _unit addmagazines [_pistolmag, 4]; + _attachments pushback (_attach1); // Adds laser pointer, keeps default scope + _unit addWeapon "Rangefinder"; + _unit addmagazines [_smokegrenadepurple, 3]; + }; +// JTAC Loadout: + case "jtac": + { + _unit addmagazines [_glriflemag, 1]; + _unit addmagazines [_glsmokered, 1]; + _unit addweapon _glrifle; + _unit addmagazines [_pistolmag, 1]; + _unit addweapon _pistol; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_glriflemag, 4]; + _unit addmagazines [_glriflemag_tr, 2]; + _unit addmagazines [_glsmokewhite, 3]; + _unit addmagazines [_glsmokered, 3]; + _unit addmagazines [_glsmokegreen, 2]; + _unit addmagazines [_pistolmag, 4]; + _attachments pushback (_attach1); // Adds laser pointer, keeps default scope + _unit addmagazines ["Laserbatteries", 1]; + _unit addWeapon _laserdesignator; + }; +// Medic Loadout: + case "m": + { + _unit setUnitTrait ["medic",true]; // Can use medkit + _unit addBackpack _bag; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addItem _medkit; + _unit addItem _firstaid; + }; +// Designated Marksman Loadout: + case "dm": + { + _unit addmagazines [_DMriflemag, 1]; + _unit addweapon _DMrifle; + _attachments = [_bipod1,_scope2]; // Overwrites default attachments to add a bipod and scope 2 + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_DMriflemag, 4]; + _unit addmagazines [_DMriflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + }; +// Medium MG Gunner Loadout: + case "mmgg": + { + _unit addBackpack _bag; + _unit addmagazines [_MMGmag, 1]; + _unit addweapon _MMG; + _attachments pushback (_bipod1); // Adds the bipod + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_MMGmag, 1]; + _unit addmagazines [_MMGmag_tr, 1]; + }; +// Medium MG Assistant Loadout: + case "mmgag": + { + _unit addBackpack _bag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_MMGmag, 2]; + _unit addmagazines [_MMGmag_tr, 1]; + }; +// Medium MG Team Leader Loadout: + case "mmgl": + { + _unit addBackpack _bag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_MMGmag, 2]; + _unit addmagazines [_MMGmag_tr, 1]; + _unit addWeapon "Rangefinder"; + }; +// Heavy MG Gunner Loadout: + case "hmgg": + { + _unit addBackpack _baghmgg; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + }; +// Heavy MG Team Leader Loadout: + case "hmgag": + { + _unit addBackpack _baghmgag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addWeapon "Rangefinder"; + }; +// Medium AT Gunner Loadout: + case "matg": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addmagazines [_MATmag1, 1]; + _unit addweapon _MAT; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_MATmag1, 2]; + }; +// Medium AT Assistant Loadout: + case "matag": + { + _unit addBackpack _bag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_MATmag1, 2]; + }; +// Medium AT Team Leader Loadout: + case "matl": + { + _unit addBackpack _bag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_MATmag1, 2]; + _unit addWeapon "Rangefinder"; + }; +// Heavy AT Gunner Loadout: + case "hatg": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addmagazines [_HATmag1, 1]; + _unit addweapon _HAT; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_HATmag1, 1]; + }; +// Heavy AT Assistant Loadout: + case "hatag": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_HATmag1, 2]; + }; +// Heavy AT Team Leader Loadout: + case "hatl": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_HATmag1, 2]; + _unit addWeapon "Rangefinder"; + }; +// Mortar Gunner Loadout: + case "mtrg": + { + _unit addBackpack _bagmtrg; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 2]; + _unit addmagazines [_carbinemag_tr, 2]; + }; +// Mortar Team Leader Loadout: + case "mtrag": + { + _unit addBackpack _bagmtrag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addWeapon "Rangefinder"; + }; +// Medium SAM Gunner Loadout: + case "msamg": + { + _unit addBackpack _bag; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addmagazines [_SAMmag, 1]; + _unit addweapon _SAM; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + }; +// Medium SAM Assistant Loadout: + case "msamag": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_SAMmag, 2]; + }; +// Medium SAM Team Leader Loadout: + case "msaml": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_SAMmag, 2]; + _unit addWeapon "Rangefinder"; + }; +// Heavy SAM Gunner Loadout: + case "hsamg": + { + _unit addBackpack _baghsamg; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + }; +// Heavy SAM Team Leader Loadout: + case "hsamag": + { + _unit addBackpack _baghsamag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addWeapon "Rangefinder"; + }; +// Sniper Loadout: + case "sn": + { + _unit addmagazines [_SNrifleMag, 1]; + _unit addweapon _SNrifle; + _attachments = [_bipod1,_scope3]; // Overwrites default attachments to add a bipod and scope 3 + _unit addmagazines [_pistolmag, 1]; + _unit addweapon _pistol; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_SNrifleMag, 4]; + _unit addmagazines [_pistolmag, 5]; + }; +// Spotter Loadout: + case "sp": + { + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _attachments pushback (_attach1); // Adds laser pointer, keeps default scope + _unit addWeapon "Rangefinder"; + _unit addmagazines [_SNrifleMag, 2]; + }; +// Vehicle Commander Loadout: + case "vc": + { + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenadeblue, 3]; + _unit addmagazines [_smgmag, 4]; + _unit addweapon "Rangefinder"; + }; +// Vehicle Gunner Loadout: + case "vg": + { + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenadeblue, 3]; + _unit addmagazines [_smgmag, 4]; + }; +// Vehicle Driver Loadout: + case "vd": + { + _unit setUnitTrait ["engineer",true]; // Can repair + _unit addBackpack _bag; + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenadeblue, 3]; + _unit addmagazines [_smgmag, 4]; + _unit addItem "ToolKit"; + }; +// Jet Pilot Loadout: + case "jp": + { + _unit setUnitTrait ["engineer",true]; // Can repair + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenadeblue, 3]; + _unit addmagazines [_smgmag, 3]; + }; +// Helicopter Crew Loadout: + case "pp"; + case "pcc"; + case "pc": + { + _unit setUnitTrait ["engineer",true]; // Can repair + _unit addBackpack _bag; + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenadeblue, 3]; + _unit addmagazines [_smgmag, 4]; + _unit addItem "ToolKit"; + }; +// Engineer (Demo) Loadout: + case "eng": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addItem "ToolKit"; + _unit addItem "MineDetector"; + _unit addmagazines [_satchel, 2]; + }; +// Engineer (Mines) Loadout: + case "engm": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addItem "ToolKit"; + _unit addItem "MineDetector"; + _unit addmagazines [_APmine2, 4]; + _unit addmagazines [_ATmine, 1]; + }; +// UAV Operator Loadout: + case "uav": + { + _unit addBackpack _baguav; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit linkItem _uavterminal; + }; +// Diver Loadout: + case "div": + { + _unit addBackpack _bagdiver; + _unit addmagazines [_diverMag1, 1]; + _unit addweapon _diverWep; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_diverMag1, 4]; + _unit addmagazines [_diverMag2, 2]; + _unit addmagazines [_diverMag3, 3]; + _unit addmagazines [_grenade, 3]; + }; +// Rifleman Loadout: + case "r": + { + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + }; +// Carbineer Loadout: + case "car": + { + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + }; +// Submachinegunner Loadout: + case "smg": + { + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_smgmag, 6]; + _unit addmagazines [_grenade, 2]; + }; +// Grenadier Loadout: + case "gren": + { + _unit addmagazines [_glriflemag, 1]; + _unit addmagazines [_glmag, 1]; + _unit addweapon _glrifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_glriflemag, 4]; + _unit addmagazines [_glriflemag_tr, 2]; + _unit addmagazines [_glmag, 5]; + }; + +// Include the loadouts for vehicles and crates: +#include "f_assignGear_3IFB_v.sqf"; + +// Include the default case for error handling +#include "f_assignGear_default.sqf"; + +// ==================================================================================== + +// END SWITCH FOR DEFINE UNIT TYPE LOADOUTS +}; diff --git a/f/assignGear/f_assignGear_3IFB_standard.sqf b/f/assignGear/f_assignGear_3IFB_standard.sqf new file mode 100644 index 00000000..5b794a10 --- /dev/null +++ b/f/assignGear/f_assignGear_3IFB_standard.sqf @@ -0,0 +1,588 @@ +// F3 - Folk ARPS Assign Gear Script - 3IFB - Standard Loadout +// Credits: Please see the F3 online manual (http://www.ferstaberinde.com/f3/en/) +// ==================================================================================== + +// DEFINE UNIT TYPE LOADOUTS +// The following blocks of code define loadouts for each type of unit (the unit type +// is passed to the script in the first variable) + +switch (_typeofUnit) do +{ + +// ==================================================================================== +// Automatic Rifleman Loadout: + case "ar": + { + _unit addBackpack _bag; + _unit addmagazines [_ARmag, 1]; + _unit addweapon _AR; + _attachments pushback (_bipod1); // Adds the bipod + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_ARmag, 1]; + _unit addmagazines [_ARmag_tr, 1]; + _unit addmagazines [_grenade, 1]; + }; +// Rifleman (AT) Loadout: + case "rat": + { + _unit addBackpack _bag; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addmagazines [_RATmag1, 1]; + _unit addweapon _RAT; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_RATmag1, 1]; + _unit addmagazines [_RATmag2, 1]; + }; +// Assistant Autorifleman Loadout: + case "aar": + { + _unit addBackpack _bag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_ARmag, 1]; + _unit addmagazines [_RATmag1, 1]; + }; +// Fire Team Leader Loadout: + case "ftl": + { + _unit addmagazines [_glriflemag, 1]; + _unit addmagazines [_glmag, 1]; + _unit addweapon _glrifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_glriflemag, 4]; + _unit addmagazines [_glriflemag_tr, 2]; + _unit addmagazines [_glmag, 5]; + _unit addmagazines [_glsmokewhite, 3]; + _attachments pushback (_attach1); // Adds laser pointer, keeps default scope + _unit addWeapon "Rangefinder"; + _unit addmagazines [_smokegrenadegreen, 2]; + }; +// Squad Leader / DC Loadout: + case "dc": + { + _unit addmagazines [_glriflemag, 1]; + _unit addmagazines [_glmag, 1]; + _unit addweapon _glrifle; + _unit addmagazines [_pistolmag, 1]; + _unit addweapon _pistol; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_glriflemag, 4]; + _unit addmagazines [_glriflemag_tr, 2]; + _unit addmagazines [_glmag, 5]; + _unit addmagazines [_glsmokewhite, 3]; + _unit addmagazines [_glsmokered, 3]; + _unit addmagazines [_pistolmag, 2]; + _attachments pushback (_attach1); // Adds laser pointer, keeps default scope + _unit addWeapon "Rangefinder"; + _unit addmagazines [_smokegrenadepurple, 3]; + }; +// Platoon CO Loadout: + case "co": + { + _unit addmagazines [_glriflemag, 1]; + _unit addmagazines [_glsmokewhite, 1]; + _unit addweapon _glrifle; + _unit addmagazines [_pistolmag, 1]; + _unit addweapon _pistol; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_glriflemag, 4]; + _unit addmagazines [_glriflemag_tr, 2]; + _unit addmagazines [_glsmokewhite, 4]; + _unit addmagazines [_glsmokered, 2]; + _unit addmagazines [_glsmokegreen, 2]; + _unit addmagazines [_pistolmag, 4]; + _attachments pushback (_attach1); // Adds laser pointer, keeps default scope + _unit addWeapon "Rangefinder"; + _unit addmagazines [_smokegrenadepurple, 3]; + }; +// JTAC Loadout: + case "jtac": + { + _unit addmagazines [_glriflemag, 1]; + _unit addmagazines [_glsmokered, 1]; + _unit addweapon _glrifle; + _unit addmagazines [_pistolmag, 1]; + _unit addweapon _pistol; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_glriflemag, 4]; + _unit addmagazines [_glriflemag_tr, 2]; + _unit addmagazines [_glsmokewhite, 3]; + _unit addmagazines [_glsmokered, 3]; + _unit addmagazines [_glsmokegreen, 2]; + _unit addmagazines [_pistolmag, 4]; + _attachments pushback (_attach1); // Adds laser pointer, keeps default scope + _unit addmagazines ["Laserbatteries", 1]; + _unit addWeapon _laserdesignator; + }; +// Medic Loadout: + case "m": + { + _unit setUnitTrait ["medic",true]; // Can use medkit + _unit addBackpack _bag; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addItem _medkit; + _unit addItem _firstaid; + }; +// Designated Marksman Loadout: + case "dm": + { + _unit addmagazines [_DMriflemag, 1]; + _unit addweapon _DMrifle; + _attachments = [_bipod1,_scope2]; // Overwrites default attachments to add a bipod and scope 2 + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_DMriflemag, 4]; + _unit addmagazines [_DMriflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + }; +// Medium MG Gunner Loadout: + case "mmgg": + { + _unit addBackpack _bag; + _unit addmagazines [_MMGmag, 1]; + _unit addweapon _MMG; + _attachments pushback (_bipod1); // Adds the bipod + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_MMGmag, 1]; + _unit addmagazines [_MMGmag_tr, 1]; + }; +// Medium MG Assistant Loadout: + case "mmgag": + { + _unit addBackpack _bag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_MMGmag, 2]; + _unit addmagazines [_MMGmag_tr, 1]; + }; +// Medium MG Team Leader Loadout: + case "mmgl": + { + _unit addBackpack _bag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_MMGmag, 2]; + _unit addmagazines [_MMGmag_tr, 1]; + _unit addWeapon "Rangefinder"; + }; +// Heavy MG Gunner Loadout: + case "hmgg": + { + _unit addBackpack _baghmgg; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + }; +// Heavy MG Team Leader Loadout: + case "hmgag": + { + _unit addBackpack _baghmgag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addWeapon "Rangefinder"; + }; +// Medium AT Gunner Loadout: + case "matg": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addmagazines [_MATmag1, 1]; + _unit addweapon _MAT; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 2]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_MATmag1, 4]; + _unit addmagazines [_MATmag2, 1]; + }; +// Medium AT Assistant Loadout: + case "matag": + { + _unit addBackpack _bag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_MATmag1, 2]; + _unit addmagazines [_MATmag2, 1]; + }; +// Medium AT Team Leader Loadout: + case "matl": + { + _unit addBackpack _bag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_MATmag1, 2]; + _unit addmagazines [_MATmag2, 1]; + _unit addWeapon "Rangefinder"; + }; +// Heavy AT Gunner Loadout: + case "hatg": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addmagazines [_HATmag1, 1]; + _unit addweapon _HAT; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_HATmag1, 1]; + }; +// Heavy AT Assistant Loadout: + case "hatag": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_HATmag1, 2]; + }; +// Heavy AT Team Leader Loadout: + case "hatl": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_HATmag1, 2]; + _unit addWeapon "Rangefinder"; + }; +// Mortar Gunner Loadout: + case "mtrg": + { + _unit addBackpack _bagmtrg; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 2]; + _unit addmagazines [_carbinemag_tr, 2]; + }; +// Mortar Team Leader Loadout: + case "mtrag": + { + _unit addBackpack _bagmtrag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addWeapon "Rangefinder"; + }; +// Medium SAM Gunner Loadout: + case "msamg": + { + _unit addBackpack _bag; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addmagazines [_SAMmag, 1]; + _unit addweapon _SAM; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + }; +// Medium SAM Assistant Loadout: + case "msamag": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_SAMmag, 2]; + }; +// Medium SAM Team Leader Loadout: + case "msaml": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addmagazines [_SAMmag, 2]; + _unit addWeapon "Rangefinder"; + }; +// Heavy SAM Gunner Loadout: + case "hsamg": + { + _unit addBackpack _baghsamg; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + }; +// Heavy SAM Team Leader Loadout: + case "hsamag": + { + _unit addBackpack _baghsamag; + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addWeapon "Rangefinder"; + }; +// Sniper Loadout: + case "sn": + { + _unit addmagazines [_SNrifleMag, 1]; + _unit addweapon _SNrifle; + _attachments = [_bipod1,_scope3]; // Overwrites default attachments to add a bipod and scope 3 + _unit addmagazines [_pistolmag, 1]; + _unit addweapon _pistol; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_SNrifleMag, 4]; + _unit addmagazines [_pistolmag, 5]; + }; +// Spotter Loadout: + case "sp": + { + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _attachments pushback (_attach1); // Adds laser pointer, keeps default scope + _unit addWeapon "Rangefinder"; + _unit addmagazines [_SNrifleMag, 2]; + }; +// Vehicle Commander Loadout: + case "vc": + { + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenadeblue, 3]; + _unit addmagazines [_smgmag, 4]; + _unit addweapon "Rangefinder"; + }; +// Vehicle Gunner Loadout: + case "vg": + { + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenadeblue, 3]; + _unit addmagazines [_smgmag, 4]; + }; +// Vehicle Driver Loadout: + case "vd": + { + _unit setUnitTrait ["engineer",true]; // Can repair + _unit addBackpack _bag; + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenadeblue, 3]; + _unit addmagazines [_smgmag, 4]; + _unit addItem "ToolKit"; + }; +// Jet Pilot Loadout: + case "jp": + { + _unit setUnitTrait ["engineer",true]; // Can repair + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenadeblue, 3]; + _unit addmagazines [_smgmag, 3]; + }; +// Helicopter Crew Loadout: + case "pp"; + case "pcc"; + case "pc": + { + _unit setUnitTrait ["engineer",true]; // Can repair + _unit addBackpack _bag; + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenadeblue, 3]; + _unit addmagazines [_smgmag, 4]; + _unit addItem "ToolKit"; + }; +// Engineer (Demo) Loadout: + case "eng": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addItem "ToolKit"; + _unit addItem "MineDetector"; + _unit addmagazines [_satchel, 2]; + }; +// Engineer (Mines) Loadout: + case "engm": + { + _unit addBackpack _bagLarge; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + _unit addItem "ToolKit"; + _unit addItem "MineDetector"; + _unit addmagazines [_APmine2, 4]; + _unit addmagazines [_ATmine, 1]; + }; +// UAV Operator Loadout: + case "uav": + { + _unit addBackpack _baguav; + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit linkItem _uavterminal; + }; +// Diver Loadout: + case "div": + { + _unit addBackpack _bagdiver; + _unit addmagazines [_diverMag1, 1]; + _unit addweapon _diverWep; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_diverMag1, 4]; + _unit addmagazines [_diverMag2, 2]; + _unit addmagazines [_diverMag3, 3]; + _unit addmagazines [_grenade, 3]; + }; +// Rifleman Loadout: + case "r": + { + _unit addmagazines [_riflemag, 1]; + _unit addweapon _rifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_riflemag, 4]; + _unit addmagazines [_riflemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + }; +// Carbineer Loadout: + case "car": + { + _unit addmagazines [_carbinemag, 1]; + _unit addweapon _carbine; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_carbinemag, 4]; + _unit addmagazines [_carbinemag_tr, 2]; + _unit addmagazines [_grenade, 2]; + }; +// Submachinegunner Loadout: + case "smg": + { + _unit addmagazines [_smgmag, 1]; + _unit addweapon _smg; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_smgmag, 6]; + _unit addmagazines [_grenade, 2]; + }; +// Grenadier Loadout: + case "gren": + { + _unit addmagazines [_glriflemag, 1]; + _unit addmagazines [_glmag, 1]; + _unit addweapon _glrifle; + _unit addItem _firstaid; + _unit addmagazines [_smokegrenade, 3]; + _unit addmagazines [_glriflemag, 4]; + _unit addmagazines [_glriflemag_tr, 2]; + _unit addmagazines [_glmag, 5]; + }; + +// Include the loadouts for vehicles and crates: +#include "f_assignGear_3IFB_v.sqf"; + +// Include the default case for error handling +#include "f_assignGear_default.sqf"; + +// ==================================================================================== + +// END SWITCH FOR DEFINE UNIT TYPE LOADOUTS +}; diff --git a/f/assignGear/f_assignGear_3IFB_v.sqf b/f/assignGear/f_assignGear_3IFB_v.sqf new file mode 100644 index 00000000..f84c0ab1 --- /dev/null +++ b/f/assignGear/f_assignGear_3IFB_v.sqf @@ -0,0 +1,244 @@ +// Vehicle & Box LOADOUTS - 3IFB + +// CARGO: CAR - room for 10 weapons and 50 cargo items + case "v_car": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addWeaponCargoGlobal [_carbine, 2]; + _unit addMagazineCargoGlobal [_riflemag, 8]; + _unit addMagazineCargoGlobal [_glriflemag, 8]; + _unit addMagazineCargoGlobal [_carbinemag, 10]; + _unit addMagazineCargoGlobal [_armag, 5]; + _unit addMagazineCargoGlobal [_RATmag1, 1]; + _unit addMagazineCargoGlobal [_grenade, 4]; + _unit addMagazineCargoGlobal [_smokegrenade, 4]; + _unit addMagazineCargoGlobal [_smokegrenadegreen, 2]; + _unit addMagazineCargoGlobal [_glmag, 4]; + _unit addMagazineCargoGlobal [_glsmokewhite, 4]; + _unit addItemCargoGlobal [_firstaid,4]; + }; + +// CARGO: TRUCK - room for 50 weapons and 200 cargo items + case "v_tr": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addWeaponCargoGlobal [_carbine, 4]; + _unit addMagazineCargoGlobal [_riflemag, 20]; + _unit addMagazineCargoGlobal [_glriflemag, 20]; + _unit addMagazineCargoGlobal [_carbinemag, 20]; + _unit addMagazineCargoGlobal [_armag, 10]; + _unit addMagazineCargoGlobal [_RATmag1, 6]; + _unit addMagazineCargoGlobal [_grenade, 12]; + _unit addmagazineCargoGlobal [_mgrenade,12]; + _unit addMagazineCargoGlobal [_smokegrenade, 12]; + _unit addMagazineCargoGlobal [_smokegrenadegreen, 4]; + _unit addMagazineCargoGlobal [_glmag, 12]; + _unit addMagazineCargoGlobal [_glsmokewhite, 12]; + _unit addItemCargoGlobal [_firstaid,8]; + }; + +// CARGO: IFV - room for 10 weapons and 100 cargo items + case "v_ifv": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addWeaponCargoGlobal [_carbine, 2]; + _unit addMagazineCargoGlobal [_riflemag, 10]; + _unit addMagazineCargoGlobal [_glriflemag, 10]; + _unit addMagazineCargoGlobal [_carbinemag, 12]; + _unit addMagazineCargoGlobal [_armag, 8]; + _unit addMagazineCargoGlobal [_RATmag1, 2]; + _unit addMagazineCargoGlobal [_grenade, 8]; + _unit addmagazineCargoGlobal [_mgrenade,8]; + _unit addMagazineCargoGlobal [_smokegrenade, 8]; + _unit addMagazineCargoGlobal [_smokegrenadegreen, 2]; + _unit addMagazineCargoGlobal [_glmag, 8]; + _unit addMagazineCargoGlobal [_glsmokewhite, 4]; + _unit addItemCargoGlobal [_firstaid,6]; + }; + +//CARGO: TANK + case "v_tank": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addMagazineCargoGlobal [_smokegrenade,4]; + _unit addMagazineCargoGlobal [_smokegrenadegreen,2]; + _unit addMagazineCargoGlobal [_chemgreen,4]; + _unit addItemCargoGlobal [_firstaid,2]; + _unit addItemCargoGlobal ["Toolkit",1]; + }; + +//CARGO: Rotary Transport Light + case "v_helo_l": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addMagazineCargoGlobal [_riflemag, 5]; + _unit addMagazineCargoGlobal [_glriflemag, 5]; + _unit addMagazineCargoGlobal [_armag, 2]; + _unit addMagazineCargoGlobal [_carbinemag, 5]; + _unit addMagazineCargoGlobal [_smokegrenade,4]; + _unit addMagazineCargoGlobal [_smokegrenadegreen,2]; + _unit addMagazineCargoGlobal [_chemgreen,4]; + _unit addItemCargoGlobal [_firstaid,2]; + _unit addBackpackCargoGlobal ["B_Parachute",2]; + _unit addItemCargoGlobal ["Toolkit",1]; + }; + +//CARGO: Rotary Transport Medium + case "v_helo_m": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addWeaponCargoGlobal [_carbine,2]; + _unit addWeaponCargoGlobal [_rat,1]; + _unit addMagazineCargoGlobal [_riflemag,10]; + _unit addMagazineCargoGlobal [_glriflemag,10]; + _unit addMagazineCargoGlobal [_carbinemag,10]; + _unit addMagazineCargoGlobal [_armag,6]; + _unit addMagazineCargoGlobal [_RATmag1,1]; + _unit addMagazineCargoGlobal [_grenade,4]; + _unit addmagazineCargoGlobal [_mgrenade,4]; + _unit addMagazineCargoGlobal [_smokegrenade,8]; + _unit addMagazineCargoGlobal [_smokegrenadegreen,4]; + _unit addMagazineCargoGlobal [_glmag,12]; + _unit addMagazineCargoGlobal [_chemgreen,4]; + _unit addBackpackCargoGlobal [_bag,2]; + _unit addItemCargoGlobal [_firstaid,4]; + _unit addBackpackCargoGlobal ["B_Parachute",2]; + _unit addItemCargoGlobal ["Toolkit",1]; + }; + +//CARGO: Rotary Transport Heavy + case "v_helo_h": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addWeaponCargoGlobal [_carbine,8]; + _unit addWeaponCargoGlobal [_rat,2]; + _unit addMagazineCargoGlobal [_riflemag,20]; + _unit addMagazineCargoGlobal [_glriflemag,20]; + _unit addMagazineCargoGlobal [_carbinemag,20]; + _unit addMagazineCargoGlobal [_armag,12]; + _unit addMagazineCargoGlobal [_RATmag1,6]; + _unit addMagazineCargoGlobal [_grenade,12]; + _unit addmagazineCargoGlobal [_mgrenade,12]; + _unit addMagazineCargoGlobal [_smokegrenade,12]; + _unit addMagazineCargoGlobal [_smokegrenadegreen,4]; + _unit addMagazineCargoGlobal [_glmag,12]; + _unit addMagazineCargoGlobal [_glsmokewhite,12]; + _unit addMagazineCargoGlobal [_chemgreen,4]; + _unit addBackpackCargoGlobal [_bag,4]; + _unit addItemCargoGlobal [_firstaid,6]; + _unit addBackpackCargoGlobal ["B_Parachute",4]; + _unit addItemCargoGlobal ["Toolkit",1]; + }; + +//CARGO: Rotary Attack + case "v_helo_a": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addMagazineCargoGlobal [_smokegrenade,4]; + _unit addMagazineCargoGlobal [_smokegrenadegreen,2]; + _unit addMagazineCargoGlobal [_chemgreen,4]; + _unit addItemCargoGlobal [_firstaid,2]; + }; + +//CARGO: Jet + case "v_jet": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addMagazineCargoGlobal [_smokegrenade,2]; + _unit addMagazineCargoGlobal [_smokegrenadegreen,1]; + _unit addMagazineCargoGlobal [_chemgreen,2]; + _unit addItemCargoGlobal [_firstaid,1]; + _unit addBackpackCargoGlobal ["B_Parachute",1]; + _unit addBackpackCargoGlobal [_bag,1]; + _unit addItemCargoGlobal ["Toolkit",1]; + }; + +// CRATE: Small, ammo for 1 fireteam + case "crate_small": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addMagazineCargoGlobal [_riflemag, 5]; + _unit addMagazineCargoGlobal [_glriflemag, 5]; + _unit addMagazineCargoGlobal [_armag, 5]; + _unit addMagazineCargoGlobal [_carbinemag, 5]; + _unit addMagazineCargoGlobal [_glmag, 5]; + _unit addMagazineCargoGlobal [_glsmokewhite, 4]; + _unit addMagazineCargoGlobal [_RATmag1, 2]; + _unit addMagazineCargoGlobal [_grenade, 8]; + _unit addMagazineCargoGlobal [_mgrenade, 8]; + _unit addMagazineCargoGlobal [_smokegrenade, 8]; + _unit addMagazineCargoGlobal [_smokegrenadegreen, 2]; + _unit addItemCargoGlobal [_firstaid, 6]; + }; + +// CRATE: Medium, ammo for 1 squad + case "crate_med": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addMagazineCargoGlobal [_riflemag, 15]; + _unit addMagazineCargoGlobal [_glriflemag, 20]; + _unit addMagazineCargoGlobal [_armag, 15]; + _unit addMagazineCargoGlobal [_carbinemag, 20]; + _unit addMagazineCargoGlobal [_glmag, 20]; + _unit addMagazineCargoGlobal [_glsmokewhite,16]; + _unit addMagazineCargoGlobal [_RATmag1, 6]; + _unit addMagazineCargoGlobal [_grenade, 25]; + _unit addMagazineCargoGlobal [_mgrenade, 25]; + _unit addMagazineCargoGlobal [_smokegrenade, 25]; + _unit addMagazineCargoGlobal [_smokegrenadegreen, 6]; + _unit addItemCargoGlobal [_firstaid, 25]; + }; + +// CRATE: Large, ammo for 1 platoon + case "crate_large": + { + clearWeaponCargoGlobal _unit; + clearMagazineCargoGlobal _unit; + clearItemCargoGlobal _unit; + clearBackpackCargoGlobal _unit; + _unit addMagazineCargoGlobal [_riflemag, 45]; + _unit addMagazineCargoGlobal [_glriflemag, 60]; + _unit addMagazineCargoGlobal [_armag, 45]; + _unit addMagazineCargoGlobal [_carbinemag, 60]; + _unit addMagazineCargoGlobal [_glmag, 60]; + _unit addMagazineCargoGlobal [_glsmokewhite,50]; + _unit addMagazineCargoGlobal [_RATmag1, 20]; + _unit addMagazineCargoGlobal [_grenade, 75]; + _unit addMagazineCargoGlobal [_mgrenade, 75]; + _unit addMagazineCargoGlobal [_smokegrenade, 75]; + _unit addMagazineCargoGlobal [_smokegrenadegreen, 20]; + _unit addItemCargoGlobal [_firstaid, 75]; + }; diff --git a/f/assignGear/fn_assignGear.sqf b/f/assignGear/fn_assignGear.sqf index 87a4283f..96c9478c 100644 --- a/f/assignGear/fn_assignGear.sqf +++ b/f/assignGear/fn_assignGear.sqf @@ -168,6 +168,18 @@ if (_faction in ["ind_c_f","syndikat"]) then { // ==================================================================================== +// GEAR: 3IFB +// The following block of code executes only if the unit is manually assigned the 3IFB 'faction'; it +// automatically includes a file which contains the appropriate equipment data. +// Note the this faction doesn't exist in the game and so is a 'pseudo-faction'; in particular other faction +// sensitive components, such as briefings, are not aware of this 'pseudo-faction' and will use the +// underlying game faction of the unit +if (_faction in ["3ifb"]) then { + #include "f_assignGear_3IFB.sqf" +}; + +// ==================================================================================== + // Handle weapon switching, weapon attachments, etc // This block needs only to be run on an infantry unit