Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 11.66 KB | None | 0 0
  1. // F3 - Folk ARPS Assign Gear Script - AAF
  2. // Credits: Please see the F3 online manual (http://www.ferstaberinde.com/f3/en/)
  3. // ====================================================================================
  4.  
  5. // DEFINE EQUIPMENT TABLES
  6. // The blocks of code below identifies equipment for this faction
  7. //
  8. // Defined loadouts:
  9. //      co         - commander
  10. //      dc          - deputy commander / squad leader
  11. //      m          - medic
  12. //      ftl         - fire team leader
  13. //      ar          - automatic rifleman
  14. //      aar         - assistant automatic rifleman
  15. //      rat         - rifleman (AT)
  16. //      dm         - designated marksman
  17. //      mmgg      - medium mg gunner
  18. //      mmgag      - medium mg assistant
  19. //      matg      - medium AT gunner
  20. //      matag      - medium AT assistant
  21. //      hmgg      - heavy mg gunner (deployable)
  22. //      hmgag      - heavy mg assistant (deployable)
  23. //      hatg      - heavy AT gunner (deployable)
  24. //      hatag      - heavy AT assistant (deployable)
  25. //      mtrg      - mortar gunner (deployable)
  26. //      mtrag      - mortar assistant (deployable)
  27. //      msamg      - medium SAM gunner
  28. //      msamag      - medium SAM assistant gunner
  29. //      hsamg      - heavy SAM gunner (deployable)
  30. //      hsamag      - heavy SAM assistant gunner (deployable)
  31. //      sn         - sniper
  32. //      sp         - spotter (for sniper)
  33. //      vc         - vehicle commander
  34. //      vg         - vehicle gunner
  35. //      vd         - vehicle driver (repair)
  36. //      pp         - air vehicle pilot / co-pilot (repair)
  37. //      pcc         - air vehicle co-pilot (repair) / crew chief (repair)
  38. //      pc         - air vehicle crew
  39. //      eng         - engineer (demo)
  40. //      engm      - engineer (mines)
  41. //      uav         - UAV operator
  42. //      div          - divers
  43. //
  44. //      r          - rifleman
  45. //      car         - carabineer
  46. //      smg         - submachinegunner
  47. //      gren      - grenadier
  48. //
  49. //      v_car      - car/4x4
  50. //      v_tr      - truck
  51. //      v_ifv      - ifv
  52. //
  53. //      crate_small   - small ammocrate
  54. //      crate_med   - medium ammocrate
  55. //      crate_large   - large ammocrate
  56. //
  57. // ====================================================================================
  58.  
  59. // GENERAL EQUIPMENT USED BY MULTIPLE CLASSES
  60.  
  61. // ATTACHMENTS - PRIMARY
  62. _attach1 = "ACE_acc_pointer_green";   // IR Laser
  63. _attach2 = "acc_flashlight";   // Flashlight
  64.  
  65. _silencer1 = "muzzle_snds_M";   // 5.56 suppressor
  66. _silencer2 = "hlc_muzzle_Tundra";   // 9mm suppressor
  67.  
  68. _scope1 = "RH_eotexps3";      // ACO
  69. _scope2 = "RKSL_optic_LDS";         // MRCO Scope - 1x - 6x
  70. _scope3 = "optic_SOS";         // SOS Scope - 18x - 75x
  71. _scope4 = "RH_LTdocterl"      // LaRue Docter LOW
  72.  
  73. _bipod1 = "bipod_03_F_blk";      // Default bipod
  74. _bipod2 = "bipod_03_F_blk";      // Black bipod
  75.  
  76. // Default setup
  77. _attachments = [_scope1,_attach1]; // The default attachment set for most units, overwritten in the individual unitType
  78.  
  79. // [] = remove all
  80. // [_attach1,_scope1,_silencer] = remove all, add items assigned in _attach1, _scope1 and _silencer1
  81. // [_scope2] = add _scope2, remove rest
  82. // false = keep attachments as they are
  83.  
  84. // ====================================================================================
  85.  
  86. // ATTACHMENTS - HANDGUN
  87. _hg_silencer1 = "rhsusf_acc_omega9k";   // 9mm GLAWK suppressor
  88.  
  89. // _hg_scope1 = "optic_MRD";         // MRD
  90.  
  91. // Default setup
  92. _hg_attachments= []; // The default attachment set for handguns, overwritten in the individual unitType
  93.  
  94. // ====================================================================================
  95.  
  96. // WEAPON SELECTION
  97.  
  98. // Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
  99. _rifle = "arifle_CTAR_blk_F";
  100. _riflemag = "30Rnd_580x42_Mag_F";
  101. _riflemag_tr = "30Rnd_580x42_Mag_Tracer_F";
  102.  
  103. // Standard Carabineer (Medic, Rifleman (AT), MAT Gunner, MTR Gunner, Carabineer)
  104. _carbine = "arifle_CTAR_blk_F";
  105. _carbinemag = "30Rnd_580x42_Mag_F";
  106. _carbinemag_tr = "30Rnd_580x42_Mag_Tracer_F";
  107.  
  108. // Standard Submachine Gun/Personal Defence Weapon (Aircraft Pilot, Submachinegunner)
  109. _smg = "SMG_02_F";
  110. _smgmag = "30Rnd_9x21_Mag_SMG_02";
  111. _smgmag_tr = "30Rnd_9x21_Mag_SMG_02";
  112.  
  113. // Diver
  114. _diverWep = "arifle_SDAR_F";
  115. _diverMag1 = "30Rnd_580x42_Mag_F";
  116. _diverMag2 = "30Rnd_580x42_Mag_Tracer_F";
  117. _diverMag3 = "20Rnd_556x45_UW_mag";
  118.  
  119. // Rifle with GL and HE grenades (CO, DC, FTLs)
  120. _glrifle = "arifle_CTAR_GL_blk_F";
  121. _glriflemag = "30Rnd_580x42_Mag_F";
  122. _glriflemag_tr = "30Rnd_580x42_Mag_Tracer_F";
  123. _glmag = "1Rnd_HE_Grenade_shell";
  124.  
  125. // Smoke for FTLs, Squad Leaders, etc
  126. _glsmokewhite = "1Rnd_Smoke_Grenade_shell";
  127. _glsmokegreen = "1Rnd_SmokeRed_Grenade_shell";
  128. _glsmokered = "1Rnd_SmokeRed_Grenade_shell";
  129.  
  130. // Flares for FTLs, Squad Leaders, etc
  131. _glflarewhite = "UGL_FlareWhite_F";
  132. _glflarered = "UGL_FlareRed_F";
  133. _glflareyellow = "UGL_FlareYellow_F";
  134. _glflaregreen = "UGL_FlareGreen_F";
  135.  
  136. // Pistols (CO, DC, Automatic Rifleman, Medium MG Gunner)
  137. _pistol = "rhsusf_weap_glock17g4";
  138. _pistolmag = "rhsusf_mag_17Rnd_9x19_JHP";
  139.  
  140. // Grenades
  141. _grenade = "HandGrenade";
  142. _Mgrenade = "MiniGrenade";
  143. _smokegrenade = "SmokeShell";
  144. _smokegrenadegreen = "SmokeShellGreen";
  145. _smokegrenadeblue = "SmokeShellBlue";
  146. _smokegrenadepurple = "SmokeShellPurple";
  147.  
  148. // misc medical items.
  149. _firstaid = "ACE_fieldDressing";
  150. _medkit = "Medikit";
  151. _medpack = "FirstAidKit";
  152.  
  153. // Night Vision Goggles
  154. //_nvg = "NVGoggles_OPFOR";
  155.  
  156. // Laserdesignator
  157. _Laserdesignator = "Laserdesignator_03";
  158.  
  159. // UAV Terminal
  160. _uavterminal = "I_UavTerminal";
  161.  
  162. // Chemlights
  163. _chemgreen =  "Chemlight_green";
  164. _chemred = "Chemlight_red";
  165. _chemyellow =  "Chemlight_yellow";
  166. _chemblue = "Chemlight_blue";
  167.  
  168. // Standard Backpacks
  169. _bag = "B_ViperHarness_blk_F";         // The standard bag for most classes
  170. _bagLarge = "B_Kitbag_rgr";            // Larger bag for some special purpose classes
  171. _medicbag = "rhs_medic_bag";
  172.  
  173. // Special Backpacks
  174. _bagdiver =  "B_AssaultPack_blk";      // used by divers
  175. _baguav = "I_UAV_01_backpack_F";         // used by UAV operator
  176. _baghmgg = "RHS_DShkM_Gun_Bag";            // RHS DSHKm Gun
  177. _baghmgag = "RHS_DShkM_TripodHigh_Bag";         // RHS DSHKm Tripod
  178. _baghatg = "RHS_Metis_Gun_Bag";            // RHS Metis Tube
  179. _baghatag = "RHS_Metis_Tripod_Bag";         // RHS Metis Tripod
  180. _bagmtrg = "I_Mortar_01_weapon_F";         // used by Mortar gunner
  181. _bagmtrag = "I_Mortar_01_support_F";      // used by Mortar assistant gunner
  182. _baghsamg = "I_AA_01_weapon_F";            // used by Heavy SAM gunner
  183. _baghsamag = "I_HMG_01_support_F";         // used by Heavy SAM assistant gunner
  184.  
  185. // ====================================================================================
  186.  
  187. // UNIQUE, ROLE-SPECIFIC EQUIPMENT
  188.  
  189. // Automatic Rifleman
  190. _AR = "LMG_Mk200_F";
  191. _ARmag = "100Rnd_580x42_Mag_F";
  192. _ARmag_tr = "100Rnd_580x42_Mag_Tracer_F";
  193.  
  194. _MMG = "LMG_Zafir_F";
  195. _MMGmag = "150Rnd_762x54_Box";
  196. _MMGmag_tr = "150Rnd_762x54_Box_Tracer";
  197.  
  198. // Marksman rifle
  199. _DMrifle = "hlc_rifle_psg1";
  200. _DMriflemag = "hlc_20rnd_762x51_barrier_G3";
  201.  
  202. // Rifleman AT
  203. _RAT = "rhs_weap_m72a7";
  204. _RATmag = "ACE_PreloadedMissileDummy";
  205.  
  206. // Medium AT
  207. _MAT = "launch_NLAW_F";
  208. _MATmag1 = "NLAW_F";
  209. _MATmag2 = "NLAW_F";
  210.  
  211. // Surface Air
  212. _SAM = "launch_I_Titan_F";
  213. _SAMmag = "Titan_AA";
  214.  
  215. // Heavy AT
  216. _HAT = "launch_I_Titan_short_F";
  217. _HATmag1 = "Titan_AT";
  218. _HATmag2 = "Titan_AP";
  219.  
  220. // Sniper
  221. _SNrifle = "srifle_GM6_F";
  222. _SNrifleMag = "5Rnd_127x108_Mag";
  223.  
  224. // Engineer items
  225. _ATmine = "ATMine_Range_Mag";
  226. _satchel = "SatchelCharge_Remote_Mag";
  227. _democharge = "DemoCharge_Remote_Mag";
  228. _APmine1 = "APERSBoundingMine_Range_Mag";
  229. _APmine2 = "APERSMine_Range_Mag";
  230.  
  231. // ====================================================================================
  232.  
  233. // CLOTHES AND UNIFORMS
  234.  
  235. // Define special vest loadouts. This defines which gear class gets which vest
  236. // Normal infantry will be given either light or standard rigs, depending on the loadout parameter
  237.  
  238. _diver = ["div"];
  239. _pilot = ["pp","pcc","pc"];
  240. _crew = ["vc","vg","vd"];
  241. _ghillie = ["sn","sp"];
  242. _specOp = [];
  243.  
  244. // Basic clothing
  245. // The outfit-piece is randomly selected from the array for each unit
  246.  
  247. _baseUniform = ["rhs_uniform_g3_tan"];
  248. // _baseHelmet = ["H_HelmetIA"];
  249. _baseGlasses = ["G_Balaclava_TI_G_blk_F"];
  250.  
  251. // Vests
  252. _standardRig = ["V_PlateCarrier1_blk"];
  253.  
  254. // Diver
  255. _diverUniform =  ["U_I_Wetsuit"];
  256. _diverHelmet = [];
  257. _diverRig = ["V_RebreatherIA"];
  258. _diverGlasses = ["G_Diving"];
  259.  
  260. // Pilot
  261. _pilotUniform = ["U_I_HeliPilotCoveralls"];
  262. _pilotHelmet = ["H_PilotHelmetHeli_I"];
  263. _pilotRig = ["V_TacVest_oli"];
  264. _pilotGlasses = [];
  265.  
  266. // Crewman
  267. _crewUniform = ["U_I_CombatUniform"];
  268. _crewHelmet = ["H_HelmetCrew_I"];
  269. _crewRig = ["V_TacVest_oli"];
  270. _crewGlasses = [];
  271.  
  272. // Ghillie
  273. _ghillieUniform = ["U_I_GhillieSuit"];   //DLC alternatives: ["U_I_FullGhillie_lsh","U_I_FullGhillie_ard","U_I_FullGhillie_sard"];
  274. _ghillieHelmet = [];
  275. _ghillieRig = ["V_Chestrig_rgr"];
  276. _ghillieGlasses = [];
  277.  
  278. // Spec Op - no nice stuff for AAF
  279. _sfuniform = _baseUniform;
  280. _sfhelmet = _baseHelmet;
  281. _sfRig = _standardRig;
  282. _sfGlasses = [];
  283.  
  284. // ====================================================================================
  285.  
  286. // INTERPRET PASSED VARIABLES
  287. // The following interprets what has been passed to this script element
  288.  
  289. _typeofUnit = toLower (_this select 0);   // Tidy input for SWITCH/CASE statements, expecting something like : r = Rifleman, co = Commanding Officer, rat = Rifleman (AT)
  290. _unit = _this select 1;               // expecting name of unit; originally passed by using 'this' in unit init
  291. _isMan = _unit isKindOf "CAManBase";   // We check if we're dealing with a soldier or a vehicle
  292.  
  293. // ====================================================================================
  294.  
  295. // This block needs only to be run on an infantry unit
  296. if (_isMan) then {
  297.  
  298.    // PREPARE UNIT FOR GEAR ADDITION
  299.    // The following code removes all existing weapons, items, magazines and backpacks
  300.  
  301.    removeBackpack _unit;
  302.    removeAllWeapons _unit;
  303.   removeAllItemsWithMagazines _unit;
  304.   removeAllAssignedItems _unit;
  305.  
  306.    // ====================================================================================
  307.  
  308.    // HANDLE CLOTHES
  309.    // Handle clothes and helmets and such using the include file called next.
  310.  
  311.    #include "f_assignGear_clothes.sqf";
  312.  
  313.    // ====================================================================================
  314.  
  315.    // ADD UNIVERSAL ITEMS
  316.    // Add items universal to all units of this faction
  317.  
  318.    _unit linkItem _nvg;                     // Add and equip the faction's nvg
  319.    _unit addItem _firstaid;                  // Add a single first aid kit (FAK)
  320.    _unit linkItem "ItemMap";                  // Add and equip the map
  321.    _unit linkItem "ItemCompass";               // Add and equip a compass
  322.    _unit linkItem "ItemRadio";                  // Add and equip A3's default radio
  323.    _unit linkItem "ItemWatch";                  // Add and equip a watch
  324.    _unit additem "ACE_Flashlight_XL50";    // Add a map flashlight
  325.  
  326. };
  327.  
  328. // ====================================================================================
  329.  
  330. // SELECT LOADOUT
  331. // Pick the appropriate loadout depending on the parameter
  332.  
  333. #include "f_assignGear_aaf_standard.sqf";
  334.  
  335. // If this isn't run on an infantry unit we can exit
  336. if !(_isMan) exitWith {};
  337.  
  338. // ====================================================================================
  339.  
  340. // Handle weapon attachments
  341. #include "f_assignGear_attachments.sqf";
  342.  
  343. // ====================================================================================
  344.  
  345. // ENSURE UNIT HAS CORRECT WEAPON SELECTED ON SPAWNING
  346. _unit selectweapon primaryweapon _unit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement