CO Folk ARPS Assign Gear Script

From F2 EN
Jump to navigation Jump to search


Changing the gear for different unit types within a CO Folk ARPS Platoons can become very time consuming if using commands entered directly into the INIT field of each unit (in the editor). This component provides an easy way to quickly and easily assign the correct gear for all the standard roles in a CO Folk ARPS Platoon (and attachments), from commander to rifleman. This component can also be used to load the correct equipment into vehicles, and has been used to fill the cargo holds of selected pre-placed vehicles in the CO Folk ARPS Platoons.

Note: Two riflemen named F2_Precompile_East and F2_Precompile_West are pre-placed in the mission file. DO NOT DELETE OR EDIT these units, as they are vital to the correct functioning of this component (you can move them to an unused part of the map, F2 will delete them at the start of the mission).

Required files

All the code associated with this component is found in:

  • init.sqf
  • f\common\folk_assignGear.sqf
  • f\common\folk_assignGear_acr.sqf (requires ACR DLC)
  • f\common\folk_assignGear_acre.sqf
  • f\common\folk_assignGear_baf.sqf
  • f\common\folk_assignGear_cdf.sqf
  • f\common\folk_assignGear_civ_special.sqf
  • f\common\folk_assignGear_cz.sqf
  • f\common\folk_assignGear_ger.sqf
  • f\common\folk_assignGear_gue.sqf
  • f\common\folk_assignGear_ins.sqf
  • f\common\folk_assignGear_ru.sqf
  • f\common\folk_assignGear_tk.sqf
  • f\common\folk_assignGear_tk_civ.sqf
  • f\common\folk_assignGear_tk_gue.sqf
  • f\common\folk_assignGear_tk_ins.sqf
  • f\common\folk_assignGear_un.sqf
  • f\common\folk_assignGear_us.sqf
  • f\common\folk_assignGear_us_alt.sqf
  • f\common\folk_assignGear_usmc.sqf
  • f\common\folk_assignGearCleanUp.sqf
  • f\common\f_addMagToRuck.sqf
  • f\common\f_addWepToRuck.sqf

How to use

Calling the script

To call the script for a unit you must edit its INIT line in the editor to include the following code:

nul = ["co",this] call f_fnc_assignGear;

Note that the precise code will change depending on the type of role you want the unit to play; so in the example above the unit has been defined as a commander, but if you wanted the unit to be a fireteam leader the code would be:

nul = ["ftl",this] call f_fnc_assignGear;

For a full set of available roles and corresponding code please see the table below.

Available unit types

By default, the following unit types are available:

Unit TypeCode
Commandernul = ["co",this] call f_fnc_assignGear;
Deputy Commandernul = ["dc",this] call f_fnc_assignGear;
Medicnul = ["m",this] call f_fnc_assignGear;
Fireteam Leadernul = ["ftl",this] call f_fnc_assignGear;
Automatic Riflemannul = ["ar",this] call f_fnc_assignGear;
Assistant Automatic Riflemannul = ["aar",this] call f_fnc_assignGear;
Rifleman (AT)nul = ["rat",this] call f_fnc_assignGear;
Medium MG Gunnernul = ["mmgg",this] call f_fnc_assignGear;
Medium MG Assistant Gunnernul = ["mmgag",this] call f_fnc_assignGear;
Heavy MG Gunnernul = ["hmgg",this] call f_fnc_assignGear;
Heavy MG Assistant Gunnernul = ["hmgag",this] call f_fnc_assignGear;
Medium AT Gunnernul = ["matg",this] call f_fnc_assignGear;
Medium AT Assistant Gunnernul = ["matag",this] call f_fnc_assignGear;
Heavy AT Gunnernul = ["hatg",this] call f_fnc_assignGear;
Heavy AT Assistant Gunnernul = ["hatag",this] call f_fnc_assignGear;
SAM Gunnernul = ["samg",this] call f_fnc_assignGear;
SAM Assistant Gunnernul = ["samag",this] call f_fnc_assignGear;
Snipernul = ["sn",this] call f_fnc_assignGear;
Spotternul = ["sp",this] call f_fnc_assignGear;
Ground Vehicle Crewnul = ["c",this] call f_fnc_assignGear;
Air Vehicle Pilot/Crewnul = ["p",this] call f_fnc_assignGear;
Engineernul = ["eng",this] call f_fnc_assignGear;
Riflemannul = ["r",this] call f_fnc_assignGear;
Carabineernul = ["car",this] call f_fnc_assignGear;
Sub-machinegunnernul = ["smg",this] call f_fnc_assignGear;
Grenadiernul = ["gren",this] call f_fnc_assignGear;

Available vehicle cargo loads

By default, the following vehicle cargo loads are available:

Vehicle TypeCodeNotes
Car/4WDnul = ["v_car",this] call f_fnc_assignGear;Resupplies 1 x fireteam
Trucknul = ["v_tr",this] call f_fnc_assignGear;Resupplies 1 x squad
IFVnul = ["v_ifv",this] call f_fnc_assignGear;Resupplies 2 x fireteams

Changing faction equipment

The equipment and weapons for each faction are defined in a series of variables contained near the start of the faction-specific file. For example, to change the equipment and weapons for Takistani Army units open the file f\common\folk_assignGear_tk.sqf and look for the line:


In the block of code beneath simply change the values of variable such as _rifle or _rifleGL. For example, to change the standard rifle from an AKS-74 (Kobra) to an M16A4, edit the following code:

_rifle = "AKS_74_kobra";

Change it to:

_rifle = "M16A4";

Changing a unit type loadout

The equipment and weapons for each faction are defined using blocks of code in the faction-specific file (e.g. f\common\folk_assignGear_tk.sqf). For example, to change the equipment and weapons for a sniper open the file and look for the line:


In the block of code beneath simply change the variable used with the addweapon and addmagazine commands. For example, to replace a sniper's rifle with the standard rifle for that faction, edit the following lines:

{_unit addmagazine _SNriflemag} foreach [1,2];
_unit addweapon _SNrifle;

Change them to:

{_unit addmagazine _riflemag} foreach [1,2,3,4,5,6,7];
_unit addweapon _rifle;

Alternative and extra faction equipment files

Alternative and extra equipment files for the US Army and ACR factions are included:

  • f\common\folk_assignGear_acr.sqf
  • f\common\folk_assignGear_us_alt.sqf

To use the alternative equipment file for the US Army faction open the file f\common\folk_assignGear.sqf and look for the code block entitled:


Find the following line:

#include "folk_assignGear_us.sqf"

Change it to:

#include "folk_assignGear_us_alt.sqf"


  • All the standard CO Folk ARPS Platoons (including attachments and selected pre-placed vehicles) already have the appropriate calls in the INIT lines of every unit.

How to disable

In the editor, edit each unit's INIT to remove the following code:

nul = ["co",this] call f_fnc_assignGear;

Note: The string "co" in the example above will change (see table above).


  • (kungtotte)
  • (Macolik)
  • (Redkid)
  • (Henk)
  • (kevb0)
  • (Wolf)
  • (Dslyecxi)
  • Tigershark
  • Nullkigan
  • Fer
  • Wolfenswan
  • Harakka
  • DarkTatka