Page MenuHomeFeedback Tracker

some ideas to improve the Virtual Arsenal
New, WishlistPublic

Description

I am using the VA in my mission and had to customize the code (and fix some bugs) to adapt it to my needs.

  1. I set the BIS_ADDVIRTUALWEAPONCARGO_CARGO variable with the items I want player to use. But standard VA also adds items the player is currently using. This can be a problem if in the same mission I have a second system that allows player to get items in exchange for "money". So I don't want a player to "buy" an AT missile then open VA and multiply this infinitely.

Suggestion: if BIS_ADDVIRTUALWEAPONCARGO_CARGO is defined directly (without BIS function calls) do not show up other items in arsenal.

  1. some parts of the code in VA remove the current weapon accessory if it is not found in the accessory list. This can be a problem if the player has "bought" an accessory item from outside VA and when he opens VA and checks the accessory list, VA automatically removes that accessory.

Suggestion: see attached file for fix

  1. there is a small code bug that prevents using the VA with units other than player (eg AI units). See attached file for fix.
  1. item names in BIS_ADDVIRTUALWEAPONCARGO_CARGO are case sensitive, this can cause some items to not show up in VA (or cause other issues) if the name of the item is not exactly the same as in the config.

Suggestion: make VA case-insensitive with item config names

  1. Add a new right side list (near sights, rail and muzzle attachments) to select the magazine that is loaded into the primary, secondary or handgun weapon. It may require adding a new script command that adds the magazine directly to the weapon without the current system of first adding the mag to the soldier uniform/vest/backpack before it is loaded into the weapon
  1. add a button that can switch between "show only weapon related magazines" and "show all magazines". This can be useful for ammo bearers that need to take ammunition for weapons they don't carry themselves. Also add some color coding for this long list so player can know quickly what magazines he already has in inventory (looking at mag count number with many items in a list is not funny)
  1. add some extra info for uniform/vests/headgear like armor, weight. For weapons/mags: weapon sway, bullet speed. This can help players make comparisons.
  1. allow players to load a profile that doesn't contain allowed items for current VA configuration.

Suggestion: when player will load such a profile the restricted items will be removed and only allowed ones will be added. This can simplify life when using profiles for different missions

I attached a file where I put the current modified version of VA I am using in my mission. All modifications are commented with "FIX" {F24694} {F24695} {F24696}

Details

Legacy ID
4159535572
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Virtual Arsenal

Event Timeline

d3nn16 edited Steps To Reproduce. (Show Details)Aug 30 2014, 7:03 PM
d3nn16 edited Additional Information. (Show Details)
d3nn16 set Category to Virtual Arsenal.
d3nn16 set Reproducibility to N/A.
d3nn16 set Severity to None.
d3nn16 set Resolution to Open.
d3nn16 set Legacy ID to 4159535572.May 7 2016, 7:20 PM

"there is a small code bug that prevents using the VA with units other than player (eg AI units). See attached file for fix."

How can this be the case when there is a VA module that can be used on AI?

d3nn16 added a subscriber: d3nn16.May 7 2016, 7:20 PM

Calling ["Open", [objNull, _soldier]] call BIS_FNC_ARSENAL; (where soldier is AI) didn't work for me. Then I noticed that the indexes were wrong:

BIS_fnc_arsenal_cargo = [_this,1,objnull,[objnull]] call bis_fnc_param;
BIS_fnc_arsenal_center = [_this,2,player,[player]] call bis_fnc_param;

instead of

BIS_fnc_arsenal_cargo = [_this,0,objnull,[objnull]] call bis_fnc_param;
BIS_fnc_arsenal_center = [_this,1,player,[player]] call bis_fnc_param;

I added 2 fixes in the second attached file:

  • I excluded "throw" and "put" magazines from the magazine list (these were added in my previous fix)
  • the green color was not removed from throw/put/misc mags when switching between uniform/vest/backpack (it only worked for rifle mag list)

I added file with last version of my modifications to the bis_fnc_arsenal function (search for FIX keyword). Each original modified section is left in comments to quickly spot the differences.

I added 2 screenshots to illustrate point 7)