Arsenal – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 86: Line 86:
=== Access ===
=== Access ===
You can use Arsenal in a scenario you're designing simply by calling the following [[Functions|function]]:
You can use Arsenal in a scenario you're designing simply by calling the following [[Functions|function]]:
  [] [[call]] [[BIS_fnc_arsenal]];
  [] [[call]] [[BIS_fnc_arsenal]]; <- Do not execute this. It will crash Arma 3
This version has several limitations as opposed to the Virtual one:
This version has several limitations as opposed to the Virtual one:
* Voice, Face and Insignia are not available (to avoid clashing with profile)
* Voice, Face and Insignia are not available (to avoid clashing with profile)

Revision as of 07:46, 3 August 2014

a3 arsenal.png


Arsenal is, essentially, a character, equipment and weapon viewer which has been added to Arma 3 in the Bootcamp update. This tool offers an overview of the available content, and enables customized loadouts to be exported to script, which can be used in the editor, other game modes, such as Zeus, and by community scenarios/mods.

You can access it from the main menu by locking on LEARN > VIRTUAL ARSENAL

Using

Loadout Export

Clicking on EXPORT button or pressing Ctrl + C will copy the current loadout to clipboard in SQF format. You can paste it to soldier's init field or use it in a script.

You can take the same code and import it (Ctrl + V) back to Arsenal. Use this to share loadouts with other players.

Example:

comment "Exported from Arsenal by DavidArmstrong85";

comment "Remove existing items";
removeAllWeapons this;
removeAllItems this;
removeAllAssignedItems this;
removeUniform this;
removeVest this;
removeBackpack this;
removeHeadgear this;
removeGoggles this;

comment "Add containers";
this forceAddUniform "U_I_CombatUniform";
for "_i" from 1 to 4 do {this addItemToUniform "30Rnd_556x45_Stanag";};
this addItemToUniform "16Rnd_9x21_Mag";
this addVest "V_PlateCarrierIA2_dgtl";
for "_i" from 1 to 4 do {this addItemToVest "FirstAidKit";};
for "_i" from 1 to 6 do {this addItemToVest "HandGrenade";};
for "_i" from 1 to 3 do {this addItemToVest "16Rnd_9x21_Mag";};
this addBackpack "B_TacticalPack_oli";
for "_i" from 1 to 2 do {this addItemToBackpack "SatchelCharge_Remote_Mag";};
for "_i" from 1 to 4 do {this addItemToBackpack "DemoCharge_Remote_Mag";};
this addHeadgear "H_Cap_headphones";
this addGoggles "G_Bandanna_oli";

comment "Add weapons";
this addWeapon "arifle_Mk20C_F";
this addPrimaryWeaponItem "muzzle_snds_M";
this addPrimaryWeaponItem "acc_flashlight";
this addPrimaryWeaponItem "optic_MRCO";
this addWeapon "hgun_P07_F";

comment "Add items";
this linkItem "ItemMap";
this linkItem "ItemCompass";
this linkItem "ItemWatch";
this linkItem "ItemRadio";
this linkItem "ItemGPS";

comment "Set identity";
this setFace "GreekHead_A3_03";
this setSpeaker "Male03GRE";
[this,"TFAegis"] call bis_fnc_setUnitInsignia;


Zeus Ammo Box

As Zeus, you can create virtual ammo box where players can endlessly resupply. Instead going through the classic inventory screen, they'll be able to access Arsenal and select any item you'll give them.

  1. Play a scenario as Zeus
  2. Place an ammo box (Units > Empty > Other > Ammo > [anthing from the list])
  3. Select an item you want to make available in the Arsenal
  4. Decrease number of items to 0. Button on the left should change from '-' to '∞'
  5. Click on the button once more. Number of items should now be infinite
  6. After confirming, players will be able to access Arsenal through a new action attached to the box.

a3 ammobox infinite.jpg


Zeus Respawn Loadouts

Saved loadout can be given to players as respawn loadouts by Zeus. Works only in scenarios with MenuInventory respawn template enabled.

  1. Save your loadout
  2. Play a scenario as Zeus
  3. Place Modules > Respawn > Loadouts
  4. Select side tab
  5. Expand Arsenal category
  6. Select the saved loadout.
  7. After confirming, players of the given side will be able to respawn with your loadout.

a3 arsenal loadout save.png a3 arsenal loadout load.png


Modding

Access

You can use Arsenal in a scenario you're designing simply by calling the following function:

[] call BIS_fnc_arsenal; <- Do not execute this. It will crash Arma 3

This version has several limitations as opposed to the Virtual one:

  • Voice, Face and Insignia are not available (to avoid clashing with profile)
  • Not all assets are automatically present, designer has to whitelist allowed classes. By default, only player's current equipment is available.

To open Arsenal with full options, execute:

["Open",true] call BIS_fnc_arsenal;


Virtual Ammo Box

You can also use Arsenal as virtual inventory, allowing players to get unlimited number of items of given types from an ammo box. Action to access the Arsenal will be added automatically on all clients, you don't need to use addAction to enable it.

Syntax (shared by all mentioned functions):

["AmmoboxInit",<box>] call BIS_fnc_arsenal;

or

["AmmoboxInit",[<box>,(<allowAll>,<condition>)]] call BIS_fnc_arsenal;
  • box: Object - ammo box on which the action will be added
  • allowAll (Optional): Boolean - true to add all available weapons, magazines, items and backpacks in the box
  • condition (Optional) (Development build only): Condition for showing the Arsenal action (default: {true})
    • Passed arguments are the same as in addAction condition, i.e., _target - the box, _this - caller

Returned value: Nothing

Example (paste it into init field of a box)

["AmmoboxInit",[this,true]] call BIS_fnc_arsenal;


To set which specific items should be available, use functions mentioned below. Template:note

Add

Functions:

Syntax (shared by all mentioned functions):

[<target>,<classes>,(<isGlobal>,<addAction>)] call BIS_fnc_addVirtualWeaponCargo;
  • target: Object or Namespace - ammo box to which classes will be added. When missionNamespace is used, they will be available across all boxes.
  • classes: Boolean or Array of Strings - whitelisted classes. Alternatiovely, use true to whitelist everything of the given type
  • isGlobal (Optional): Boolean - true to add classes globally (default: false)
  • addAction (Optional): Boolean - true to add "Arsenal" action which players can access the Arsenal (default: true)

Returned value: Array of Arrays: All virtual items within the target's space in format [<items>,<weapons>,<magazines>,<backpacks>]

Example:

[myBox,["arifle_MX_F","arifle_MX_SW_F","arifle_MXC_F"],true] call BIS_fnc_addVirtualWeaponCargo;

Remove

Functions:

Syntax (shared by all mentioned functions):

[<target>,<classes>,(<isGlobal>)] call BIS_fnc_addVirtualWeaponCargo;

Returned value: Array of Arrays: All virtual items within the target's space in format [<items>,<weapons>,<magazines>,<backpacks>]

Example:

[myBox,["arifle_MXC_F"],true] call BIS_fnc_removeVirtualWeaponCargo;

Get

Functions:

Syntax (shared by all mentioned functions):

[<target>] call BIS_fnc_addVirtualWeaponCargo;

Returned value: Array of Arrays: All virtual items within the target's space in format [<items>,<weapons>,<magazines>,<backpacks>]

Example:

myBox call BIS_fnc_getVirtualWeaponCargo;