Arsenal Functions

ace_arsenal_fnc_baseOptic

Description

Returns base optic for CBA scripted optics (PIP and 2D)

Parameters

Index Description Datatype(s) Default Value
0 Optic STRING  

Return Value

Description Datatype(s)
Base optic STRING

Example

"CUP_optic_Elcan_SpecterDR_black_PIP" call ace_arsenal_fnc_baseOptic

Authors

  • Jonpas
  • LinkIsGrim

ace_arsenal_fnc_baseAttachment

Description

Returns base attachment for CBA scripted attachment Adapted from CBA_fnc_switchableAttachments

Parameters

Index Description Datatype(s) Default Value
0 Attachment STRING  

Return Value

Description Datatype(s)
Base attachment STRING

Example

"ACE_acc_pointer_green_IR" call ace_arsenal_fnc_baseAttachment

Authors

  • Jonpas
  • LinkIsGrim

ace_arsenal_fnc_removeStat

Description

Remove a stat from ACE Arsenal.

Parameters

Index Description Datatype(s) Default Value
0 Array of IDs ARRAY of STRINGS  

Return Value

None

Example

[["scopeStatL00", "scopeStatL01", "scopeStatL02", "scopeStatR07"]] call ace_arsenal_fnc_removeStat;

Authors

  • Alganthe

ace_arsenal_fnc_replaceUniqueItemsLoadout

Description

Replaces unique items in a loadout with their base items. Weapons are replaced with their base weapon.

Parameters

Index Description Datatype(s) Default Value
0 CBA extended loadout or getUnitLoadout array ARRAY  

Return Value

Description Datatype(s)
Sanitised loadout ARRAY

Example

[getUnitLoadout player] call ace_arsenal_fnc_replaceUniqueItemsLoadout

Authors

  • johnb43

ace_arsenal_fnc_addDefaultLoadout

Description

Adds a loadout to the “Default Loadouts” list. If a loadout with a similar name exists (case insensitve), it is overwritten.

Parameters

Index Description Datatype(s) Default Value
0 Name of loadout STRING  
1 CBA extended loadout or getUnitLoadout array ARRAY  
2 Add globally BOOL false

Return Value

None

Example

["Squad Leader", getUnitLoadout sql1] call ace_arsenal_fnc_addDefaultLoadout

Authors

  • 654wak654
  • johnb43

ace_arsenal_fnc_baseWeapon

Description

Returns base weapon (weapon without any attachments), but it returns it in config sensitive case. Same as BIS_fnc_baseWeapon, except config case and uses cache.

Parameters

Index Description Datatype(s) Default Value
0 Weapon STRING  

Return Value

Description Datatype(s)
Base weapon STRING

Example

["arifle_AK12_GL_lush_arco_pointer_F"] call ace_arsenal_fnc_baseWeapon

Authors

  • Karel Moricky
  • johnb43

ace_arsenal_fnc_removeAction

Description

Remove a custom action button from ACE Arsenal.

Parameters

Index Description Datatype(s) Default Value
0 Array of IDs ARRAY of STRINGS  

Return Value

None

Example

[["TAG_myActions~text~0", "TAG_myActions~statement~0", "TAG_myActions~button~0"]] call ace_arsenal_fnc_removeAction

Authors

  • johnb43

ace_arsenal_fnc_addStat

Description

Adds a stat to ACE Arsenal.

Parameters

Index Description Datatype(s) Default Value
0 Tabs to add the stat to ARRAY of ARRAYS  
0 Left tab indexes ARRAY of NUMBERS  
1 Right tab indexes ARRAY of NUMBERS  
1 Stat class (unique string for each stat) STRING  
2 Config entries to pass ARRAY of STRINGS  
3 Title STRING  
4 Show bar / show text bools ARRAY of BOOLS  
0 Show bar BOOL false
1 Show text BOOL false
5 Array of statements ARRAY of CODE  
0 Bar code CODE {}
1 Text code CODE {}
2 Condition code CODE {true}
6 Priority NUMBER 0

Return Value

Description Datatype(s)
0: Array of IDs ARRAY of STRINGS

Example

[[[0, 1, 2], [7]], "scopeStat", ["scope"], "Scope", [false, true], [{}, {
params ["_statsArray", "_itemCfg"];
getNumber (_itemCfg >> _statsArray select 0)
}, {true}]] call ace_arsenal_fnc_addStat

Authors

  • Alganthe
  • johnb43
  • LinkIsGrim

ace_arsenal_fnc_statBarStatement_default

Description

Generic bar statement for stats.

Parameters

Index Description Datatype(s) Default Value
0 Stat STRING  
1 Item config path CONFIG  
2 Args for configExtreme ARRAY  
0 Stat limits ARRAY of BOOLS  
1 Bar limits ARRAY of NUMBERS  
2 Evaluate as a logarithmic number BOOL  

Return Value

Description Datatype(s)
Bar statement NUMBER

Example

["ACE_maxZeroing", _config, [[0, 2500], [0.01, 1], false]] call ace_arsenal_fnc_statBarStatement_default

Authors

  • Alganthe

ace_arsenal_fnc_addListBoxItem

Description

Add a listbox row.

Parameters

Index Description Datatype(s) Default Value
0 Config category, must be “CfgWeapons”, “CfgVehicles”, “CfgMagazines”, “CfgVoice” or “CfgUnitInsignia” STRING  
1 Classname (must be in config case) STRING  
2 Panel control CONTROL  
3 Name of the picture entry in that Cfg class STRING “picture”
4 Config root NUMBER 0 -> configFile

Return Value

None

Example

["CfgWeapons", "launch_NLAW_F", _ctrl, "icon"] call ace_arsenal_fnc_addListBoxItem

Authors

  • Dedmen
  • johnb43

ace_arsenal_fnc_removeBox

Description

Remove arsenal from target.

Parameters

Index Description Datatype(s) Default Value
0 Target OBJECT  
1 Remove globally BOOL true

Return Value

None

Example

[_box, true] call ace_arsenal_fnc_removeBox

Authors

  • Alganthe
  • johnb43

ace_arsenal_fnc_addSort

Description

Adds a custom sorting method.

Parameters

Index Description Datatype(s) Default Value
0 Tabs to add sort to ARRAY  
0 Left Tab Indexes ARRAY of NUMBERS  
1 Right Tab Indexes ARRAY of NUMBERS  
1 Sort class (a unique string for each algorithm) STRING  
2 Title STRING  
3 Algorithm CODE  
4 Condition CODE {true}

Return Value

Description Datatype(s)
0: Array of IDs ARRAY of STRINGS

Example

[[[0, 1], []], "fireRateSort", "Sort by fire rate", {
params ["_itemCfg"];
private _fireModes = getArray (_itemCfg >> "modes");
private _fireRate = [];

{
_fireRate pushBackUnique (getNumber (_itemCfg >> _x >> "reloadTime"));
} forEach _fireModes;

_fireRate sort true;
_fireRate param [0, 0]
}] call ace_arsenal_fnc_addSort

Authors

  • Brett Mayson
  • johnb43

ace_arsenal_fnc_refresh

Description

Refreshes the arsenal to show external changes.

Parameters

Index Description Datatype(s) Default Value
0 Update current and unique items lists BOOL true
1 Update virtual items list BOOL false
2 Use panel refresh animation BOOL false

Return Value

None

Example

call ace_arsenal_fnc_refresh

Authors

  • Brett Mayson
  • johnb43

ace_arsenal_fnc_updateCamPos

Description

Update camera position. Modernized a bit, modified vars to fit arsenal rewrite.

Parameters

None

Return Value

None

Example

call ace_arsenal_fnc_updateCamPos

Authors

  • Karel Moricky
  • modified by Alganthe

ace_arsenal_fnc_openBox

Description

Open arsenal.

Parameters

Index Description Datatype(s) Default Value
0 Box OBJECT  
1 Unit to open the arsenal on OBJECT  
2 Ignore virtual items and fill arsenal BOOL false

Return Value

None

Example

[_box, player] call ace_arsenal_fnc_openBox

Authors

  • Alganthe
  • johnb43

ace_arsenal_fnc_removeDefaultLoadout

Description

Removes a loadout from the “Default Loadouts” list.

Parameters

Index Description Datatype(s) Default Value
0 Name of loadout STRING  
1 Remove globally BOOL false

Return Value

None

Example

["Squad Leader", true] call ace_arsenal_fnc_removeDefaultLoadout

Authors

  • LinkIsGrim

ace_arsenal_fnc_portVALoadouts

Description

Port VA loadouts to ACE Arsenal.

Parameters

None

Return Value

None

Example

call ace_arsenal_fnc_portVALoadouts

Authors

  • Alganthe
  • johnb43

ace_arsenal_fnc_addRightPanelButton

Description

Adds a right panel button for uniforms, vests and backpacks with defined misc. items.

Parameters

Index Description Datatype(s) Default Value
0 Items, must be misc items ARRAY of STRINGS  
1 Tooltip STRING ””
2 Picture path STRING QPATHTOF(data\iconCustom.paa)
3 Override a specific button (0-9) NUMBER -1
4 Move button if its position is overridden BOOL false

Return Value

Description Datatype(s)
Successful: Number of the slot (0-9) NUMBER

Example

[["ACE_bloodIV_500", "ACE_Banana"], "MedicalStuff", "\z\ace\addons\arsenal\data\iconCustom.paa", 5, false] call ace_arsenal_fnc_addRightPanelButton

Authors

  • shukari
  • Schwaggot
  • johnb43

ace_arsenal_fnc_initBox

Description

Initialize a box / object for arsenal.

Parameters

Index Description Datatype(s) Default Value
0 Target OBJECT  
1 Items ARRAY  
2 Initialize globally BOOL true

Return Value

None

Example

[_box, ["MyItem1", "MyItem2", "MyItemN"]] call ace_arsenal_fnc_initBox
[_box, true] call ace_arsenal_fnc_initBox

Authors

  • Alganthe
  • johnb43

ace_arsenal_fnc_addAction

Description

Adds custom action buttons.

Parameters

Index Description Datatype(s) Default Value
0 Tabs to add action to ARRAY  
1 Action class (unique string for each action) STRING  
2 Title STRING  
3 Actions ARRAY of ARRAYS  
4 Condition CODE {true}
5 Scope editor NUMBER 2
6 Update when cargo content changes BOOL false

Return Value

Description Datatype(s)
0: Array of IDs ARRAY of STRINGS

Example

[[0, 5], "TAG_myActions", "My Actions", [
["text", "Text", {true}, "Text"],
["statement", "Statement", {true}, "", {[_this select 0] call tag_fnc_myTextStatement}],
["button", "Button", {true}, "", {}, {_this call tag_fnc_myAction}]
]] call ace_arsenal_fnc_addAction

Authors

  • johnb43

ace_arsenal_fnc_removeVirtualItems

Description

Remove virtual items to the provided target.

Parameters

Index Description Datatype(s) Default Value
0 Target OBJECT  
1 Items BOOL  
2 Remove globally BOOL false

Return Value

None

Example

[_box, ["item1", "item2", "itemN"]] call ace_arsenal_fnc_removeVirtualItems
[_box, true, false] call ace_arsenal_fnc_removeVirtualItems

Authors

  • Alganthe
  • johnb43

ace_arsenal_fnc_renameDefaultLoadout

Description

Renames a loadout from the “Default Loadouts” list.

Parameters

Index Description Datatype(s) Default Value
0 Current name of loadout STRING  
1 New name of loadout STRING  

Return Value

None

Example

["Squad Leader", "Team Leader"] call ace_arsenal_fnc_renameDefaultLoadout

Authors

  • LinkIsGrim

ace_arsenal_fnc_addVirtualItems

Description

Add virtual items to the provided target.

Parameters

Index Description Datatype(s) Default Value
0 Target OBJECT  
1 Items BOOL  
2 Add globally BOOL false

Return Value

None

Example

[_box, ["item1", "item2", "itemN"]] call ace_arsenal_fnc_addVirtualItems
[_box, true, false] call ace_arsenal_fnc_addVirtualItems

Authors

  • Alganthe
  • Dedmen
  • johnb43

ace_arsenal_fnc_removeSort

Description

Remove a sort from ACE Arsenal.

Parameters

Index Description Datatype(s) Default Value
0 Array of IDs ARRAY of STRINGS  

Return Value

None

Example

[["scopeSortL00", "scopeSortL01", "scopeSortL02", "scopeSortR07"]] call ace_arsenal_fnc_removeSort;

Authors

  • johnb43

ace_arsenal_fnc_getVirtualItems

Description

Gets list of virtual items available to the object.

Parameters

Index Description Datatype(s) Default Value
0 Target OBJECT  

Return Value

Description Datatype(s)
Virtual Items HASHMAP

Example

cursorObject call ace_arsenal_fnc_getVirtualItems

Authors

  • johnb43
  • Grim