-
Notifications
You must be signed in to change notification settings - Fork 5
Assign Gear
File location | f\assignGear |
Enabled by default? | Yes |
Enable/Disable in | Object init |
Runs on | Server/Client |
The assign gear component allows for quick, faction-configurable assignment of equipment to units and vehicles. The component also defines default equipment loadouts for most of the vanilla game factions, including light variants that can be enabled by mission parameter.
Assignment of gear through Assign Gear is done through the f_fnc_assignGear
function.
[unit type, unit, (faction)] call f_fnc_assignGear;
For example, to equip a unit with rifleman gear, paste the following into their init field:
["r",this] call f_fnc_assignGear;
Unit types are defined in the faction-specific assign gear files. However, most of these types are the same between all factions. A list of default classes can be found below.
The third parameter is an optional faction parameter. By default, assign gear will give a unit equipment based on its in-game faction. By including this third parameter, you can override this behavior, for example to give a CSAT rifleman NATO gear. Faction names can be found in f\assignGear\fn_assignGear.sqf
, or you can find a list of default names below.
["r",this,"csat"] call f_fnc_assignGear; // equip a unit specifically with CSAT rifleman gear
In addition, in the mission parameters there is a loadout type option that can be used to swap between a standard faction loadout and a light faction loadout. The light loadouts typically feature lighter armor and lower ammo counts for a faster but weaker fighting force.
The equipment loadout for each faction is defined in a series of files in the f\assignGear
folder. For example, NATO's loadouts are defined in f_assignGear_nato.sqf
(the main file, which defines equipment types), f_assignGear_nato_standard.sqf
(defines standard class loadouts), f_assignGear_nato_light.sqf
(defines light class loadouts), and f_assignGear_nato_v.sqf
(defines vehicle and ammo crate equipment).
The easiest way to modify a faction's equipment is to change the kind of weapons, uniforms, and other equipment that they use. These are defined in each faction's main file (f_assignGear_factionName.sqf
) as variables.
For example, let's say that we want to change NATO's primary rifle from the MX to the SPAR-16. To do this, we would look in f_assignGear_nato.sqf
and find the block of code that defines the _rifle
variable:
// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
_rifle = "arifle_MX_F";
_riflemag = "30Rnd_65x39_caseless_mag";
_riflemag_tr = "30Rnd_65x39_caseless_mag_Tracer";
We would then update these with the proper weapon and magazine classnames for the SPAR-16 (these can be found in the editor, or in various online resources).
// Standard Riflemen ( MMG Assistant Gunner, Assistant Automatic Rifleman, MAT Assistant Gunner, MTR Assistant Gunner, Rifleman)
_rifle = "arifle_SPAR_01_blk_F";
_riflemag = "30Rnd_556x45_Stanag_red";
_riflemag_tr = "30Rnd_556x45_Stanag_Tracer_Red";
This would reequip all units that use rifles from the MX to the SPAR.
Weapon attachments are modified using the special _attachments
and _hg_attachments
variables, corresponding to the primary weapon and handgun attachments. These variables are arrays of attachment names and are defined near the top of the main f_assignGear_factionName.sqf
files. Individual class loadouts can also overwrite or add on to these variables, for example to add bipods or stronger optics to support weapons like MGs and sniper rifles.
To change the default attachment loadouts, simply modifying the default _attachments
and _hg_attachments
arrays. For example, to give units' primary weapon a flashlight, silencer, and a bipod, change the _attachments
definition to:
_attachments = [_attach2,_silencer2,_bipod1];
Assign gear uses a special system to assign uniforms to units. By default, there is a default uniform, plus 5 special uniforms for divers, pilots, crewmen, ghillie suit snipers, and spec ops units.
To change uniforms, look for the "CLOTHES AND UNIFORMS" block of code in the main f_assignGear_factionName.sqf
file. This block defines clothes, helmets, goggles, and vests for each of the base uniform classes. Each slot defines an array of equipment classnames that can go in that slot; if multiple classnames are specified, one will be selected at random when gear is assigned.
For example, let's look at the base uniform for NATO:
// Basic clothing
// The outfit-piece is randomly selected from the array for each unit
_baseUniform = ["U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt","U_B_CombatUniform_mcam_vest"];
_baseHelmet = ["H_HelmetB","H_HelmetB_grass","H_HelmetB_sand"];
_baseGlasses = [];
// Vests
_lightRig = ["V_Chestrig_khk"];
_standardRig = ["V_PlateCarrier2_rgr"];
If we wanted to change the type of helmet and armor vest they use, we would modify the _baseHelmet
, _lightRig
, and _standardRig
variables:
// Basic clothing
// The outfit-piece is randomly selected from the array for each unit
_baseUniform = ["U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt","U_B_CombatUniform_mcam_vest"];
_baseHelmet = ["H_PilotHelmetHeli_B"]; // Heli pilot helmet
_baseGlasses = [];
// Vests
_lightRig = []; // Nothing!
_standardRig = ["V_TacVest_gen_F"]; // Gendarme vest
Debugging tip: if you specify an invalid classname for a uniform slot, soldiers will end up with no equipment in that slot. If you end up with soldiers in their skivvies, check your uniform variables for misspelled or invalid classnames.
Typically, if you're just swapping out one rifle for another, it's not necessary to modify the actual unit type loadouts yourself. However, if you want more fine-grained control over what different classes are equipped with, this can be changed in the other three faction assign gear files. f_assignGear_factionName_standard.sqf
contains definition for the standard loadout, f_assignGear_factionName_light.sqf
for the light loadout, and f_assignGear_factionName_v.sqf
contains common resupply "loadouts" for vehicles and ammo boxes.
In order to tweak loadouts, find the corresponding code block for the class you're trying to change in one of these loadout files. For example, let's say we want helicopter crewmen to carry pistols instead of SMGs. We would find the helicopter crewman codeblock:
// Helicopter Crew Loadout:
case "pc":
{
_unit addmagazines [_smgmag, 1];
_unit addweapon _smg;
_unit addItem _firstaid ;
_unit addmagazines [_smokegrenadeblue, 3];
_unit addmagazines [_smgmag, 4];
};
We would then change this equipment code to add a pistol weapon and magazines instead of SMG ones:
// Helicopter Crew Loadout:
case "pc":
{
_unit addmagazines [_pistolmag, 1];
_unit addweapon _pistol;
_unit addItem _firstaid ;
_unit addmagazines [_smokegrenadeblue, 3];
_unit addmagazines [_pistolmag, 4];
};
We can also add new code blocks to add custom classes to the file:
// Grenade Thrower Loadout:
case "gt":
{
_unit addMagazines [_grenade,20];
};
The individual faction loadout files are associated with the actual in-game factions in f\fn_assignGear.sqf
. By editing this file, it is possible to change the loadout file a faction uses, or even to add new factions to Assign Gear.
For example, this block of code tells Assign Gear to give NATO gear to units from the NATO faction:
// GEAR: BLUFOR > NATO
// The following block of code executes only if the unit belongs to the NATO faction; it
// automatically includes a file which contains the appropriate equipment data.
if (_faction in ["blu_f","nato"]) then {
#include "f_assignGear_nato.sqf"
// #include "f_assignGear_natoPacific.sqf" // Use NATO Pacific loadouts on NATO non-Pacific units (e.g. Folk ARPS
Platoons)
};
As you can see, there is an alternative reference here to the NATO Pacific files. By commenting out the first line and uncommenting the second, we can make it so the default western NATO units use NATO Pacific gear:
if (_faction in ["blu_f","nato"]) then {
//#include "f_assignGear_nato.sqf"
#include "f_assignGear_natoPacific.sqf" // Use NATO Pacific loadouts on NATO non-Pacific units (e.g. Folk ARPS
Platoons)
};
We can also add more factions to the if statement, or change the file used to one of our own. For example, this modification would tell Assign Gear to use a custom Assign Gear file (f_assignGear_mercs.sqf
) for NATO, CSAT (opf_f
), and IDAP (c_idap_f
):
// GEAR: MERCENARIES!
if (_faction in ["blu_f","nato","opf_f","csat","c_idap_f","idap"]) then {
#include "f_assignGear_mercs.sqf"
};
Class | Description |
---|---|
r | Rifleman |
car | Carbineer |
smg | Submachinegunner |
gren | Grenadier |
ar | Autorifleman |
aar | Assistant Autorifleman |
rat | AT Rifleman |
ftl | Fire Team Leader |
dc | Deputy Commander/Squad Leader |
co | Commander |
jtac | JTAC |
m | Medic |
dm | Designated Marksman |
mmgg | Medium MG Gunner |
mmgag | Medium MG Assistant Gunner |
mmgl | Medium MG Team Leader (3.5.1 and later) |
hmgg | Heavy MG Gunner |
hmgag | Heavy MG Assistant Gunner |
matg | Medium AT Gunner |
matag | Medium AT Assistant Gunner |
matl | Medium AT Team Leader (3.5.1 and later) |
hatg | Heavy AT Gunner |
hatag | Heavy AT Assistant Gunner |
hatl | Heavy AT Team Leader (3.5.1 and later) |
mtrg | Mortar Gunner |
mtrag | Mortar Assistant Gunner |
msamg | Medium SAM Gunner |
msamag | Medium SAM Assistant Gunner |
msaml | Medium SAM Team Leader (3.5.1 and later) |
hsamg | Heavy SAM Gunner |
hsamag | Heavy SAM Assistant Gunner |
sn | Sniper |
sp | Spotter |
vc | Vehicle Commander |
vg | Vehicle Gunner |
vd | Vehicle Driver |
jp | Jet Pilot (3.5.1 and later) |
pp | Helicopter Pilot (obsolete in 3.5.1 and later) |
pcc | Helicopter Crew Chief (obsolete in 3.5.1 and later) |
pc | Helicopter Crew |
eng | Engineer (Demo) |
engm | Engineer (Mines) |
uav | UAV Operator |
div | Diver |
Class | Description |
---|---|
v_car | Car - 10 weapons, 50 cargo |
v_tr | Truck - 50 weapons, 200 cargo |
v_ifv | IFV - 10 weapons, 100 cargo |
v_tank | Tank |
v_helo_l | Air transport (Light) |
v_helo_m | Air transport (Medium) |
v_helo_h | Air transport (Heavy) |
v_helo_a | Attack helicopter |
v_jet | Jet |
crate_small | Fireteam-level supply crate |
crate_med | Squad-level supply crate |
crate_large | Platoon-level supply crate |
Note that Gendarmerie currently have non-standard classes. Refer to the Gendarmerie assignGear file.
Faction | Faction Names |
---|---|
NATO | "blu_f","nato" |
NATO Pacific | "blu_t_f","natopacific" |
NATO Woodland* | "blu_w_f","natowoodland" |
Gendarmerie | "blu_gen_f" |
CSAT | "opf_f","csat" |
CSAT Pacific | "opf_t_f","csatpacific" |
Spetsnaz* | "opf_r_f","spetsnaz" |
AAF | "ind_f","aaf" |
LDF* | "ind_e_f","ldf" |
NPR (Nadbor People's Republic)* | "ind_l_f","npr" |
3IFB (3rd International Fighting Brigade in the Name of Che Guevara)* | "3ifb" |
FIA | "blu_g_f","opf_g_f","ind_g_f","fia" |
CTRG | "blu_ctrg_f","ctrg" |
Syndikat | "ind_c_f","syndikat" |
* | 3.5.4 and later |
See this forum thread for custom assignGear Uniform Snippets: https://www.folkarps.com/forum/viewtopic.php?f=44&t=2265
A list of custom (hidden) textures can be found here: https://forums.bohemia.net/forums/topic/180646-list-of-all-hidden-texture-inits/
More: https://www.folkarps.com/forum/viewtopic.php?f=44&t=2492
- Assign Gear
- Assign Gear AI
- Authorized Crew Check
- Briefing
- Casualties Cap
- Disable Thermals
- Dynamic View Distance
- E & E Check
- FCS
- Fire Team Member Markers
- Group Markers
- Group Join
- Map Click Teleport
- Medical System
- Mission Conditions
- Multiplayer Ending Controller
- Nametags
- Premount
- Radio
- Remove Body
- Safe Start
- Group ID
- Color Teams
- AI Skill
- Spectator
- Zeus Support