Jump to content
Sign in to follow this  
EagleByte

Arsenal won't allow loading of saved presets [MP]

Recommended Posts

I have a MP mission that consists of different levels of soldiers. Using the code below, this is how it is executed in the shortest way possible.

When a player joins the session and opens the arsenal. Everything works as it should. You can save a configuration and exit the arsenal. If you leave the server and come back and try and load that same loadout, all the loadouts are greyed out.

If you need any further information, please ask.

Thanks

fn_changeGear.sqf (Activated within scroll menu)

//Load gear configuration for clients
[] call playerFunctions_fnc_gearConfig;

//Preload the arsenal
["Preload"] call BIS_fnc_arsenal;

//Put the items in the client's arsenal
[player, Arsitems, false, false] call BIS_fnc_addVirtualItemCargo;
[player, Arsbackpacks, false, false] call bis_Fnc_addVirtualBackpackCargo;
[player, Arsweapons, false, false] call BIS_fnc_addVirtualWeaponCargo;
[player, Arsmagazines, false, false] call BIS_fnc_addVirtualMagazineCargo;

//Spawn the Arsenal on the player
["Open",[nil,player]] spawn BIS_fnc_arsenal;

fn_gearConfig.sqf

_basicWeapons = 
[
   "arifle_MX_F",
   "hgun_P07_F"
];

_basicMags = 
[
   "30Rnd_65x39_caseless_mag"
];

_basicItems = 
[
   "U_B_CombatUniform_mcam_tshirt"
];

_basicPacks = 
[
   "B_AssaultPack_mcamo"
];

_addonWeapons = [];
_addonMags =	[];
_addonItems =	[];
_addonPacks =	[];

_toAddWeapons = [];
_toAddMags =	[];
_toAddItems =	[];
_toAddPacks =	[];

playerRank = player getVariable "playerRank";

for [{_i = 0}, {_i <= playerRank}, {_i = _i + 1}] do
{
   switch (_i) do
   {
       case 1: {};	//Use the basic Loadouts above
       case 2: { 
           _toAddWeapons =	["arifle_MX_GL_F"];
           _toAddMags = ["1Rnd_HE_Grenade_shell"];
           };
   };

   _addonWeapons = _addonWeapons + _toAddWeapons;
   _addonMags = _addonMags + _toAddMags;
   _addonItems = _addonItems + _toAddItems;
   _addonPacks = _addonPacks + _toAddPacks;
};

//Available Weapons
Arsweapons = _basicWeapons + _addonWeapons;

//Available Magazines
Arsmagazines = _basicMags + _addonMags;

//Available Items and Clothing and Attachments
Arsitems = _basicItems + _addonItems;

//Available Backpacks
Arsbackpacks = _basicPacks + _addonPacks;

Share this post


Link to post
Share on other sites
If you have it modified in any way the loadouts gray out I'm pretty sure

addaction to a box with arsenal, works better IMO.

I do know that, but like I stated, If you are at one rank, build a class with nothing but a uniform/backpack/whatever and exit the game, come back, it is still grayed out. But with the current implementation, it is better to have it on the player and only accessible by the player when they are in a trigger area.

Share this post


Link to post
Share on other sites

Anyone able to assist with this issue? I made a ticket on feedback.arma3.com but haven't had any action on it. Hoping someone here can help out...

Share this post


Link to post
Share on other sites

When you have preset containing mods that you are not currently running it will always be greyed out.

I was able to duplicate your senario using your code and yes even when preset is unmoded with your code its always greyed.

You may be missing some other vital code from arsenal but havn't done a thorough check as arsenal has lots of code in it.

I can suggest a work around however. You can bypass arsenal gui altogether and load an arsenal preset directly. It will always load even if content is missing minus the missing content.

The most basic:

[player,[profilenamespace, "SavedPresetname"]] call BIS_fnc_loadInventory

I have made some code that will iterate through all saved arsenal presets and give direct load addaction for each saved preset.

Don't know if you can use it but if you are interested I can post it all..

Share this post


Link to post
Share on other sites
When you have preset containing mods that you are not currently running it will always be greyed out.

I was able to duplicate your senario using your code and yes even when preset is unmoded with your code its always greyed.

You may be missing some other vital code from arsenal but havn't done a thorough check as arsenal has lots of code in it.

I can suggest a work around however. You can bypass arsenal gui altogether and load an arsenal preset directly. It will always load even if content is missing minus the missing content.

The most basic:

[player,[profilenamespace, "SavedPresetname"]] call BIS_fnc_loadInventory

I have made some code that will iterate through all saved arsenal presets and give direct load addaction for each saved preset.

Don't know if you can use it but if you are interested I can post it all..

That might work, but giving them the ability to use any saved class they have would defeat the purpose of me designating different ranks. I am thinking it may be something within the arsenal code that is doing this, because the code "should work"... Guess I will have to wait until a dev can comment on this or the ticket I submitted:

http://feedback.arma3.com/view.php?id=23686

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
Sign in to follow this  

×