Here is list of my suggested inventory manipulation commands. Up for discussion and comments. When finalized, I'll move this into new ticket.
Exists,
Exists,
Exists,
Exists,
Suggested syntax:
<vehicle> getWeaponCargoDetails <weapon_index>
Returns:
Array with full details on weapon by index inside container. Empty array if weapon doesn't exists under this index.
Array format is same as weaponsItems returns
[
Weapon classname,
Muzzle Item,
Flashlight Item,
Optics Item,
[
],
... more loaded mags ...
]
Suggested syntax:
<vehicle> getMagazineCargoDetails <magazine_index>
Returns:
Array with magazine details. Empty array if magazine doesn't exists for specified index.
Array format with magazine classname and ammo count. Additionally if loaded magazines are returned by this command it should return if magazine is loaded and where it is loaded (similar to magazinesAmmoFull)
[
Magazine classname,
Current ammo count
]
Suggested syntax:
<vehicle> getItemCargoDetails <item_index>
Returns:
Array with item details. Empty if no item on this index.
Array format should return item classname, item type (uniform, vest, attachment, goggles, etc. preferably as Number) and uniform\vest container if it is uniform or vest
[
Item classname,
Item type (Number type or however it is defined within the engine and easier to indicate type of item),
Item container (Only if uniform or vest)
]
Exists, possible to get details of certain backpack with command
Suggested syntax:
<vehicle> removeWeaponCargo <weapon_index>
Works only where <vehicle> is local to simpliy things. If there is a technical possibility of having this command to work on remote vehicles without desyncronizing contents then it will be a plus.
Returns:
Nothing.
Suggested syntax:
<vehicle> removeMagazineCargo <magazine_index>
Works only where <vehicle> is local to simpliy things. If there is a technical possibility of having this command to work on remote vehicles without desyncronizing contents then it will be a plus.
Returns:
Nothing.
Suggested syntax:
<vehicle> removeItemCargo <item_index>
Works only where <vehicle> is local to simpliy things. If there is a technical possibility of having this command to work on remote vehicles without desyncronizing contents then it will be a plus.
Returns:
Nothing.
Suggested syntax:
<vehicle> removeBackpackCargo <backpack_index>
Works only where <vehicle> is local to simpliy things. If there is a technical possibility of having this command to work on remote vehicles without desyncronizing contents then it will be a plus.
Returns:
Nothing.
Suggested syntax:
<vehicle> addWeaponCargoDetails <details_array>
Where <details_array> have to be an array of:
[
Weapon classname,
Muzzle Item,
Flashlight Item,
Optics Item,
[
],
... more loaded magazines ...
]
Command should be able to add weapons with loaded magazines for each muzzle. If more magazines than muzzles were supplied, it should ignore these magazines. If no magazines supplied in <details_array>, weapon should be unloaded. Broadcasted over network (global). Should work with both local and remote vehicles, if possible.
Returns:
Index of newly added weapon. -1 if failed.
Suggested syntax:
<vehicle> addMagazineCargoDetails <details_array>
Where <details_array> has to be an array of:
[
Magazine classname,
Current ammo count
]
Broadcasted over network (global). Should work with both local and remote vehicles, if possible.
Returns:
Index of newly added weapon. -1 if failed.
Exists, new command is not needed.
Exists, new command is not needed.
Two things that should be controlled on weapons by mission designer - attachments and loaded magazines. I suggest to have two separate commands to do these manipulations.
Suggested syntax:
<vehicle> setWeaponCargoItems [<weapon_index>, <items_array>]
Where <items_array> is an array of:
[
Muzzle Item,
Flashlight Item
Optics Item
]
Works only where <vehicle> is local to simpliy things. If there is a technical possibility of having this command to work on remote vehicles without desyncronizing contents then it will be a plus.
Returns: Nothing
Suggested syntax:
<vehicle> setWeaponCargoMagazines [<weapon_index>, <magazines_array>]
Where <magazines_array> is an array of:
[
[
],
... more loaded magazines ...
]
If <magazines_array> is empty then it should unload magazines from the weapon. If more magazines than muzzles was supplied then command should ignore these extra magazines.
Returns: Nothing
Suggested syntax:
<vehicle> setMagazineCargoDetails [<magazine_index>, <current_ammo_count>]
Works only where <vehicle> is local to simpliy things. If there is a technical possibility of having this command to work on remote vehicles without desyncronizing contents then it will be a plus.
Returns: Nothing
No need to modify items as there isn't much to modify about them.
No need to modify backpacks as there isn't much to modify about them.