Custom Loadout
Loadout.sqf is a script that modifies a unit's loadout. Go into your scripts folder if you are using the complex template and open up ammo.sqf with notepad++
DO NOT DELETE
_unit = _this select 0;
This line defines the unit
removeallweapons _unit;
removeallassigneditems _unit;
removeallcontainers _unit;
These lines remove all items from the unit
_unit = _this select 0;
This line defines the unit
removeallweapons _unit;
removeallassigneditems _unit;
removeallcontainers _unit;
These lines remove all items from the unit
Now modify these
_unit addvest "X";
_unit addbackpack "X";
_unit addheadgear "X";
_unit addGoggles "X";
_unit adduniform "X";
X = classname of weapon, magazine, item (in this case, your vest, backpack, headgear, uniform, or goggles)
_unit addvest "X";
_unit addbackpack "X";
_unit addheadgear "X";
_unit addGoggles "X";
_unit adduniform "X";
X = classname of weapon, magazine, item (in this case, your vest, backpack, headgear, uniform, or goggles)
If you need some classnames, you can refer to these sites.
http://browser.six-projects.net/cfg_weapons/classlist?version=67
http://forums.bistudio.com/showthread.php?147694-ArmA3-Classnames-no-discussions
BACKPACKS
You can also just press CTRL+G while you're in the editor to access the configviewer to find weapons classnames.
Just an FYI, the prefixes of items have a certain meaning to them...
H = Helmet
U = Uniform
V = Vest
G = Goggles/Eyewear
B = Backpack
If you don't certain items, then delete those lines.
http://browser.six-projects.net/cfg_weapons/classlist?version=67
http://forums.bistudio.com/showthread.php?147694-ArmA3-Classnames-no-discussions
BACKPACKS
You can also just press CTRL+G while you're in the editor to access the configviewer to find weapons classnames.
Just an FYI, the prefixes of items have a certain meaning to them...
H = Helmet
U = Uniform
V = Vest
G = Goggles/Eyewear
B = Backpack
If you don't certain items, then delete those lines.
Some items also specify what uniform is for which faction.
O = OPFOR
B = BLUFOR
Unfortunately, weapons aren't very specific on who has what weapons, so you'll have to make that judgement yourself while in ARMA 2 its much easier... Your typical Russian style weapons like AKs are what OPFORs use and H&K weapons for the BLUFORs. For ARMA 3, OPFOR tend to use anything bullpull and BLUFOR goes for the traditional style rifles more.
O = OPFOR
B = BLUFOR
Unfortunately, weapons aren't very specific on who has what weapons, so you'll have to make that judgement yourself while in ARMA 2 its much easier... Your typical Russian style weapons like AKs are what OPFORs use and H&K weapons for the BLUFORs. For ARMA 3, OPFOR tend to use anything bullpull and BLUFOR goes for the traditional style rifles more.
Now let's start adding items into our backpack.
(unitBackpack _unit) additemCargo ["X",#];
(unitBackpack _unit) addmagazineCargo ["X",#];
(unitBackpack _unit) addweaponCargo ["X",#];
X = classname of weapon, magazine, item
# = amount of that item available in the backpack (depending on how much space backpack has)
Use (unitBackpack _unit) additemCargo ["X",#]; for items (everything else besides weapons, magazines, explosives, etc)
Use (unitBackpack _unit) addmagazineCargo ["X",#]; for ammo, explosives, grenades, satchels, etc
Use (unitBackpack _unit) addweaponCargo ["X",#]; for weapons
(unitBackpack _unit) additemCargo ["X",#];
(unitBackpack _unit) addmagazineCargo ["X",#];
(unitBackpack _unit) addweaponCargo ["X",#];
X = classname of weapon, magazine, item
# = amount of that item available in the backpack (depending on how much space backpack has)
Use (unitBackpack _unit) additemCargo ["X",#]; for items (everything else besides weapons, magazines, explosives, etc)
Use (unitBackpack _unit) addmagazineCargo ["X",#]; for ammo, explosives, grenades, satchels, etc
Use (unitBackpack _unit) addweaponCargo ["X",#]; for weapons
Now it's time to edit your personal loadout and what you'll be carrying as your weapon and store in your vest pouch.
_unit addmagazines ["X", #];
_unit addweapon "X";
_unit addPrimaryWeaponItem "X";
X = classname of weapon, magazine, item, attachment
# = amount of that items/magazines you'll be carrying in your vest pouch/inventory (depending on how much inventory space you got)
NOTE: When adding weapon magazines and weapon. The magazines should always go first before the weapon or else your character will have to manually reload on the beginning of the mission because the magazine won't be loaded in the gun.
Use _unit addmagazines ["X", #]; to add magazines, grenades, explosive charges, etc to your inventory
Use _unit addweapon "X"; to select your weapon of choice
Use _unit addPrimaryWeaponItem "X"; to put attachments on your primary weapon (suppressors, scopes, IR laser)
_unit addmagazines ["X", #];
_unit addweapon "X";
_unit addPrimaryWeaponItem "X";
X = classname of weapon, magazine, item, attachment
# = amount of that items/magazines you'll be carrying in your vest pouch/inventory (depending on how much inventory space you got)
NOTE: When adding weapon magazines and weapon. The magazines should always go first before the weapon or else your character will have to manually reload on the beginning of the mission because the magazine won't be loaded in the gun.
Use _unit addmagazines ["X", #]; to add magazines, grenades, explosive charges, etc to your inventory
Use _unit addweapon "X"; to select your weapon of choice
Use _unit addPrimaryWeaponItem "X"; to put attachments on your primary weapon (suppressors, scopes, IR laser)
You can keep the _unit additem "X"; and _unit assignitem "X"; items there if you want units to have all those default items or delete whatever you don't want. For example, delete _unit additem "nvgoggles"; and _unit assignitem "nvgoggles"; if you don't want them.
Assignitem assigns item to the correct backpack slot.
Let say you want to add Binoculars to your units also. Just add _unit additem "binocular"; and _unit assignitem "binocular";
Assignitem assigns item to the correct backpack slot.
Let say you want to add Binoculars to your units also. Just add _unit additem "binocular"; and _unit assignitem "binocular";
Save after you are done. You can always make a duplicate and call it something like loadout2.sqf.
Now go inside the mission editor, find your unit or whatever soldier you want to modify their loadout with, and add the following line in their init
[this] call compile preprocessFileLineNumbers "scripts\loadout.sqf";
If your loadout.sqf is in the same folder as your mission.sqm instead of inside the scripts folder, then just put in [this] call compile preprocessFileLineNumbers "loadout.sqf"; instead
Now go inside the mission editor, find your unit or whatever soldier you want to modify their loadout with, and add the following line in their init
[this] call compile preprocessFileLineNumbers "scripts\loadout.sqf";
If your loadout.sqf is in the same folder as your mission.sqm instead of inside the scripts folder, then just put in [this] call compile preprocessFileLineNumbers "loadout.sqf"; instead