Page MenuHomeFeedback Tracker

Ability to export box inventory the same way we can export player loadouts; Also the ability to type in numbers for quantities instead of clicking on plus or minus.
New, NormalPublic

Description

Being able to export and/or import box inventory would be a tremendous help to building and configuring a mission. By being able to do it without having to click on a weapon magazine or hand grenade a few dozen to several hundred times would be a finger saver. Or at the very least a way to type in a number into a text field the the same way that we can to name a player slot or enter things into the init field.

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Feature Request

Event Timeline

reschke created this task.Nov 17 2017, 4:45 AM

Here's an existing way to do it.

Get Inventory of crate in mission

_inventory = [(getWeaponCargo _container),(getMagazineCargo _container),(getBackpackCargo _container),(getItemCargo _container)];

Save as SQL String

"[[["arifle_MX_F","srifle_DMR_03_F","srifle_EBR_F"],[2,1,1]],[["30Rnd_65x39_caseless_mag_Tracer","SmokeShellPurple","20Rnd_762x51_Mag"],[28,3,2]],[[],[]],[["FirstAidKit","NVGoggles","optic_Arco","G_Balaclava_TI_blk_F","H_MilCap_gry","ToolKit","U_I_G_Story_Protagonist_F","V_TacVest_oli","U_OG_Guerilla3_2","U_B_CombatUniform_mcam_tshirt","U_Rangemaster","H_Cap_police","U_C_Poloshirt_salmon"],[15,4,3,2,1,2,1,1,1,1,1,1,1]]]"

Import into mission from SQL String

if ((count _inventory) > 0) then 
{
	_x = _inventory select 0;
	for "_i" from 0 to ((count (_x select 0)) - 1) do {
		if (_container canAdd [(_x select 0) select _i,(_x select 1) select _i]) then {
			_container addWeaponCargoGlobal [(_x select 0) select _i,(_x select 1) select _i];
		};
	};
	_x = _inventory select 1;
	for "_i" from 0 to ((count (_x select 0)) - 1) do {
		if (_container canAdd [(_x select 0) select _i,(_x select 1) select _i]) then {
			_container addMagazineCargoGlobal [(_x select 0) select _i,(_x select 1) select _i];
		};
	};
	_x = _inventory select 2;
	for "_i" from 0 to ((count (_x select 0)) - 1) do {
		if (_container canAdd [(_x select 0) select _i,(_x select 1) select _i]) then {
			_container addBackpackCargoGlobal [(_x select 0) select _i,(_x select 1) select _i];
		};
	};
	_x = _inventory select 3;
	for "_i" from 0 to ((count (_x select 0)) - 1) do {
		if (_container canAdd [(_x select 0) select _i,(_x select 1) select _i]) then {
			_container addItemCargoGlobal [(_x select 0) select _i,(_x select 1) select _i];
		};
	};
};

Yes I do and have done that quite a bit @Gnashes but what I am talking about is the ability from the editor to be able to type in a text or quantity within a text field like we do with the init for the players for the amounts of items we want inside the crates as well as an option to Import/Export like we do for creating loadouts for players as well.

The way you did that works but it is clunky and doesn't always work as intended in a JIP for a multiplayer mission.