Advertisement
KRDucky

randomsoldierloadout

Mar 14th, 2017
684
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 27.95 KB | None | 0 0
  1. /*
  2.     ----------------------------------------------------------------------------------------------
  3.    
  4.     Copyright © 2016 soulkobk (soulkobk.blogspot.com)
  5.     This program is free software: you can redistribute it and/or modify
  6.     it under the terms of the GNU Affero General Public License as
  7.     published by the Free Software Foundation, either version 3 of the
  8.     License, or (at your option) any later version.
  9.     This program is distributed in the hope that it will be useful,
  10.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12.     GNU Affero General Public License for more details.
  13.     You should have received a copy of the GNU Affero General Public License
  14.     along with this program. If not, see <http://www.gnu.org/licenses/>.
  15.    
  16.     ----------------------------------------------------------------------------------------------
  17.    
  18.     Name: randomSoldierLoadOut.sqf
  19.     Version: 1.0.1
  20.     Author: soulkobk (soulkobk.blogspot.com)
  21.     Creation Date: 2:20 PM 10/10/2016
  22.     Modification Date: 2:20 PM 10/10/2016
  23.    
  24.     Description:
  25.     For use with A3Wasteland 1.Xx mission (A3Wasteland.com). This script is for custom AI loadouts,
  26.     for usage within missions.
  27.    
  28.     Place this script into folder...
  29.     \server\missions\factoryMethods\createUnits\randomSoldierLoadOut.sqf
  30.    
  31.     Then add...
  32.     randomSoldierLoadOut = [_path, "createUnits\randomSoldierLoadOut.sqf"] call mf_compile;
  33.    
  34.     To...
  35.     \server\functions\serverCompile.sqf
  36.    
  37.     Underneath the line...
  38.     _path = "server\missions\factoryMethods";
  39.  
  40.     Then in each of your createUnits files, for example...
  41.     \server\missions\factoryMethods\createUnits\customGroup.sqf
  42.     \server\missions\factoryMethods\createUnits\customGroup2.sqf
  43.     \server\missions\factoryMethods\createUnits\createRandomSoldier.sqf
  44.     \server\missions\factoryMethods\createUnits\createRandomSoldierC.sqf
  45.    
  46.     You need to remove the old load out for AI and add in...
  47.     [_soldier] call randomSoldierLoadOut;
  48.    
  49.     *Or leave the original code as-is and add the above line to the end of each of those scripts
  50.     (before the last "_soldier" line) to override the _soldier's load out with 100% random gear.
  51.    
  52.     This script will load out each AI unit randomly with...
  53.    
  54.     + Uniform (default/guarenteed addition)
  55.     + Head Gear (percentage chance addition)
  56.     + Vest (percentage chance addition)
  57.     + Back Pack (percentage chance addition)
  58.     + Primary Weapon (default/guarenteed addition)
  59.     + Primary Weapon Muzzle (percentage chance addition)
  60.     + Primary Weapon Pointer (percentage chance addition)
  61.     + Primary Weapon Optic (percentage chance addition)
  62.     + Health Kit(s) (percentage chance addition) - unit will also have 'Medic' trait
  63.     + Grenade(s) (percentage chance addition)
  64.     + Rocket Launcher (percentage chance addition) - unit will also have a back pack added
  65.    
  66.     *See the percentage chance per AI unit below (changable configuration).
  67.     *See _opticsDisallow option to REMOVE optics from the random optic list.
  68.    
  69.     Changeable configuration below.
  70.    
  71.     Parameter(s): [<unit>] call randomSoldierLoadOut;
  72.     Example: [_soldier] call randomSoldierLoadOut;
  73.    
  74.     Change Log:
  75.     1.0.0 - original base script.
  76.     1.0.1 - corrected _opticsDisallow default entries.
  77.     1.0.2 - corrected typo at setUnitTrait.
  78.    
  79.     ----------------------------------------------------------------------------------------------
  80. */
  81.  
  82. if !(isServer) exitWith {}; // DO NOT DELETE THIS LINE!
  83.  
  84. _headGearProbability = 65; // 65% chance
  85. _vestProbability = 100; // 100% chance
  86. _backpackProbability = 25; // 25% chance
  87. _muzzleProbability = 35; // 35% chance
  88. _pointerProbability = 25; // 25% chance
  89. _opticProbability = 45; // 45% chance
  90. _healthProbability = 25; // 25% chance
  91. _grenadeProbability = 35; // 35% chance
  92. _launcherProbability = 15; // 15% chance
  93.  
  94. _healthAmount = (round (random 4) + 1); // minimum 1, maximum 5
  95. _grenadeAmount = (round (random 4) + 1); // minimum 1, maximum 5
  96.  
  97. _weaponMagazineAmount = (round(random 4) + 2); // minimum 2, maximum 6
  98. _launcherMagazineAmount = (round(random 3) + 3); // minimum 3, maximum 6
  99.  
  100. _primaryWeapons = // .45, 9mm, 5.45mm, 5.56mm, 5.8mm and 6.5mm ONLY! NO OP WEAPONS!
  101. [
  102.     "arifle_AKS_F", // AKS-74U 5.45 mm
  103.     "arifle_CTARS_blk_F", // CAR-95-1 5.8mm (Black)
  104.     "arifle_CTAR_blk_F", // CAR-95 5.8 mm (Black)
  105.     "arifle_Katiba_C_F", // Katiba Carbine 6.5 mm
  106.     "arifle_Katiba_F", // Katiba 6.5 mm
  107.     "arifle_Mk20C_plain_F", // Mk20C 5.56 mm
  108.     "arifle_Mk20_plain_F", // Mk20 5.56 mm
  109.     "arifle_MXC_Black_F", // MXC 6.5 mm (Black)
  110.     "arifle_MXC_F", // MXC 6.5 mm
  111.     "arifle_MXM_Black_F", // MXM 6.5 mm (Black)
  112.     "arifle_MXM_F", // MXM 6.5 mm
  113.     "arifle_MX_Black_F", // MX 6.5 mm (Black)
  114.     "arifle_MX_F", // MX 6.5 mm
  115.     "arifle_MX_SW_Black_F", // MX SW 6.5 mm (Black)
  116.     "arifle_MX_SW_F", // MX SW 6.5 mm
  117.     "arifle_SDAR_F", // SDAR 5.56 mm
  118.     "arifle_SPAR_01_blk_F", // SPAR-16 5.56 mm (Black)
  119.     "arifle_SPAR_02_blk_F", // SPAR-16S 5.56 mm (Black)
  120.     "arifle_TRG20_F", // TRG-20 5.56 mm
  121.     "arifle_TRG21_F", // TRG-21 5.56 mm
  122.     "hgun_PDW2000_F", // PDW2000 9 mm
  123.     "LMG_03_F", // LIM-85 5.56 mm
  124.     "LMG_Mk200_BI_F", // Mk200 6.5 mm
  125.     "LMG_Mk200_F", // Mk200 6.5 mm
  126.     "SMG_01_F", // Vermin SMG .45 ACP
  127.     "SMG_02_F", // Sting 9 mm
  128.     "SMG_05_F", // Protector 9 mm
  129.     "srifle_DMR_07_blk_F", // CMR-76 6.5 mm (Black)
  130.    
  131.     //CUP
  132.    
  133.     "hgun_PDW2000_F",
  134.     "SMG_05_F",
  135.     "SMG_02_F",
  136.     "SMG_01_F",
  137.     // CUP SMG's
  138.     "CUP_smg_bizon",
  139.     "CUP_smg_bizon_snds",
  140.     "CUP_smg_EVO",
  141.     "CUP_smg_EVO_MRad_Flashlight",
  142.     "CUP_smg_EVO_MRad_Flashlight_Snds",
  143.     "CUP_smg_MP5A5",
  144.     "CUP_smg_MP5SD6",
  145.    
  146.     // CUP Shotguns
  147.     "CUP_sgun_AA12",
  148.     "CUP_sgun_M1014",
  149.     "CUP_sgun_Saiga12K",
  150.    
  151.     // CUP Assault Rifles
  152.     "CUP_arifle_AKS74",
  153.     "CUP_arifle_AKS74_kobra",
  154.     "CUP_arifle_AKS74_pso",
  155.     "CUP_arifle_AKS74_NSPU",
  156.     "CUP_arifle_AKS74_Goshawk",
  157.     "CUP_arifle_AKS74U",
  158.     "CUP_arifle_AKS74UN_kobra_snds",
  159.     "CUP_arifle_AKS",
  160.     "CUP_arifle_AKS_Gold",
  161.     "CUP_arifle_AKM",
  162.     "CUP_arifle_AK74",
  163.     "CUP_arifle_AK74_GL",
  164.     "CUP_arifle_AK74_GL_kobra",
  165.     "CUP_arifle_RPK74",
  166.     "CUP_arifle_AK107",
  167.     "CUP_arifle_AK107_kobra",
  168.     "CUP_arifle_AK107_pso",
  169.     "CUP_arifle_AK107_GL",
  170.     "CUP_arifle_AK107_GL_kobra",
  171.     "CUP_arifle_AK107_GL_pso",
  172.    
  173.     "CUP_arifle_CZ805_A1",
  174.     "CUP_arifle_CZ805_A1_Aco_Laser",
  175.     "CUP_arifle_CZ805_A1_Holo_Laser",
  176.     "CUP_arifle_CZ805_A1_MRCO_Laser",
  177.     "CUP_arifle_CZ805_A1_ZDDot_Laser",
  178.     "CUP_arifle_CZ805_GL",
  179.     "CUP_arifle_CZ805_GL_ZDDot_Laser",
  180.     "CUP_arifle_CZ805_GL_Hamr_Laser",
  181.     "CUP_arifle_CZ805_A2",
  182.     "CUP_arifle_CZ805_A2_Aco_Laser",
  183.     "CUP_arifle_CZ805_A2_Holo_Laser",
  184.     "CUP_arifle_CZ805_A2_MRCO_Laser",
  185.     "CUP_arifle_CZ805_A2_ZDDot_Flashlight_Snds",
  186.     "CUP_arifle_CZ805_B",
  187.     "CUP_arifle_CZ805_B_GL",
  188.     "CUP_arifle_CZ805B_GL_ACOG_Laser",
  189.    
  190.     "CUP_arifle_FNFAL",
  191.     "CUP_arifle_FNFAL_railed",
  192.     "CUP_arifle_FNFAL_ANPVS4",
  193.    
  194.     "CUP_arifle_G36A",
  195.     "CUP_arifle_G36A_camo",
  196.     "CUP_arifle_G36K",
  197.     "CUP_arifle_G36K_camo",
  198.     "CUP_arifle_G36C",
  199.     "CUP_arifle_G36C_camo",
  200.     "CUP_arifle_G36C_holo_snds",
  201.     "CUP_arifle_G36C_camo_holo_snds",
  202.     "CUP_arifle_MG36",
  203.     "CUP_arifle_MG36_camo",
  204.    
  205.     "CUP_arifle_L85A2",
  206.     "CUP_arifle_L85A2_Holo_laser",
  207.     "CUP_arifle_L85A2_SUSAT_Laser",
  208.     "CUP_arifle_L85A2_CWS_Laser",
  209.     "CUP_arifle_L85A2_ACOG_Laser",
  210.     "CUP_arifle_L85A2_GL",
  211.     "CUP_arifle_L85A2_GL_Holo_laser",
  212.     "CUP_arifle_L85A2_GL_SUSAT_Laser",
  213.     "CUP_arifle_L85A2_GL_ACOG_Laser",
  214.     "CUP_arifle_L86A2",
  215.     "CUP_arifle_L86A2_ACOG",
  216.    
  217.     "CUP_arifle_M16A2",
  218.     "CUP_arifle_M16A2_GL",
  219.     "CUP_arifle_M16A4_Base",
  220.     "CUP_arifle_M16A4_Aim_Laser",
  221.     "CUP_arifle_M16A4_ACOG_Laser",
  222.     "CUP_arifle_M16A4GL",
  223.     "CUP_arifle_M16A4_GL",
  224.     "CUP_arifle_M16A4_GL_ACOG_Laser",
  225.    
  226.     "CUP_arifle_M4A1_black",
  227.     "CUP_arifle_M4A1_desert",
  228.     "CUP_arifle_M4A1_camo",
  229.     "CUP_arifle_M4A1_Aim",
  230.     "CUP_arifle_M4A1_camo_Aim",
  231.     "CUP_arifle_M4A1",
  232.     "CUP_arifle_M4A1_camo_AIM_snds",
  233.     "CUP_arifle_M4A1_BUIS_GL",
  234.     "CUP_arifle_M4A1_BUIS_camo_GL",
  235.     "CUP_arifle_M4A1_BUIS_desert_GL",
  236.     "CUP_arifle_M4A1_GL_Holo_Flashlight",
  237.     "CUP_arifle_M4A1_GL_ACOG_Flashlight",
  238.     "CUP_arifle_M4A1_camo_GL_Holo_Flashlight",
  239.     "CUP_arifle_M4A1_camo_GL_Holo_Flashlight_Snds",
  240.     "CUP_arifle_M4A3_desert_Aim_Flashlight",
  241.     "CUP_arifle_M4A3_desert_GL_ACOG_Laser",
  242.     "CUP_arifle_M4A3_desert_GL_ACOG_Laser",
  243.    
  244.     "CUP_arifle_Sa58P",
  245.     "CUP_arifle_Sa58P_des",
  246.     "CUP_arifle_Sa58V",
  247.     "CUP_arifle_Sa58V_camo",
  248.     "CUP_arifle_Sa58V_ACOG_Laser",
  249.     "CUP_arifle_Sa58V_Aim_Laser",
  250.     "CUP_arifle_Sa58RIS1",
  251.     "CUP_arifle_Sa58RIS1_des",
  252.     "CUP_arifle_Sa58RIS1_Aco_Laser",
  253.     "CUP_arifle_Sa58RIS1_camo_Aco_Laser",
  254.     "CUP_arifle_Sa58RIS2",
  255.     "CUP_arifle_Sa58RIS2_camo",
  256.     "CUP_arifle_Sa58RIS2_Arco_Laser",
  257.     "CUP_arifle_Sa58RIS2_camo_Arco_Laser",
  258.    
  259.     "CUP_arifle_Mk16_CQC",
  260.     "CUP_arifle_Mk16_CQC_FG",
  261.     "CUP_arifle_Mk16_CQC_SFG",
  262.     "CUP_arifle_Mk16_CQC_EGLM",
  263.     "CUP_arifle_Mk16_CQC_EGLM_Holo_Laser_mfsup",
  264.     "CUP_arifle_Mk16_CQC_FG_Aim_Laser_snds",
  265.     "CUP_arifle_Mk16_CQC_SFG_Holo",
  266.     "CUP_arifle_Mk16_STD",
  267.     "CUP_arifle_Mk16_STD_FG",
  268.     "CUP_arifle_Mk16_STD_SFG",
  269.     "CUP_arifle_Mk16_STD_EGLM",
  270.     "CUP_arifle_Mk16_STD_FG_Holo_Laser",
  271.     "CUP_arifle_Mk16_STD_FG_LeupoldMk4CQT_Laser",
  272.     "CUP_arifle_Mk16_STD_EGLM_ACOG_Laser",
  273.     "CUP_arifle_Mk16_STD_EGLM_ANPAS13c1_Laser_mfsup",
  274.     "CUP_arifle_Mk16_SV",
  275.     "CUP_arifle_Mk17_CQC",
  276.     "CUP_arifle_Mk17_CQC_FG",
  277.     "CUP_arifle_Mk17_CQC_SFG",
  278.     "CUP_arifle_Mk17_CQC_EGLM",
  279.     "CUP_arifle_Mk17_STD",
  280.     "CUP_arifle_Mk17_STD_FG",
  281.     "CUP_arifle_Mk17_STD_SFG",
  282.     "CUP_arifle_Mk17_STD_EGLM",
  283.     "CUP_arifle_Mk17_CQC_SFG_Aim_mfsup",
  284.     "CUP_arifle_Mk17_STD_FG_Aim_Laser_snds",
  285.     "CUP_arifle_Mk17_STD_EGL_ElcanSpecter_Laser",
  286.     "CUP_arifle_Mk17_STD_FG_ANPAS13c1_Laser_Snds",
  287.     "CUP_arifle_Mk20",
  288.     "CUP_arifle_Mk20_LeupoldMk4MRT",
  289.     "CUP_arifle_Mk20_SB11420_snds",
  290.    
  291.     "CUP_arifle_XM8_Carbine",
  292.     "CUP_arifle_XM8_Carbine_FG",
  293.     "CUP_arifle_XM8_Carbine_GL",
  294.     "CUP_arifle_XM8_Compact",
  295.     "CUP_arifle_xm8_SAW",
  296.     "CUP_arifle_xm8_sharpshooter",
  297.     "CUP_arifle_XM8_Compact_Rail",
  298.     "CUP_arifle_XM8_Railed",
  299.     "CUP_arifle_XM8_Compact_Holo_Flashlight",
  300.     "CUP_arifle_XM8_Railed_Holo_Laser_snds",
  301.     "CUP_arifle_XM8_Railed_ANPAS13c1_Laser",
  302.     "CUP_arifle_XM8_Railed_ANPAS13c1_Laser_snds",
  303.    
  304.     // CUP Sniper Rifles
  305.     "CUP_srifle_LeeEnfield",
  306.     "CUP_srifle_CZ550",
  307.     "CUP_srifle_M14",
  308.     "CUP_srifle_M15_Aim",
  309.     "CUP_srifle_AS50",
  310.     "CUP_srifle_AS50_SBPMII",
  311.     "CUP_srifle_AS50_AMPAS13c2",
  312.     "CUP_srifle_AWM_des",
  313.     "CUP_srifle_AWM_wdl",
  314.     "CUP_srifle_AWM_des_SBPMII",
  315.     "CUP_srifle_AWM_wdl_SBPMII",
  316.     "CUP_srifle_CZ750",
  317.     "CUP_srifle_CZ750_SOS_bipod",
  318.     "CUP_srifle_DMR",
  319.     "CUP_srifle_DMR_LeupoldMk4",
  320.     "CUP_srifle_ksvk",
  321.     "CUP_arifle_ksvk_PSO3",
  322.     "CUP_srifle_Mk12SPR",
  323.     "CUP_srifle_Mk12SPR_LeupoldM3LR",
  324.     "CUP_srifle_M24_des",
  325.     "CUP_srifle_M24_wdl",
  326.     "CUP_srifle_M24_ghillie",
  327.     "CUP_srifle_M24_des_LeupoldMk4LRT",
  328.     "CUP_srifle_M24_wdl_LeupoldMk4LRT",
  329.     "CUP_srifle_M40A3",
  330.     "CUP_srifle_M107_Base",
  331.     "CUP_srifle_M107_LeupoldVX3",
  332.     "CUP_srifle_M107_ANPAS13c2",
  333.     "CUP_srifle_M110",
  334.     "CUP_srifle_M110_ANPVS10",
  335.     "CUP_srifle_M110_ANPAS13c2",
  336.     "CUP_srifle_SVD",
  337.     "CUP_srifle_SVD_pso",
  338.     "CUP_srifle_SVD_NSPU",
  339.     "CUP_srifle_SVD_des",
  340.     "CUP_srifle_SVD_Des_pso",
  341.     "CUP_srifle_SVD_wdl_ghillie",
  342.     "CUP_srifle_SVD_des_ghillie_pso",
  343.     "CUP_srifle_VSSVintorez",
  344.     "CUP_srifle_VSSVintorez_pso",
  345.    
  346.    
  347.     // CUP LMG's
  348.     "CUP_lmg_L7A2",
  349.     "CUP_lmg_L110A1",
  350.     "CUP_lmg_L110A1_Aim_Laser",
  351.     "CUP_lmg_M60E4",
  352.     "CUP_lmg_M240",
  353.     "CUP_lmg_M240_ElcanM143",
  354.     "CUP_lmg_M249_para",
  355.     "CUP_lmg_M249_ElcanM145_Laser",
  356.     "CUP_lmg_M249_ANPAS13c2_Laser",
  357.     "CUP_lmg_M249",
  358.     "CUP_lmg_Mk48_des",
  359.     "CUP_lmg_Mk48_wdl",
  360.     "CUP_lmg_Mk48_des_Aim_Laser",
  361.     "CUP_lmg_Mk48_wdl_Aim_Laser",
  362.     "CUP_lmg_PKM",
  363.     "CUP_lmg_Pecheneg",
  364.     "CUP_lmg_Pecheneg_PScope",
  365.     "CUP_lmg_UK59",
  366.    
  367.     // CUP GrenadeLaunchers
  368.     "CUP_glaunch_M32",
  369.     "CUP_glaunch_M79",
  370.     "CUP_glaunch_Mk13"
  371.    
  372.    
  373.    
  374. ];
  375.  
  376. _launcherWeapons =
  377. [
  378.  
  379.     // CUP Launchers
  380.     "CUP_launch_Igla",
  381.     "CUP_launch_FIM92Stinger",
  382.     "CUP_launch_9K32Strela",
  383.     "CUP_launch_Javelin",
  384.     "CUP_launch_M47",
  385.     "CUP_launch_M136",
  386.     "CUP_launch_MAAWS",
  387.     "CUP_launch_MAAWS_Scope",
  388.     "CUP_launch_Metis",
  389.     "CUP_launch_NLAW",
  390.     "CUP_launch_RPG7V",
  391.     "CUP_launch_RPG18",
  392.     "CUP_launch_Mk153Mod0",
  393.     "CUP_launch_Mk153Mod0_SMAWOptics",
  394.    
  395.     //Vannilla
  396.     "launch_B_Titan_F", // Titan MPRL (Sand)
  397.     "launch_I_Titan_short_F", // Titan MPRL Compact (Olive)
  398.     "launch_NLAW_F", // PCML
  399.     "launch_RPG32_F", // RPG-42 Alamut
  400.     "launch_RPG7_F" // RPG-7
  401. ];
  402.  
  403. _uniforms =
  404. [
  405.     // "U_BG_Guerilla1_1", // Guerilla Garment
  406.     // "U_BG_Guerilla2_1", // Guerilla Outfit (Plain, Dark)
  407.     // "U_BG_Guerilla2_2", // Guerilla Outfit (Pattern)
  408.     // "U_BG_Guerilla2_3", // Guerilla Outfit (Plain, Light)
  409.     // "U_BG_Guerilla3_1", // Guerilla Smocks
  410.     // "U_BG_Guerrilla_6_1", // Guerilla Apparel
  411.     // "U_BG_leader", // Guerilla Uniform
  412.     "U_B_CombatUniform_mcam", // Combat Fatigues (MTP)
  413.     "U_B_CombatUniform_mcam_tshirt", // Combat Fatigues (MTP) (Tee)
  414.     // "U_B_CombatUniform_mcam_vest", // Recon Fatigues (MTP)
  415.     // "U_B_CombatUniform_mcam_worn", // Worn Combat Fatigues (MTP)
  416.     "U_B_CTRG_1", // CTRG Combat Uniform
  417.     "U_B_CTRG_2", // CTRG Combat Uniform (Tee)
  418.     "U_B_CTRG_3", // CTRG Combat Uniform (Rolled-up)
  419.     "U_B_CTRG_Soldier_2_F", // CTRG Stealth Uniform (Tee)
  420.     "U_B_CTRG_Soldier_3_F", // CTRG Stealth Uniform (Rolled-up)
  421.     "U_B_CTRG_Soldier_F", // CTRG Stealth Uniform
  422.     "U_B_CTRG_Soldier_urb_1_F", // CTRG Urban Uniform
  423.     "U_B_CTRG_Soldier_urb_2_F", // CTRG Urban Uniform (Tee)
  424.     "U_B_CTRG_Soldier_urb_3_F", // CTRG Urban Uniform (Rolled-up)
  425.     "U_B_FullGhillie_ard", // Full Ghillie (Arid) [NATO]
  426.     "U_B_FullGhillie_lsh", // Full Ghillie (Lush) [NATO]
  427.     "U_B_FullGhillie_sard", // Full Ghillie (Semi-Arid) [NATO]
  428.     "U_B_GEN_Commander_F", // Gendarmerie Commander Uniform
  429.     "U_B_GEN_Soldier_F", // Gendarmerie Uniform
  430.     "U_B_GhillieSuit", // Ghillie Suit [NATO]
  431.     "U_B_HeliPilotCoveralls", // Heli Pilot Coveralls [NATO]
  432.     "U_B_PilotCoveralls", // Pilot Coveralls [NATO]
  433.     "U_B_Protagonist_VR", // VR Suit [NATO]
  434.     "U_B_survival_uniform", // Survival Fatigues
  435.     "U_B_T_FullGhillie_tna_F", // Full Ghillie (Jungle) [NATO]
  436.     "U_B_T_Sniper_F", // Ghillie Suit (Tropic) [NATO]
  437.     "U_B_T_Soldier_AR_F", // Combat Fatigues (Tropic, Tee)
  438.     "U_B_T_Soldier_F", // Combat Fatigues (Tropic)
  439.     "U_B_T_Soldier_SL_F", // Recon Fatigues (Tropic)
  440.     // "U_B_Wetsuit", // Wetsuit [NATO]
  441.     "U_Competitor", // Competitor Suit
  442.     "U_I_CombatUniform", // Combat Fatigues [AAF]
  443.     "U_I_CombatUniform_shortsleeve", // Combat Fatigues [AAF] (Rolled-up)
  444.     "U_I_C_Soldier_Para_1_F", // Paramilitary Garb (Tee)
  445.     "U_I_C_Soldier_Para_2_F", // Paramilitary Garb (Jacket)
  446.     "U_I_C_Soldier_Para_3_F", // Paramilitary Garb (Shirt)
  447.     "U_I_C_Soldier_Para_4_F", // Paramilitary Garb (Tank Top)
  448.     "U_I_C_Soldier_Para_5_F", // Paramilitary Garb (Shorts)
  449.     // "U_I_FullGhillie_ard", // Full Ghillie (Arid) [AAF]
  450.     // "U_I_FullGhillie_lsh", // Full Ghillie (Lush) [AAF]
  451.     // "U_I_FullGhillie_sard", // Full Ghillie (Semi-Arid) [AAF]
  452.     "U_I_GhillieSuit", // Ghillie Suit [AAF]
  453.     "U_I_HeliPilotCoveralls", // Heli Pilot Coveralls [AAF]
  454.     "U_I_OfficerUniform", // Combat Fatigues [AAF] (Officer)
  455.     "U_I_pilotCoveralls", // Pilot Coveralls [AAF]
  456.     // "U_I_Wetsuit", // Wetsuit [AAF]
  457.     "U_O_CombatUniform_ocamo", // Fatigues (Hex) [CSAT]
  458.     "U_O_CombatUniform_oucamo", // Fatigues (Urban) [CSAT]
  459.     // "U_O_FullGhillie_ard", // Full Ghillie (Arid) [CSAT]
  460.     // "U_O_FullGhillie_lsh", // Full Ghillie (Lush) [CSAT]
  461.     // "U_O_FullGhillie_sard", // Full Ghillie (Semi-Arid) [CSAT]
  462.     "U_O_GhillieSuit", // Ghillie Suit [CSAT]
  463.     "U_O_OfficerUniform_ocamo", // Officer Fatigues (Hex)
  464.     "U_O_PilotCoveralls", // Pilot Coveralls [CSAT]
  465.     "U_O_SpecopsUniform_ocamo", // Recon Fatigues (Hex)
  466.     // "U_O_T_FullGhillie_tna_F", // Full Ghillie (Jungle) [CSAT]
  467.     "U_O_T_Officer_F", // Officer Fatigues (Green Hex) [CSAT]
  468.     "U_O_T_Sniper_F", // Ghillie Suit (Green Hex) [CSAT]
  469.     "U_O_T_Soldier_F" // Fatigues (Green Hex) [CSAT]
  470.     // "U_O_V_Soldier_Viper_F", // Special Purpose Suit (Green Hex)
  471.     // "U_O_V_Soldier_Viper_hex_F", // Special Purpose Suit (Hex)
  472.     // "U_O_Wetsuit", // Wetsuit [CSAT]
  473. ];
  474.  
  475. _vests =
  476. [
  477.     "V_BandollierB_blk", // Slash Bandolier (Black)
  478.     "V_BandollierB_cbr", // Slash Bandolier (Coyote)
  479.     "V_BandollierB_ghex_F", // Slash Bandolier (Green Hex)
  480.     "V_BandollierB_khk", // Slash Bandolier (Khaki)
  481.     "V_BandollierB_oli", // Slash Bandolier (Olive)
  482.     "V_BandollierB_rgr", // Slash Bandolier (Green)
  483.     "V_Chestrig_blk", // Chest Rig (Black)
  484.     "V_Chestrig_khk", // Chest Rig (Khaki)
  485.     "V_Chestrig_oli", // Chest Rig (Olive)
  486.     "V_Chestrig_rgr", // Chest Rig (Green)
  487.     "V_HarnessOGL_brn", // LBV Grenadier Harness
  488.     "V_HarnessOGL_ghex_F", // LBV Grenadier Harness (Green Hex)
  489.     "V_HarnessOGL_gry", // LBV Grenadier Harness (Grey)
  490.     "V_HarnessO_brn", // LBV Harness
  491.     "V_HarnessO_ghex_F", // LBV Harness (Green Hex)
  492.     "V_HarnessO_gry", // LBV Harness (Grey)
  493.     "V_I_G_resistanceLeader_F", // Tactical Vest (Stavrou)
  494.     "V_PlateCarrier1_blk", // Carrier Lite (Black)
  495.     "V_PlateCarrier1_rgr", // Carrier Lite (Green)
  496.     "V_PlateCarrier1_rgr_noflag_F", // Carrier Lite (Green, No Flag)
  497.     "V_PlateCarrier1_tna_F", // Carrier Lite (Tropic)
  498.     "V_PlateCarrier2_blk", // Carrier Rig (Black)
  499.     "V_PlateCarrier2_rgr", // Carrier Rig (Green)
  500.     "V_PlateCarrier2_rgr_noflag_F", // Carrier Rig (Green, No Flag)
  501.     "V_PlateCarrier2_tna_F", // Carrier Rig (Tropic)
  502.     "V_PlateCarrierGL_blk", // Carrier GL Rig (Black)
  503.     "V_PlateCarrierGL_mtp", // Carrier GL Rig (MTP)
  504.     "V_PlateCarrierGL_rgr", // Carrier GL Rig (Green)
  505.     "V_PlateCarrierGL_tna_F", // Carrier GL Rig (Tropic)
  506.     "V_PlateCarrierH_CTRG", // CTRG Plate Carrier Rig Mk.2 (Heavy)
  507.     "V_PlateCarrierIA1_dgtl", // GA Carrier Lite (Digi)
  508.     "V_PlateCarrierIA2_dgtl", // GA Carrier Rig (Digi)
  509.     "V_PlateCarrierIAGL_dgtl", // GA Carrier GL Rig (Digi)
  510.     "V_PlateCarrierIAGL_oli", // GA Carrier GL Rig (Olive)
  511.     "V_PlateCarrierL_CTRG", // CTRG Plate Carrier Rig Mk.1 (Light)
  512.     "V_PlateCarrierSpec_blk", // Carrier Special Rig (Black)
  513.     "V_PlateCarrierSpec_mtp", // Carrier Special Rig (MTP)
  514.     "V_PlateCarrierSpec_rgr", // Carrier Special Rig (Green)
  515.     "V_PlateCarrierSpec_tna_F", // Carrier Special Rig (Tropic)
  516.     "V_PlateCarrier_Kerry", // US Plate Carrier Rig (Kerry)
  517.     "V_Rangemaster_belt", // Rangemaster Belt
  518.     "V_TacChestrig_cbr_F", // Tactical Chest Rig (Coyote)
  519.     "V_TacChestrig_grn_F", // Tactical Chest Rig (Green)
  520.     "V_TacChestrig_oli_F", // Tactical Chest Rig (Olive)
  521.     "V_TacVestIR_blk", // Raven Vest
  522.     "V_TacVest_blk", // Tactical Vest (Black)
  523.     "V_TacVest_brn", // Tactical Vest (Brown)
  524.     "V_TacVest_camo", // Tactical Vest (Camo)
  525.     "V_TacVest_gen_F", // Gendarmerie Vest
  526.     "V_TacVest_khk", // Tactical Vest (Khaki)
  527.     "V_TacVest_oli" // Tactical Vest (Olive)
  528. ];
  529.  
  530. _headGear =
  531. [
  532.     "H_HelmetB", // Combat Helmet
  533.     "H_HelmetB_black", // Combat Helmet (Black)
  534.     "H_HelmetB_camo", // Combat Helmet (Camo)
  535.     "H_HelmetB_desert", // Combat Helmet (Desert)
  536.     "H_HelmetB_Enh_tna_F", // Enhanced Combat Helmet (Tropic)
  537.     "H_HelmetB_grass", // Combat Helmet (Grass)
  538.     "H_HelmetB_light", // Light Combat Helmet
  539.     "H_HelmetB_light_black", // Light Combat Helmet (Black)
  540.     "H_HelmetB_light_desert", // Light Combat Helmet (Desert)
  541.     "H_HelmetB_light_grass", // Light Combat Helmet (Grass)
  542.     "H_HelmetB_light_sand", // Light Combat Helmet (Sand)
  543.     "H_HelmetB_light_snakeskin", // Light Combat Helmet (Snakeskin)
  544.     "H_HelmetB_Light_tna_F", // Light Combat Helmet (Tropic)
  545.     "H_HelmetB_sand", // Combat Helmet (Sand)
  546.     "H_HelmetB_snakeskin", // Combat Helmet (Snakeskin)
  547.     "H_HelmetB_tna_F", // Combat Helmet (Tropic)
  548.     "H_HelmetCrew_B", // Crew Helmet [NATO]
  549.     "H_HelmetCrew_I", // Crew Helmet [AAF]
  550.     "H_HelmetCrew_O", // Crew Helmet [CSAT]
  551.     "H_HelmetCrew_O_ghex_F", // Crew Helmet (Green Hex) [CSAT]
  552.     "H_HelmetIA", // Modular Helmet
  553.     "H_HelmetLeaderO_ghex_F", // Defender Helmet (Green Hex)
  554.     "H_HelmetLeaderO_ocamo", // Defender Helmet (Hex)
  555.     "H_HelmetLeaderO_oucamo", // Defender Helmet (Urban)
  556.     "H_HelmetO_ghex_F", // Protector Helmet (Green Hex)
  557.     "H_HelmetO_ocamo", // Protector Helmet (Hex)
  558.     "H_HelmetO_oucamo", // Protector Helmet (Urban)
  559.     "H_HelmetSpecB", // Enhanced Combat Helmet
  560.     "H_HelmetSpecB_blk", // Enhanced Combat Helmet (Black)
  561.     "H_HelmetSpecB_paint1", // Enhanced Combat Helmet (Grass)
  562.     "H_HelmetSpecB_paint2", // Enhanced Combat Helmet (Desert)
  563.     "H_HelmetSpecB_sand", // Enhanced Combat Helmet (Sand)
  564.     "H_HelmetSpecB_snakeskin", // Enhanced Combat Helmet (Snakeskin)
  565.     "H_HelmetSpecO_blk", // Assassin Helmet (Black)
  566.     "H_HelmetSpecO_ghex_F", // Assassin Helmet (Green Hex)
  567.     "H_HelmetSpecO_ocamo" // Assassin Helmet (Hex)
  568. ];
  569.  
  570. _backPacks =
  571. [
  572.     "B_AssaultPack_blk", // Assault Pack (Black)
  573.     "B_AssaultPack_cbr", // Assault Pack (Coyote)
  574.     "B_AssaultPack_dgtl", // Assault Pack (Digi)
  575.     "B_AssaultPack_khk", // Assault Pack (Khaki)
  576.     "B_AssaultPack_mcamo", // Assault Pack (MTP)
  577.     "B_AssaultPack_ocamo", // Assault Pack (Hex)
  578.     "B_AssaultPack_rgr", // Assault Pack (Green)
  579.     "B_AssaultPack_sgg", // Assault Pack (Sage)
  580.     "B_AssaultPack_tna_F", // Assault Pack (Tropic)
  581.     "B_Carryall_cbr", // Carryall Backpack (Coyote)
  582.     "B_Carryall_ghex_F", // Carryall Backpack (Green Hex)
  583.     "B_Carryall_khk", // Carryall Backpack (Khaki)
  584.     "B_Carryall_mcamo", // Carryall Backpack (MTP)
  585.     "B_Carryall_ocamo", // Carryall Backpack (Hex)
  586.     "B_Carryall_oli", // Carryall Backpack (Olive)
  587.     "B_Carryall_oucamo", // Carryall Backpack (Urban)
  588.     "B_FieldPack_blk", // Field Pack (Black)
  589.     "B_FieldPack_cbr", // Field Pack (Coyote)
  590.     "B_FieldPack_ghex_F", // Field Pack (Green Hex)
  591.     "B_FieldPack_khk", // Field Pack (Khaki)
  592.     "B_FieldPack_ocamo", // Field Pack (Hex)
  593.     "B_FieldPack_oli", // Field Pack (Olive)
  594.     "B_FieldPack_oucamo", // Field Pack (Urban)
  595.     "B_Kitbag_cbr", // Kitbag (Coyote)
  596.     "B_Kitbag_mcamo", // Kitbag (MTP)
  597.     "B_Kitbag_rgr", // Kitbag (Green)
  598.     "B_Kitbag_sgg", // Kitbag (Sage)
  599.     "B_TacticalPack_blk", // Tactical Backpack (Black)
  600.     "B_TacticalPack_mcamo", // Tactical Backpack (MTP)
  601.     "B_TacticalPack_ocamo", // Tactical Backpack (Hex)
  602.     "B_TacticalPack_oli", // Tactical Backpack (Olive)
  603.     "B_TacticalPack_rgr", // Tactical Backpack (Green)
  604.     "B_ViperHarness_blk_F", // Viper Harness (Black)
  605.     "B_ViperHarness_ghex_F", // Viper Harness (Green Hex)
  606.     "B_ViperHarness_hex_F", // Viper Harness (Hex)
  607.     "B_ViperHarness_khk_F", // Viper Harness (Khaki)
  608.     "B_ViperHarness_oli_F", // Viper Harness (Olive)
  609.     "B_ViperLightHarness_blk_F", // Viper Light Harness (Black)
  610.     "B_ViperLightHarness_ghex_F", // Viper Light Harness (Green Hex)
  611.     "B_ViperLightHarness_hex_F", // Viper Light Harness (Hex)
  612.     "B_ViperLightHarness_khk_F", // Viper Light Harness (Khaki)
  613.     "B_ViperLightHarness_oli_F" // Viper Light Harness (Olive)
  614. ];
  615.  
  616. _opticsDisallow =
  617. [
  618.     // "optic_Aco", // ACO (Red)
  619.     // "optic_ACO_grn", // ACO (Green)
  620.     // "optic_ACO_grn_smg", // ACO SMG (Green)
  621.     // "optic_Aco_smg", // ACO SMG (Red)
  622.     "optic_AMS", // AMS (Black)
  623.     "optic_AMS_khk", // AMS (Khaki)
  624.     "optic_AMS_snd", // AMS (Sand)
  625.     // "optic_Arco", // ARCO
  626.     // "optic_Arco_blk_F", // ARCO (Black)
  627.     // "optic_Arco_ghex_F", // ARCO (Green Hex)
  628.     "optic_DMS", // DMS
  629.     "optic_DMS_ghex_F", // DMS (Green Hex)
  630.     // "optic_ERCO_blk_F", // ERCO (Black)
  631.     // "optic_ERCO_khk_F", // ERCO (Khaki)
  632.     // "optic_ERCO_snd_F", // ERCO (Sand)
  633.     // "optic_Hamr", // RCO
  634.     // "optic_Hamr_khk_F", // RCO (Khaki)
  635.     // "optic_Holosight", // Mk17 Holosight
  636.     // "optic_Holosight_blk_F", // Mk17 Holosight (Black)
  637.     // "optic_Holosight_khk_F", // Mk17 Holosight (Khaki)
  638.     // "optic_Holosight_smg", // Mk17 Holosight SMG
  639.     // "optic_Holosight_smg_blk_F", // Mk17 Holosight SMG (Black)
  640.     "optic_KHS_blk", // Kahlia (Black)
  641.     "optic_KHS_hex", // Kahlia (Hex)
  642.     "optic_KHS_old", // Kahlia (Old)
  643.     "optic_KHS_tan", // Kahlia (Tan)
  644.     "optic_LRPS", // LRPS
  645.     "optic_LRPS_ghex_F", // LRPS (Green Hex)
  646.     "optic_LRPS_tna_F", // LRPS (Tropic)
  647.     // "optic_MRCO", // MRCO
  648.     // "optic_MRD", // MRD
  649.     "optic_Nightstalker", // Nightstalker
  650.     "optic_NVS", // NVS
  651.     "optic_SOS", // MOS
  652.     "optic_SOS_khk_F", // MOS (Khaki)
  653.     "optic_tws", // TWS
  654.     "optic_tws_mg", // TWS MG
  655.     // "optic_Yorris" // Yorris J2
  656.    
  657.     // CUP Attatchments
  658.     "CUP_optic_PSO_1",
  659.     "CUP_optic_PSO_3",
  660.     "CUP_optic_Kobra",
  661.     "CUP_optic_GOSHAWK",
  662.     "CUP_optic_NSPU",
  663.     "CUP_optic_PechenegScope"
  664.     "CUP_optic_MAAWS_Scope",   
  665.     "CUP_optic_SMAW_Scope",
  666.     "CUP_optic_SB_3_12x50_PMII",
  667.     "CUP_optic_AN_PAS_13c2",
  668.     "CUP_optic_LeupoldMk4",
  669.     "CUP_optic_HoloBlack",
  670.     "CUP_optic_HoloWdl",
  671.     "CUP_optic_HoloDesert",
  672.     "CUP_optic_Eotech533",
  673.     "CUP_optic_Eotech533Grey",
  674.     "CUP_optic_CompM4",
  675.     "CUP_optic_SUSAT",
  676.     "CUP_optic_ACOG",
  677.     "CUP_optic_CWS",
  678.     "CUP_optic_Leupold_VX3",
  679.     "CUP_optic_AN_PVS_10",
  680.     "CUP_optic_CompM2_Black",
  681.     "CUP_optic_CompM2_Woodland",
  682.     "CUP_optic_CompM2_Woodland2",
  683.     "CUP_optic_CompM2_Desert"
  684.     "CUP_optic_RCO",
  685.     "CUP_optic_RCO_desert",
  686.     "CUP_optic_LeupoldM3LR",
  687.     "CUP_optic_LeupoldMk4_10x40_LRT_Desert",
  688.     "CUP_optic_LeupoldMk4_10x40_LRT_Woodland",
  689.     "CUP_optic_ElcanM145",
  690.     "CUP_optic_AN_PAS_13c1",
  691.     "CUP_optic_LeupoldMk4_CQ_T",
  692.     "CUP_optic_ELCAN_SpecterDR",
  693.     "CUP_optic_LeupoldMk4_MRT_tan",
  694.     "CUP_optic_SB_11_4x20_PM",
  695.     "CUP_optic_ZDDot",
  696.     "CUP_optic_MRad",
  697.     "CUP_acc_CZ_M3X",
  698.     "CUP_optic_TrijiconRx01_desert",
  699.     "CUP_optic_TrijiconRx01_black",
  700.     "CUP_optic_AN_PVS_4"
  701.    
  702. ];
  703.  
  704. /*  ------------------------------------------------------------------------------------------
  705.     DO NOT EDIT BELOW HERE!
  706.     ------------------------------------------------------------------------------------------  */
  707.  
  708. _soldier = _this select 0;
  709.  
  710. removeUniform _soldier;
  711. removeHeadgear _soldier:
  712. removeGoggles _soldier;
  713. removeVest _soldier;
  714. removeBackpack _soldier;
  715. removeAllWeapons _soldier;
  716. removeAllAssignedItems _soldier;
  717. removeAllItems _soldier;
  718.  
  719. _soldierUniform = selectRandom _uniforms;
  720. _soldier addUniform _soldierUniform;
  721.  
  722. if ((_headGearProbability > random 99) || (_headGearProbability == 100)) then
  723. {
  724.     _soldierHeadgear = selectRandom _headGear;
  725.     _soldier addHeadgear _soldierHeadgear;
  726. };
  727.  
  728. if ((_vestProbability > random 99) || (_vestProbability == 100)) then
  729. {
  730.     _soldierVest = selectRandom _vests;
  731.     _soldier addVest _soldierVest;
  732. };
  733.  
  734. if ((_backpackProbability > random 99) || (_backpackProbability == 100)) then
  735. {
  736.     _soldierBackpack = selectRandom _backPacks;
  737.     _soldier addBackPack _soldierBackpack;
  738. };
  739.  
  740. if ((_launcherProbability > random 99) || (_launcherProbability == 100)) then
  741. {
  742.     if (isNull (unitBackpack _soldier)) then
  743.     {
  744.         _soldierBackpack = selectRandom _backPacks;
  745.         _soldier addBackPack _soldierBackpack;
  746.     };
  747.     _soldierLauncherWeapon = selectRandom _launcherWeapons;
  748.     _soldierLauncherWeaponAdd = [_soldier, _soldierLauncherWeapon, _launcherMagazineAmount] call BIS_fnc_addWeapon;
  749. };
  750.  
  751. _soldierPrimaryWeapon = selectRandom _primaryWeapons;
  752. _soldierPrimaryWeaponAdd = [_soldier, _soldierPrimaryWeapon, _weaponMagazineAmount] call BIS_fnc_addWeapon;
  753.  
  754. if ((_muzzleProbability > random 99) || (_muzzleProbability == 100)) then
  755. {
  756.     _soldierPrimaryMuzzles = []; _soldierPrimaryMuzzles = getArray (configFile >> "CfgWeapons" >> _soldierPrimaryWeapon >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems");
  757.     if ((count _soldierPrimaryMuzzles) >= 1) then
  758.     {
  759.         _soldierPrimaryMuzzle = selectRandom _soldierPrimaryMuzzles;
  760.         _soldier addPrimaryWeaponItem _soldierPrimaryMuzzle;
  761.     };
  762. };
  763.  
  764. if ((_pointerProbability > random 99) || (_pointerProbability == 100)) then
  765. {
  766.     _soldierPrimaryPointers = []; _soldierPrimaryPointers = getArray (configFile >> "CfgWeapons" >> _soldierPrimaryWeapon >> "WeaponSlotsInfo" >> "PointerSlot" >> "compatibleItems");
  767.     if ((count _soldierPrimaryPointers) >= 1) then
  768.     {
  769.         _soldierPrimaryPointer = selectRandom _soldierPrimaryPointers;
  770.         _soldier addPrimaryWeaponItem _soldierPrimaryPointer;
  771.     };
  772. };
  773.  
  774. if ((_opticProbability > random 99) || (_opticProbability == 100)) then
  775. {
  776.     _soldierPrimaryOptics = []; _soldierPrimaryOptics = getArray (configFile >> "CfgWeapons" >> _soldierPrimaryWeapon >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems");
  777.     _soldierPrimaryOptics = _soldierPrimaryOptics - _opticsDisallow;
  778.     if ((count _soldierPrimaryOptics) >= 1) then
  779.     {
  780.         _soldierPrimaryOptic = selectRandom _soldierPrimaryOptics;
  781.         _soldier addPrimaryWeaponItem _soldierPrimaryOptic;
  782.     };
  783. };
  784.  
  785. if ((_healthProbability > random 99) || (_healthProbability == 100)) then
  786. {
  787.     for "_i" from 1 to _healthAmount do
  788.     {
  789.         _soldier addItem "FirstAidKit";
  790.         _soldier setUnitTrait ["Medic",true];
  791.     };
  792. };
  793.  
  794. if ((_grenadeProbability > random 99) || (_grenadeProbability == 100)) then
  795. {
  796.     _soldier addMagazines ["HandGrenade", _grenadeAmount];
  797. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement