loadouts - Global-Conflicts-ArmA/Olsen-Framework-Arma-3 GitHub Wiki

Description

The Loadouts folder is where you will create your loadout .sqf files.
These loadout files will contain all the gear for each faction/side in your mission for each role/class within the team.

In the loadouts folder you'll find the following example loadouts
exampleloadout

For each team/side should get their own loadout file.

Creating a loadout

Each loadout is defined at the top of the loadout like so

#define package "RU_"

This allows the framework to know which loadout file to call on the unit by using the defined package.
MAKE SURE TO CHANGE THE DEEFINE OF EACH NEW LOADOUT FILE WITHIN THE "" MARKS

SET_GROUP

Creating groups allows you to add several items into a single group so you could give certain roles certain items such as giving commands radios and while grunts get none.

To create a group, use the line below at the start

SET_GROUP(items)

and the following at the end

END_GROUP;

In SET_GROUP where it says items, this is the name of your group, call it whatever you want.

Between SET and END group on a new line each time, to add gear use the following example

["ACRE_PRC343", 1, "backpack"] call FUNC(AddItem);

The first part is the classname of your item, the number is your quantity, and lastly you can define which cargo the item goes in with uniform vest backpack
If it's an item such as NVGs that you want to be equipped to the player and not into the inventory, simply remove the defined cargo and quantity like so

["ACRE_PRC343"] call FUNC(AddItem);

items

There are two calls at the end of each like

call FUNC(AddItem);

and

call FUNC(AddItemRandom);

With FUNC(AddItemRandom); you can have the call randomly select an item from a string, which is useful for random/mixed uniforms or weapons.

["CUP_H_RUS_6B47_v2_BeigeDigital","CUP_H_RUS_6B47_v2_GogglesClosed_BeigeDigital"] call FUNC(AddItemRandom);

CASES

Cases are your roles/classes of the induvial units like a rifleman, squad leader, machine gunner, where you define what each role will spawn with.

At the start of your case it'll look like so

case (package + "RF"):

Between the "" markers is the name of your class/role, change this to whatever you want but it's recommended to keep it short, such as AT for anti tank or SL for squad leader.
cases

Within your case you can now add your group which was detailed above by using ADD_GROUP(GroupNameHere);
This will then spawn the items within that case onto the unit with the given role, in the picture above, wee can see an anti tank role being given the uniform group UNI_AT for the AT role, the items group, the IFAK, and finally the NADES groups.
Below that, you'll see three lines adding extra items to this role but not in a group, which is fine, you can do this in theory, add all the items in a long list to each case, but making groups first and then giving those groups to each role is cleaner and more manageable.

APPLYING THE LOADOUTS

So you've finished creating your loadout files for each team.
While in-game, double click a unit and go to the init box.

Within that box, place the following line

[this, "RU_AT"] call FW_fnc_GearScript;

Between the "" marks, change this to what you defined your package as at the top of the loadout file, followed by what name you gave each case/role within the loadout file.
The example above shows us the framework is calling the loadout from the Russian (RU) package and the anti-tank (AT) role as RU_AT

You can also define the group name by adding the following to the line

[this, "RU_AT","YourGroupNameHere"] call FW_fnc_GearScript;

Where this does is allows you to set the name/callsign of the group the unit belongs to.
In the loadouts tab on the map screen in-game, the name/callsign of the group will appear there.
This allows for far better readability of the loadouts tab in-game.