Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 11.40 KB | None | 0 0
  1. // F3 - Folk ARPS Assign Gear Script - NATO
  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 = "acc_pointer_IR";    // IR Laser
  63. _attach2 = "acc_flashlight";    // Flashlight
  64.  
  65. _silencer1 = "muzzle_snds_M";   // 5.56 suppressor
  66. _silencer2 = "muzzle_snds_H";   // 6.5 suppressor
  67.  
  68. _scope1 = "optic_Holosight";    // Basic Scope
  69. _scope2 = "optic_MRCO";         // MRCO Scope - 1x - 6x
  70. _scope3 = "optic_SOS";          // SOS Scope - 18x - 75x
  71.  
  72. _bipod1 = "bipod_01_F_snd";     // Default bipod
  73. _bipod2 = "bipod_02_F_blk";     // Black bipod
  74.  
  75. // Default setup
  76. _attachments = [_scope1]; // The default attachment set for most units, overwritten in the individual unitType
  77.  
  78. // [] = remove all
  79. // [_attach1,_scope1,_silencer] = remove all, add items assigned in _attach1, _scope1 and _silencer1
  80. // [_scope2] = add _scope2, remove rest
  81. // false = keep attachments as they are
  82.  
  83. // ====================================================================================
  84.  
  85. // ATTACHMENTS - HANDGUN
  86. _hg_silencer1 = "muzzle_snds_acp";  // .45 suppressor
  87.  
  88. _hg_scope1 = "optic_MRD";           // MRD
  89.  
  90. // Default setup
  91. _hg_attachments= []; // The default attachment set for handguns, overwritten in the individual unitType
  92.  
  93. // ====================================================================================
  94.  
  95. // WEAPON SELECTION
  96.  
  97. // Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
  98. _rifle = "arifle_MX_F";
  99. _riflemag = "30Rnd_65x39_caseless_mag";
  100. _riflemag_tr = "30Rnd_65x39_caseless_mag_Tracer";
  101.  
  102. // Standard Carabineer (Medic, Rifleman (AT), MAT Gunner, MTR Gunner, Carabineer)
  103. _carbine = "arifle_MXC_F";
  104. _carbinemag = "30Rnd_65x39_caseless_mag";
  105. _carbinemag_tr = "30Rnd_65x39_caseless_mag_Tracer";
  106.  
  107. // Standard Submachine Gun/Personal Defence Weapon (Aircraft Pilot, Submachinegunner)
  108. _smg = "SMG_01_F";
  109. _smgmag = "30Rnd_45ACP_Mag_SMG_01";
  110. _smgmag_tr = "30Rnd_45ACP_Mag_SMG_01";
  111.  
  112. // Diver
  113. _diverWep = "arifle_SDAR_F";
  114. _diverMag1 = "30Rnd_556x45_Stanag_red";
  115. _diverMag2 = "30Rnd_556x45_Stanag_Tracer_Red";
  116. _diverMag3 = "20Rnd_556x45_UW_mag";
  117.  
  118. // Rifle with GL and HE grenades (CO, DC, FTLs)
  119. _glrifle = "arifle_MX_GL_F";
  120. _glriflemag = "30Rnd_65x39_caseless_mag";
  121. _glriflemag_tr = "30Rnd_65x39_caseless_mag_Tracer";
  122. _glmag = "1Rnd_HE_Grenade_shell";
  123. _glmaglarge = "3Rnd_HE_Grenade_shell";
  124.  
  125. // Smoke for FTLs, Squad Leaders, etc
  126. _glsmokewhite = "1Rnd_SmokeRed_Grenade_shell";
  127. _glsmokegreen = "1Rnd_SmokeGreen_Grenade_shell";
  128. _glsmokered = "1Rnd_SmokeRed_Grenade_shell";
  129.  
  130. // Flares for FTLs, Squad Leaders, etc
  131. _glflarewhite = "3Rnd_UGL_FlareWhite_F";
  132. _glflarered = "3Rnd_UGL_FlareRed_F";
  133. _glflareyellow = "3Rnd_UGL_FlareYellow_F";
  134. _glflaregreen = "3Rnd_UGL_FlareGreen_F";
  135.  
  136. // Pistols (CO, DC, Automatic Rifleman, Medium MG Gunner)
  137. _pistol = "hgun_Pistol_heavy_01_F";
  138. _pistolmag = "11Rnd_45ACP_Mag";
  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";
  155.  
  156. // Laserdesignator
  157. _Laserdesignator = "Laserdesignator";
  158.  
  159. // UAV Terminal
  160. _uavterminal = "B_UavTerminal";   // BLUFOR - FIA
  161.  
  162. // Chemlights
  163. _chemgreen =  "Chemlight_green";
  164. _chemred = "Chemlight_red";
  165. _chemyellow =  "Chemlight_yellow";
  166. _chemblue = "Chemlight_blue";
  167.  
  168. // Backpacks
  169. _bag = "B_AssaultPack_mcamo";
  170. _baglarge = "B_Kitbag_mcamo";
  171. _medicbag = "rhs_medic_bag";
  172. _bagdiver =  "B_AssaultPack_blk";       // used by divers
  173. _baguav = "B_UAV_01_backpack_F";            // used by UAV operator
  174. _baghmgg = "RHS_M2_Gun_Bag";            // RHS M2 Gun
  175. _baghmgag = "RHS_M2_Tripod_Bag";            // RHS M2 Tripod
  176. _baghatg = "rhs_Tow_Gun_Bag";           // RHS TOW Tube
  177. _baghatag = "rhs_TOW_Tripod_Bag";           // RHS TOW Tripod
  178. _bagmtrg = "B_Mortar_01_weapon_F";          // used by Mortar gunner
  179. _bagmtrag = "B_Mortar_01_support_F";        // used by Mortar assistant gunner
  180. _baghsamg = "B_AA_01_weapon_F";         // used by Heavy SAM gunner
  181. _baghsamag = "B_HMG_01_support_F";          // used by Heavy SAM assistant gunner **
  182.  
  183. // ====================================================================================
  184.  
  185. // UNIQUE, ROLE-SPECIFIC EQUIPMENT
  186.  
  187. // Automatic Rifleman
  188. _AR = "arifle_MX_SW_F";
  189. _ARmag = "100Rnd_65x39_caseless_mag";
  190. _ARmag_tr = "100Rnd_65x39_caseless_mag_Tracer";
  191.  
  192. // Medium MG
  193. _MMG = "MMG_02_camo_F";
  194. _MMGmag = "130Rnd_338_Mag";
  195. _MMGmag_tr = "130Rnd_338_Mag";
  196.  
  197. // NON-DLC ALTERNATIVE:
  198. // _MMG = "LMG_Zafir_F";
  199. // _MMGmag = "150Rnd_762x54_Box";
  200. // _MMGmag_tr = "150Rnd_762x54_Box"_Tracer";
  201.  
  202. // Marksman rifle
  203. _DMrifle = "arifle_MXM_F";
  204. _DMriflemag = "30Rnd_65x39_caseless_mag";
  205. _DMriflemag_tr = "30Rnd_65x39_caseless_mag_Tracer";
  206.  
  207. // Rifleman AT
  208. _RAT = "launch_NLAW_F";
  209. _RATmag = "ACE_PreloadedMissileDummy";
  210.  
  211. // Medium AT
  212. _MAT = "launch_NLAW_F";
  213. _MATmag1 = "ACE_PreloadedMissileDummy";
  214. _MATmag2 = "ACE_PreloadedMissileDummy";
  215.  
  216. // Surface Air
  217. _SAM = "launch_B_Titan_F";
  218. _SAMmag = "Titan_AA";
  219.  
  220. // Heavy AT
  221. _HAT = "launch_B_Titan_short_F";
  222. _HATmag1 = "Titan_AT";
  223. _HATmag2 = "Titan_AP";
  224.  
  225. // Sniper
  226. _SNrifle = "srifle_LRR_camo_F";
  227. _SNrifleMag = "7Rnd_408_Mag";
  228.  
  229. // Engineer items
  230. _ATmine = "ATMine_Range_Mag";
  231. _satchel = "SatchelCharge_Remote_Mag";
  232. _democharge = "DemoCharge_Remote_Mag";
  233. _APmine1 = "APERSBoundingMine_Range_Mag";
  234. _APmine2 = "APERSMine_Range_Mag";
  235.  
  236. // ====================================================================================
  237.  
  238. // CLOTHES AND UNIFORMS
  239.  
  240. // Define classes. This defines which gear class gets which uniform
  241. // "medium" vests are used for all classes if they are not assigned a specific uniform
  242.  
  243. _light = [];
  244. _heavy =  ["eng","engm"];
  245. _diver = ["div"];
  246. _pilot = ["pp","pcc","pc"];
  247. _crew = ["vc","vg","vd"];
  248. _ghillie = ["sn","sp"];
  249. _specOp = [];
  250.  
  251. // Basic clothing
  252. // The outfit-piece is randomly selected from the array for each unit
  253. _baseUniform = ["rhs_6b13_6sh92_radio"];
  254. _baseHelmet = ["rhs_altyn_visordown"];
  255. _baseGlasses = [];
  256.  
  257. // Vests
  258. _standardRig = ["V_PlateCarrier2_rgr"];
  259.  
  260. // Diver
  261. _diverUniform =  ["U_B_Wetsuit"];
  262. _diverHelmet = [];
  263. _diverRig = ["V_RebreatherB"];
  264. _diverGlasses = ["G_Diving"];
  265.  
  266. // Pilot
  267. _pilotUniform = ["U_B_HeliPilotCoveralls"];
  268. _pilotHelmet = ["H_PilotHelmetHeli_B"];
  269. _pilotRig = ["V_TacVest_blk"];
  270. _pilotGlasses = [];
  271.  
  272. // Crewman
  273. _crewUniform = ["U_B_CombatUniform_mcam_vest"];
  274. _crewHelmet = ["H_HelmetCrew_B"];
  275. _crewRig = ["V_Chestrig_khk"];
  276. _crewGlasses = [];
  277.  
  278. // Ghillie
  279. _ghillieUniform = ["U_B_GhillieSuit"]; //DLC alternatives: ["U_B_FullGhillie_lsh","U_B_FullGhillie_ard","U_B_FullGhillie_sard"];
  280. _ghillieHelmet = [];
  281. _ghillieRig = ["V_Chestrig_rgr"];
  282. _ghillieGlasses = [];
  283.  
  284. // Spec Op
  285. // _sfuniform = ["U_B_SpecopsUniform_sgg"];
  286. // _sfhelmet = ["H_HelmetSpecB","H_HelmetSpecB_paint1","H_HelmetSpecB_paint2","H_HelmetSpecB_blk"];
  287. // _sfRig = ["V_PlateCarrierSpec_rgr"];
  288. // _sfGlasses = [];
  289.  
  290. // ====================================================================================
  291.  
  292. // INTERPRET PASSED VARIABLES
  293. // The following interprets what has been passed to this script element
  294.  
  295. _typeofUnit = toLower (_this select 0); // Tidy input for SWITCH/CASE statements, expecting something like : r = Rifleman, co = Commanding Officer, rat = Rifleman (AT)
  296. _unit = _this select 1;                 // expecting name of unit; originally passed by using 'this' in unit init
  297. _isMan = _unit isKindOf "CAManBase";    // We check if we're dealing with a soldier or a vehicle
  298.  
  299. // ====================================================================================
  300.  
  301. // This block needs only to be run on an infantry unit
  302. if (_isMan) then {
  303.  
  304.     // PREPARE UNIT FOR GEAR ADDITION
  305.     // The following code removes all existing weapons, items, magazines and backpacks
  306.  
  307.     removeBackpack _unit;
  308.     removeAllWeapons _unit;
  309.     removeAllItemsWithMagazines _unit;
  310.     removeAllAssignedItems _unit;
  311.  
  312.     // ====================================================================================
  313.  
  314.     // HANDLE CLOTHES
  315.     // Handle clothes and helmets and such using the include file called next.
  316.  
  317.     #include "f_assignGear_clothes.sqf";
  318.  
  319.     // ====================================================================================
  320.  
  321.     // ADD UNIVERSAL ITEMS
  322.     // Add items universal to all units of this faction
  323.  
  324.     _unit linkItem _nvg;                            // Add and equip the faction's nvg
  325.     _unit addItem _firstaid;                        // Add a single first aid kit (FAK)
  326.     _unit linkItem "ItemMap";                       // Add and equip the map
  327.     _unit linkItem "ItemCompass";                   // Add and equip a compass
  328.     _unit linkItem "ItemRadio";                     // Add and equip A3's default radio
  329.     _unit linkItem "ItemWatch";                     // Add and equip a watch
  330.     _unit linkItem "ItemGPS";                       // Add and equip a GPS
  331.     _unit additemtobackpack "ACE_Flashlight_XL50";  // Add a map flashlight
  332. };
  333.  
  334. // ====================================================================================
  335.  
  336. // SELECT LOADOUT
  337. // Pick the appropriate loadout depending on the parameter
  338.  
  339. #include "f_assignGear_nato_standard.sqf";
  340.  
  341. // ====================================================================================
  342.  
  343. // If this isn't run on an infantry unit we can exit
  344. if !(_isMan) exitWith {};
  345.  
  346. // ====================================================================================
  347.  
  348. // Handle weapon attachments
  349. #include "f_assignGear_attachments.sqf";
  350.  
  351. // ====================================================================================
  352.  
  353. // ENSURE UNIT HAS CORRECT WEAPON SELECTED ON SPAWNING
  354. _unit selectweapon primaryweapon _unit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement