Jump to content
khaosmatical

Adding all in-game goggles to Virtual Arsenal box.

Recommended Posts

This question might seem strange as it involves adding to the VA but let me explain. I've been setting up a custom box with the arsenal that only has select gear but it is accessed by the arsenal menu and this is done with the Eden Equipment Storage however there is no goggles section to allow that gear to be added to the arsenal. (BI Y U DO DIS)

Is there a script command to add all available goggles/facewear to that virtual arsenal alongside what I already did or is this not possible? I'm assuming it would need a sleep function to allow the boxes VA to initialize first?

Any help would be greatly appreciated. 

Share this post


Link to post
Share on other sites


[_box, ["g_diving", "G_Tactical_Clear"]] call BIS_fnc_addVirtualItemCargo;

Share this post


Link to post
Share on other sites

So it will have to be each individual classname added?

 

yes

Share this post


Link to post
Share on other sites

yes

In that case, can items be removed from the (add everything) Arsenal via classname because that will probably be easier to do.

Share this post


Link to post
Share on other sites


[ _box , "classname", true ] call BIS_fnc_removeVirtualItemCargo;

[ _box , ["classname","classname1"],true ] call BIS_fnc_removeVirtualItemCargo;

Share this post


Link to post
Share on other sites

Thanks guys, I made a report on that forum tracking area so hopefully that feature gets put in.

Time to find all the classnames to remove!

Share this post


Link to post
Share on other sites
[_box, ["g_diving", "G_Tactical_Clear"]] call BIS_fnc_addVirtualItemCargo;

This seems to be giving me the error of "Local variable in Global space" ?

Share this post


Link to post
Share on other sites

in init field of the box use

null = this spawn {
params ["_box"]; 
[_box, ["g_diving", "G_Tactical_Clear"]] call BIS_fnc_addVirtualItemCargo;
};

or

null = [this, ["g_diving", "G_Tactical_Clear"]] call BIS_fnc_addVirtualItemCargo;

Share this post


Link to post
Share on other sites

use this

 

arsenal.sqf

 

/*


AUTHOR: MikeSK 701st [S.O.G.]
NAME: arsenal.sqf
VERSION: 1.0


DESCRIPTION:
Add virtual arsenal to object with whitelisted items.


USAGE:
In object init line put
null = [this] execVM "arsenal.sqf";


CONFIG:
_availableHeadgear - array of headgear classes allowed
_availableGoggles - array of googles classes allowed
_availableUniforms - array of uniforms classes allowed
_availableVests - array of vests classes allowed
_availableBackpacks - array of backpacks classes allowed
_availableWeapons - array of weapons classes allowed
_availableMagazines - array of magazines classes allowed
_availableItems - array of items classes allowed
_availableSuppresors - array of suppresor classes allowed
_availableOptics - array of optics classes allowed
_availableAttachments - array of weapon attachments classes allowed
_availableBipods - array of bipod classes allowed


*/


private ["_crate", "_availableHeadgear", "_availableGoggles", "_availableUniforms", "_availableVests", "_availableBackpacks", "_availableWeapons", "_availableMagazines", "_availableItems"];
params ["_crate"];


//Lists of items to include
_availableHeadgear = [];


_availableGoggles = [
"G_Diving",
"G_Combat",
"G_Lowprofile",
"G_Shades_Black",
"G_Shades_Blue",
"G_Shades_Green",
"G_Shades_Red",
"G_Sport_Blackred",
"G_Sport_Blackyellow",
"G_Squares_Tinted",
"G_Tactical_Black",
"G_Tactical_Clear",
"G_Bandanna_blk"
];


_availableUniforms = [];


_availableVests = [];


_availableBackpacks = [];


_availableWeapons = [];


_availableMagazines = [];


_availableSuppresors = [];


_availableOptics = [];


_availableAttachments = [];


_availableBipods = [];


_availableItems = [];


//Populate with predefined items and whatever is already in the crate
[_crate, _availableBackpacks] call BIS_fnc_addVirtualBackpackCargo;
[_crate, _availableHeadgear + _availableGoggles + _availableUniforms + _availableVests + _availableItems + _availableSuppresors + _availableOptics + _availableAttachments + _availableBipods] call BIS_fnc_addVirtualItemCargo;
[_crate, _availableMagazines] call BIS_fnc_addVirtualMagazineCargo;
[_crate, _availableWeapons] call BIS_fnc_addVirtualWeaponCargo;

Share this post


Link to post
Share on other sites
_availableGoggles = [
"G_Diving",
"G_Combat",
"G_Lowprofile",
"G_Shades_Black",
"G_Shades_Blue",
"G_Shades_Green",
"G_Shades_Red",
"G_Sport_Blackred",
"G_Sport_Blackyellow",
"G_Squares_Tinted",
"G_Tactical_Black",
"G_Tactical_Clear",
"G_Bandanna_blk"
];

 

See, I understand frameworks like F3 but I'm reading this and I'm not able to fully able to work out what this script does exactly (I know where to put it don't worry I just haven't tested it yet.)

Is this adding only goggles to a crate with arsenal or is this adding all goggles in the '_availableGoggles = [' to the already preset-up box I made?

Share this post


Link to post
Share on other sites

See, I understand frameworks like F3 but I'm reading this and I'm not able to fully able to work out what this script does exactly (I know where to put it don't worry I just haven't tested it yet.)

Is this adding only goggles to a crate with arsenal or is this adding all goggles in the '_availableGoggles = [' to the already preset-up box I made?

 

This is adding ONLY googles selected in array. If you want to add more gear, you need to add it array config. This way you are selecting which gear is in arsenal == whitelisting. At moment, you can do only whitelist, not the other way (blacklist). Thanks to BIS we can only do whitelist and select what we want in crate and not blacklist (select all without blacklisted items). It sucks, I know :(

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×