Skip to content

Configuring loadouts

Mark Ruffner edited this page Apr 9, 2016 · 6 revisions

File setup

The "main" loadout file to look at is the "CfgLoadouts.hpp" In this file you can:

  1. Turn on magnified optics: allowMagnifiedOptics = 1; // 0 is off
  2. Turn on vehicle inventories: setVehicleLoadouts = -1; // 0 is vanilla, 1 is using the vehicle loadout script
  3. Turn off the "fallback" class useFallback = 0; // 1 is on
  4. Most importantly, see which loadouts are active.
#include "Loadouts\blu_us_m4_ucp.hpp"            // (Active)   US: M4 - Gray/Green
// #include "Loadouts\blu_us_m4_ocp.hpp"         // (Inactive) US: M4 - Tan

IF THE ACTIVE FILES DON'T EXISTS, THE MISSION WILL CRASH THE SERVER ON MISSION LOAD

Note: the "common" loadout file has a bunch of common defines/helper macros that allow us to reduce duplication in each of the sub loadout files. Here you can change medical supplies, change leader tools, and change the base soldier level tools.

The "sub" loadout files are in the "Loadouts" folder. Each file has the following naming convention: faction_country_mainWeapon_camoPattern.hpp. These files start with the faction as the opening class name, inside this class you can define vehicle inventories, and then each sub class name is the name of the unit. Each unit class name can have the following attributes:

  1. uniform[] = {"uniform_class_name"}; Randomly selects a uniform from the array to apply to the unit
  2. vest[] = {"vest_class_name"}; Randomly selects a vest from the array to apply to the unit
  3. headgear[] = {"helmet_class_name"}; Randomly selects a helmet/hat from the array to apply to the unit
  4. backpack[] = {"backpack_class_name"}; Randomly selects a backpack from the array to apply to the unit
  5. backpackItems[] = {"item_class_name:number_of_items"}; Add all the items in this array to the backpack, if there's no space left, it will try to add it to the unit's general inventory
  6. weapons[] = {"rifle_class_name"}; Randomly selects a rifle from the array to apply to the unit
  7. magazines[] = {"magazing_class_name:number_of_mags","grenade_class_name:number_of_grenades"}; Adds magazines/grenades to a unit
  8. items[] = {"item_class_name:number_of_items"}; Adds all the items from the array to the unit
  9. linkedItems[] = {"linked_item_class_name"}; Adds all the linked items in the array to the unit (nvgs, gps, compass, etc)
  10. attachments[] = {"weapon_attachment_class_name"}; Tries to add all the attachments to the main weapon/pistol. Not random, if there's two scopes, it will only add the last scope.
  11. launchers[] = {"launcher_class_name"}; Randomly selects a launcher from the array to add to the unit
  12. secondaryAttachments[] = {"launcher_attachment_class_name"}; Tries to add all the attachments to the launcher. Not random, if there's two scopes, it will only add the last scope.

Clone this wiki locally