---
name: "Unit Loadout Array"
type: topic
source: https://community.bistudio.com/wiki/Unit_Loadout_Array
revid: 322627
updated: 2022-06-20T04:44:27Z
---

# Unit Loadout Array

| Index | Element | Description |
|---|---|---|
| 0 | [Primary Weapon](../commands/primaryWeapon.md) | - classname<br>- suppressor<br>- pointer<br>- optics<br>- muzzle 1's magazine and ammunition<br>- muzzle 2's magazine and ammunition<br>- bipod |
| 1 | [Secondary Weapon](../commands/secondaryWeapon.md) | - classname<br>- suppressor<br>- pointer<br>- optics<br>- muzzle 1's magazine and ammunition<br>- muzzle 2's magazine and ammunition<br>- bipod |
| 2 | [Handgun Weapon](../commands/handgunWeapon.md) | - classname<br>- suppressor<br>- pointer<br>- optics<br>- muzzle 1's magazine and ammunition<br>- muzzle 2's magazine and ammunition<br>- bipod |
| 3 | [Uniform](../commands/uniform.md) | - classname<br>- Array of:<br>  - If item: items name and count<br>  - If magazine: magazines name, count, and their ammo count<br>  - If weapon: weapon detail (see the `Primary Weapon`) and count<br>  - If container (backpack/vest/uniform): container name and whether it's a backpack (backpacks are defined in `CfgVehicles`, and vests and uniforms in `CfgWeapons`) |
| 4 | [Vest](../commands/vest.md) | - classname<br>- Array of:<br>  - If item: items name and count<br>  - If magazine: magazines name, count, and their ammo count<br>  - If weapon: weapon detail (see the `Primary Weapon`) and count<br>  - If container (backpack/vest/uniform): container name and whether it's a backpack (backpacks are defined in `CfgVehicles`, and vests and uniforms in `CfgWeapons`) |
| 5 | [Backpack](../commands/backpack.md) | - classname<br>- Array of:<br>  - If item: items name and count<br>  - If magazine: magazines name, count, and their ammo count<br>  - If weapon: weapon detail (see the `Primary Weapon`) and count<br>  - If container (backpack/vest/uniform): container name and whether it's a backpack (backpacks are defined in `CfgVehicles`, and vests and uniforms in `CfgWeapons`) |
| 6 | [Headgear](../commands/headgear.md) | classname ([String](../topics/String.md)) |
| 7 | [Goggles/Facewear](../commands/goggles.md) | classname ([String](../topics/String.md)) |
| 8 | [Binoculars](../commands/binocular.md) | - classname<br>- suppressor<br>- pointer<br>- optics<br>- muzzle 1's magazine and ammunition<br>- muzzle 2's magazine and ammunition<br>- bipod |
| 9 | [Assigned Items](../commands/assignedItems.md)<br>- in a different order<br>  than [assignedItems](../commands/assignedItems.md)<br>- no binoculars | - Map<br>- GPS/UAV terminal<br>- Radio<br>- Compass<br>- Watch<br>- [NVG](../commands/hmd.md) |

This array format is used with [getUnitLoadout](../commands/getUnitLoadout.md) and [setUnitLoadout](../commands/setUnitLoadout.md) commands. Its format is described in the side table.

> [!NOTE]
> **Weapons** listed as storage items are always listed at the end of the array, but are displayed at the top of the list in the UI.

### Examples

These are examples of Unit Loadout Array structures (see [getUnitLoadout](../commands/getUnitLoadout.md), [setUnitLoadout](../commands/setUnitLoadout.md)).

#### B_soldier_AT_F

```cpp
[
    /* primary weapon */    ["arifle_MXC_Holo_pointer_F", "", "acc_pointer_IR", "optic_Holosight", ["30Rnd_65x39_caseless_mag", 30], [], ""],
    /* secondary weapon */    ["launch_B_Titan_short_F", "", "", "", ["Titan_AT", 1], [], ""],
    /* handgun weapon */    ["hgun_P07_F", "", "", "", ["16Rnd_9x21_Mag", 16], [], ""],
    /* uniform */            ["U_B_CombatUniform_mcam", [["FirstAidKit", 1], ["30Rnd_65x39_caseless_mag", 2, 30], ["Chemlight_green", 1, 1]]],
    /* vest */                ["V_PlateCarrier1_rgr", [["30Rnd_65x39_caseless_mag", 3, 30], ["16Rnd_9x21_Mag", 2, 16], ["SmokeShell", 1 ,1], ["SmokeShellGreen", 1, 1], ["Chemlight_green", 1, 1]]],
    /* backpack */            ["B_AssaultPack_mcamo_AT",[["Titan_AT", 2, 1]]],
    /* items */                "H_HelmetB_light_desert", "G_Bandanna_tan",[],
    /* items */                ["ItemMap", "", "ItemRadio", "ItemCompass", "ItemWatch", "NVGoggles"]
]
```

#### Misc

```cpp
[
    [
        "arifle_MX_GL_F","muzzle_snds_H", "acc_pointer_IR", "optic_Aco",    // Primary weapon, (weapon items) silencer, pointer, optic
        ["30Rnd_65x39_caseless_mag", 30],                                    // Loaded mag in primary muzzle, ammo count
        ["1Rnd_HE_Grenade_shell", 1],                                        // Loaded mag in secondary muzzle, ammo count
        ""    // Bipod
    ],
    [],    // Secondary weapon info (see primary above)
    [    // handGun info (see primary above)
        "hgun_P07_F", "", "", "",
        ["16Rnd_9x21_Mag", 16],
        [],
        ""
    ],
    [    // Uniform
        "U_B_CombatUniform_mcam", // Uniform Type
        [    // Uniform Items
            ["FirstAidKit", 1],    // Type, count
            ["30Rnd_65x39_caseless_mag", 2, 30] // Magazines are: Type, count, ammo
        ]
    ],
    [    // Vest Info
        "V_PlateCarrierGL_rgr",    // Vest Type
        [    // Vest Items
            ["30Rnd_65x39_caseless_mag", 3, 30]
        ]
    ],
    [   // Backpack Info
        "B_Carryall_ocamo",                    // Backpack type
        [    // Backpack Items
            ["B_Carryall_khk", true],          // A backpack inside the backpack (isBackpack is true, so item is defined in CfgVehicles)
            ["U_B_CombatUniform_mcam", false], // A uniform inside the backpack (isBackpack is false, so item is defined in CfgWeapons)
            // A weapon inside the backpack
            [["arifle_MX_ACO_pointer_F", "", "acc_pointer_IR", "optic_Aco", [], [], ""], 1]
        ]
    ],
    "H_HelmetSpecB_blk",                    // Helmet
    "G_Tactical_Clear",                        //Facewear glasses/bandanna etc
    ["Binocular", "", "", "", [], [], ""],    // Weapon Binocular (follows same layout as other weapons above)
    ["ItemMap", "ItemGPS", "ItemRadio", "ItemCompass", "ItemWatch", "NVGoggles"]    // AssignedItems ItemGPS can also be a UAV Terminal
]
```

<sub>Source: [BI Community Wiki — Unit Loadout Array](https://community.bistudio.com/wiki/Unit_Loadout_Array) (revision 322627).</sub>
