Skip to content

Loadout and Cargo System

Coryf88 edited this page Jan 27, 2024 · 13 revisions

Intro

In many missions, mission makers such as yourself will find it interesting to use equipment not generally issued alongside regular units, or even in some cases, want to make a completely new class. Usually in ArmA 3, such endeavors would require either lengthy Virtual Arsenal imports or third party mods; in the Framework, however, things are much simpler.

In this page, we will cover the ways users can change the default equipment in both units and containers such as vehicles or ammo boxes, easy and free of any headaches.

Content

Memorizing classnames for both weapons and magazines has been for a while a pretty annoying and clumsy task, requiring at least some close reference such as a massive table or wiki. The Framework does away with that by introducing the concept of "content sheets", where relevant classnames are aliased into simpler versions.

Let's take a look.

As you can see, conent_list.sqf acts as a single file where all others are included.

Let's check out vanilla_weapon_list.sqf and see what it looks like in practice.
For example, _100rnd65 = "100Rnd_65x39_caseless_mag"; assigns the classname for the "6.5 mm 100Rnd Mag" into the variable _100rnd65 which may be easily remembered when making your loadout. Weapons work in a similar fashion, with _AK74U = ["arifle_AKS_F",_30rnd545]; putting the value for the AK74U into a variable containing both the weapon and magazine classname.

These content sheets may be expanded at will, but for the most part they contain the majority of the most used content in the community, including RHS and ACE3.

Loadouts

Unit loadouts are specified in 2 files, referred to as the Faction and Structure.

The Structure determines what each role will receive.

The Faction determines the items and amounts that the Structure will give.

Faction

Configuring

In the Framework's mission/settings/mission-settings.sqf file, the side_a_faction, side_b_faction, and side_c_faction specifies the loadout used by the side.

The available faction names can be found in the Addon's loadouts/faction-list.sqf, which also specifies the file that contains the faction's loadout. For example, the default side_a_faction is set to "NATO". Checking the Addon's faction-list.sqf, we see that "NATO"'s loadout is in factions\nato.sqf.

Modify

If a faction doesn't quite fit your needs, the Framework allows making modifications to a faction's loadout.

As an example, let's say you want to use "NATO", but want _countRIFLE to be 5:

  1. In the Framework's mission/settings/mission-settings.sqf, add the faction to the modified_loadouts array.
    For our example, we'll add "NATO": modified_loadouts = ["NATO"];
  2. Open the Framework's mission/loadouts/mod-list.sqf file.
  3. Make a copy of the case "TEMPLATE" block and change "TEMPLATE" to the name of the faction.
    For our example, it'd be "NATO"
  4. Change the file name. The name doesn't matter, however it is best to name it after the faction.
    For our example, we'll use nato.

mission/loadouts/mod-list.sqf:

switch(_factionID) do {
    case "TEMPLATE": {
        #include "factions\mods\template.sqf"
    };
    case "NATO": {
        #include "factions\mods\nato.sqf"
    };
};
  1. Create the file in the Framework's factions/mods directory and open it.
    For our example, the file's name is nato.sqf
  2. In the created file, you can make modifications to the loadout.
    For our example, we'll put _countRIFLE = 5; in it.

factions/mods/nato.sqf:

_countRIFLE = 5;

Custom

If none of the factions fit your needs, the Framework allows creating and using custom factions. If you do create a custom faction, it should be submitted to the Addon.

  1. Create a copy of the template faction file: mission\loadouts\factions\template.sqf
  2. Rename the copy according to the faction you're creating, preferably shortened. For instance, if your faction is "Private Military Contractor": pmc.sqf.
  3. Open mission\loadouts\faction-list.sqf.
  4. Add the following after the switch (toUpper(_faction)) do {:
case "PMC": {
	#include "factions\pmc.sqf"
};
  1. Change pmc.sqf to the name of the file you created in step 2.
  2. Change "PMC" to the uppercased name of the same file, without the extension. This is your Faction ID and will be referenced to later.
  3. Open mission\settings\mission-settings.sqf
  4. Find read_local_loadouts_specific and add your Faction ID to the array. E.g. "PMC".
  5. Repeat step 8, but for read_local_cargo_specific .
  6. Open the file you created in step 2.

Clocking about 200 lines, at first the loadout sheets might appear to be bloated and cluttered, but consider how many classes and units are fully supported, with ACE3 and even vanilla medical systems integrated, hopefully you'll understand how truly efficient it really is.

Each sheet consists of the following sections:

Section Description
Info Determines details about the faction itself.
Weapons Weapons utilized by the faction.
Ammo Count How much ammo will the faction have.
Medical Amount of meds the units and medics will have.
Uniforms The dressing gear utilized by the faction.
Extra Equipment Other equipment utilized by the faction.
Vehicles Vehicles of the faction, used by DAC and Dynamic Vehicle Markers
Objects Objects used to create a DAC camp
Faction Info
Variable Description
_factionID Shortened version of the faction's name, preferably the same as the filename uppercased. E.g. "PMC"
_factionName Name of the faction. E.g. "Private Military Contractor"
_factionStructure ID of the structure that the faction uses.
_factionCallsigns Array of group callsigns. Default options are _defaultCallsignBLUFOR, _defaultCallsignOPFOR, and _defaultCallsignINDFOR.
_defaultSide The faction's side alignment, important for radios and some other things.
_defaultVoice Voices spoken by the faction, supporting multiple. Check the available ones here.
_defaultFace Faces and skins in your faction. Check the available ones in here.
_defaultName Names. Check the available ones in here.
_defaultInsignia Which insignia or patch will the faction wear? Note: medics will by default wear the red cross patch.
_defaultColor The color of the faction. The color is a CfgMarkerColors color, without the "Color" prefix. E.g. "red", "khaki", "green", etc.
_factionSkill Ignore, unused.
Weapons

_commonX
A peculiarity of the Framework loadout system, this system allows you to determine weapons which will be shared across all other classes.
For instance, simply setting _commonRIFLE to _AK74 could change the rifle used by the Rifleman, RTO, Explosives Specialist, Medic, and potentially others to the AK-74.

Note: Listed roles in the following may be inaccurate and can vary depending on the Faction's Structure.

Variable Description
Primary Weapon
_commonRIFLE Used by most roles.
_commonRIFLEGL Weapon with an underbarrel launcher, used by Grenadier and Team Leader.
_reconRIFLE Used by Recon roles.
_commonAR Used by Autorifleman.
_commonMG Used by Heavy Gunner.
_commonMarksman Used by Marksman, Recon Marksman, and Sharpshooter.
_commonSniper Used by Sniper.
_commonSMG Used by Helicopter Pilot, Helicopter Crew, and Crewman.
_commonGL Dedicated Grenade Launcher, used by Grenadier and Team Leader.
Secondary Weapon
_commonAT Light Anti-Tank (LAT), commonly disposable, used by most roles.
_specAT Medium Anti-Tank (MAT), used by Rifleman (AT) and Recon Scout (AT).
_weaponsAA used by Missile Specialist (AA).
_weaponsAT Heavy Anti-Tank (HAT), used by Missile Specialist (AT).
Handgun
_commonPistol Used by Officer, Squad Leader, Team Leader, Recon Team Leader, and Pilot.
Attachments
_commonRCO Rifle Combat Optic, commonly a medium range sight like an ACOG, used mostly by leading elements, but varies heavily per Structure.
_commonCCO Close Combat Optic, commonly a short range sight like a Red Dot, used mostly by leading elements, but varies heavily per Structure.
_commonEOT Same as _commonCCO, but used as an alternative CCO, like a Holographic, used in some Structures.
_commonMAGNIFIED Sight used by Sniper.
_marksmanSCOPE Sight used by Marksman.
_specATSCOPE Sight on the _specAT weapon.
_commonSUPPRESSOR Suppressor used by Recon roles.
_commonPISTOLSUPPRESSOR Handgun Suppressor used by Recon Team Leader.
_commonRAIL Rail attachment used by most roles, only in "HIGH-TIER" or "US_STRUCTURE" Structure.
_commonBIPOD Bipod attachment used by most roles, only in "HIGH-TIER" or "US_STRUCTURE" Structure.
_rifleSCOPE Sight on the _commonRIFLE weapon, only in "HIGH-TIER" or "US_STRUCTURE" Structure.
_mgSCOPE Sight on the _commonAR weapon, only in "HIGH-TIER" or "US_STRUCTURE" Structure.
_reconSCOPE Sight used by Recon roles.
Ammo Count
Variable Description
_countX Determines the amount of magazines for the relevant weapon.
_countRifle Also used for weapons that don't have a dedicated count variable, like _reconRIFLE or _commonMARKSMAN.
_countRifleLOW Same as _countRifle, but for units with low carry capacity, like medics, crewman, or weapon assistants.
_countTracerRIFLE Tracer magazines given to Squad Leader, Team Leader, Recon Team Leader, Rifleman, Autorifleman, Marksman, and Recon Marksman.
_count40mm 40mm count for the _commonRIFLEGL or _commonGL.
_countPISTOL
_countAR
_countMG
_countTracerMG
_countSniper
_countAT
_countWeaponsAA
_countWeaponsAT
_countGRENADES
_countXCARGO How many magazines will be included in the faction's cargo supplies.
_countRifleCARGO
_count40mmCARGO
_countPistolCARGO
_countArCARGO
_countMgCARGO
_countSniperCARGO
_countATCARGO
_countSpecATCARGO
_countWeaponsAACARGO
_countWeaponsATCARGO
_countGrenadesCARGO
Medical

Determines the amount of medical supplies the units will carry.

Variable Description
_countX Determines the amount of relevant items.
_countBANDAGE Bandage
_countMORPHINE Morphine
_countEPI Epinephrine
_countCAT Tourniquet
_countBLOODBAG Blood IV
_countPAK Personal Aid Kit
_countXCARGO How many items will be included in the faction's cargo supplies.
_countBandageCARGO
_countMorphineCARGO
_countEpiCARGO
_countBloodbagCARGO
_countPAKCARGO
Uniforms

This section allows you to customize the uniforms and clothes worn by the units, divided by HEAD, UNIFORM, VEST, and BACKPACK. Same deal as before: for each class you may set it to be unique or just use it some other already defined value, like _commonVEST.

A very common pattern is to make an array with possible clothes and then select them randomly, as seen here.

Extra Equipment

Specifies some extra Faction equipment not covered by the other sections.

Variable Description
_HMG Dismantled HMG.
_HMGTripod Folded tripod for the HMG.
_StaticAT Dismantled Static AT Launcher.
_ATTripod Folded tripod for the Static AT Launcher.
_mortar Dismantled Mortar.
_mortarTripod Folded tripod for the Mortar.
_UAVBag UAV Backpack
_UAVTerminal UAV Terminal item
_NVG Nightvision goggles.
_binoc Binoculars.
_laserdesignator Laser Designator.
_rangefinder Rangefinder.
_grenade Grenade. Note: This is a content variable, not a faction variable. However, it is commonly overriden in factions, so is included here.
Misc

Miscellaneous variables.

Variable Description
_isSpecATDisposable This is automatically detected and shouldn't be needed for most, if not all, launchers. Set to true or false, depending on if _specAT is disposable.
_nightOnlyNVGs Set to true for nightvision goggles to be given to AI, only if mission is night.
_aiBackpackRadios Set to true for AI to receive LR backpack radios.
_bigBACKPACK Big backpack, used by units with a larger inventory demand. (Demo, AT, AA, Weapon Assistants, Medic)
_medicalBACKPACK Medic specific backpack. If not defined, _bigBACKPACK will be used.
_reconBACKPACK Recon specific backpack. If not defined, _commonBACKPACK will be used.
_specATBACKPACK MAT specific backpack. If not defined, _bigBACKPACK will be used.

Structure

Example: high_tier_army.sqf

UNITS

What each role will have.

Variable Role
_isOfficer Officer
_isSquadLeader Squad Leader
_isTeamLeader Team Leader
_isRifleman Rifleman
_isRiflemanAT Rifleman (AT)
_isMarksman Marksman/Sharpshooter
_isAutorifleman Autorifleman
_isAutoriflemanAsst Asst. Autorifleman
_isLifeSaver Combat Life Saver
_isGrenadier Grenadier
_isHelicopterPilot Helicopter Pilot
_isHelicopterCrew Helicopter Crew
_isEngineer Engineer/Repair Specialist
_isCrewman Crewman
_isPilot Pilot
_isRTO JTAC/Recon JTAC
_isReconLeader Recon Team Leader
_isRecon Recon Scout
_isReconDemo Recon Demo Specialist
_isReconMedic Recon Paramedic
_isReconAT Recon Scout (AT)
_isReconMarksman Recon Marksman
_isDemo Explosive Specialist
_isHMG Gunner (HMG)
_isStaticAT Gunner (AT)
_isUAVOperator UAV Operator
_isHMGTripod Asst. Gunner (HMG/GMG)
_isATTripod Asst. Gunner (AT)
_isMortar Gunner (Mk6)
_isMortarAssistant Asst. Gunner (Mk6)
_isWeaponsAT Missile Specialist (AT)
_isWeaponsATAssistant Asst. Missile Specialist (AT)
_isWeaponsAA Missile Specialist (AA)
_isWeaponsAAAssistant Asst. Missile Specialist (AA)
_isSniper Sniper
_isSpotter Spotter
_isMMG Heavy Gunner
_isMMGAsst Ammo Bearer
Function (BRM_FMK_fnc_*) Description
addAmmo Add magazines to the unit.
addAmmoAuto Add magazines, from a config name search, to the unit.
addEarplugs Add earplugs to the unit.
addOptics Add binoculars to the unit.
addRadio Add a radio to the unit. "SR" for a short-range, "LR" for a long-range, "BP" for a backpack.
addtoBackpack Add specified items to the unit in their Backpack.
addtoUniform Add specified items to the unit in their Uniform.
addtoVest Add specified items to the unit in their Vest.
addWeapon Add a weapon to the unit.
addWeaponKit Add a weapon and magazines to the unit.
attachToWeapon Add attachments to "primary", "secondary", or "handgun" weapon.
linkItem Add and links items such as a compass, map, watch, NVGs, or GPS to the unit.
useUniform Add the headgear, uniform, vest, and backpack to the unit.

MISC

Items that are added to all roles such as a map, compass, NVG, radio, earplugs, etc.

Cargo

Configuring

Let's open cargo-list.sqf. From the get go, it's already kinda obvious what's going on: each case represents a different kind of loadout you can add to your cargo - such as "medical" and "ammo" - with different equipment and gear.

[[_object,
	[_bchemlight, 25],
	[_rchemlight, 25],
	[_gchemlight, 25],
	[_wsmoke, 25],
	[_rsmoke, 25],
	[_gsmoke, 25]
]] call BRM_FMK_fnc_addItems;

Means, in this case, we'll be adding 25 of each chemlight and smoke grenade. _object refers to our target container.

Usage

In order to use the cargo system, we'll be utilizing the function BRM_fnc_assignCargo, with the following parameters:

  1. The object where the cargo will go. this or _myBox
  2. Faction the object belongs to:
Value Alias
"side_a"
"side_b"
"side_c"
"blufor" "west"
"opfor" "redfor", "east"
"independent" "resistance", "indfor", "guerilla", "guer"
Specific Faction ID
  1. Array containing cargo cases. ["ammo", "ammo_big"]

Example:

[this, "opfor", ["ammo","medical","medical_adv"]] spawn BRM_fnc_assignCargo;

Look at the examples included in the default Framework mission: they should give you a good idea on how it's done.

Custom

If the available options given in cargo-list.sqf doesn't meet your needs for your mission, then you can use a mission version of that file (mission/settings/mission-settings.sqf) and customize it however you wish. You can also tell us about additional options that you would like added.

In order for your mission to use your mission's cargo-list.sqf, you will need to set read_local_cargo to true in mission/settings/mission-settings.sqf. E.g. read_local_cargo = true;

Do note that the Addon's and mission's cargo-list.sqf are exclusive from each other. So, you'll have to specify all cargo cases that you want to use in your mission's cargo-list.sqf file if you enable read_local_cargo.

In closing

This loadout system has been tried and tested for a loooooong time within this community, being met with a huge amount of success between its users. It goes without saying it still has ways to go, but we are confident you will certainly find ease when it comes to creating your own customized factions in order to add some extra realism to your missions.