Jump to content
ImperialAlex

"Fixed" Arsenal - an Arsenal-improving workaround

Recommended Posts

They really just need to ditch the "items are strings" concept and make them proper objects that have commands to test/manipulate them.

Share this post


Link to post
Share on other sites

Thanks for the patch! I might get something wrong here, but on the example mission, every type of VA semms to be empty... R-o-x´s is working fine ;)

Share this post


Link to post
Share on other sites
Mh, I will have a look at that. Loading magazines into things seems to be a bit fragile anyway.

E.g. if you don't have any containers (uniform/vest/backpack) and grab a gun, it sometimes won't give you a magazine in your gun.

And launchers will sometimes not give you loaded rounds either...

I'll try to look at your issues and the ones I noticed for the next release :)

Thanks mate, but you say "your issues" ? you mean that only i have this problem ? Hmmm strange I'm pretty sure that everyone have the same problem...

I even checked this issue after fresh system reinstall and clean game install without any addon, but this problems still there...

Maybe you can check this issues (GL rounds and batteries) on your system and let me know if have them too ?

Share this post


Link to post
Share on other sites
Thanks mate, but you say "your issues" ? you mean that only i have thise problem ? Hmmm strange I'm pretty sure that everyone have the same problem...

I even checked this issue after fresh system reinstall and clean game install without any addon, but this problems still there...

Maybe you can check this issues (GL rounds and batteries) on your system and let me know if have them too ?

"Your issues" = "the issues you reported" :) These might not be solvable until BI release new script commands...but we'll see

---------- Post added at 18:36 ---------- Previous post was at 18:26 ----------

Thanks for the patch! I might get something wrong here, but on the example mission, every type of VA semms to be empty... R-o-x´s is working fine ;)

:( Yep, happens for me too. Weird. I'll have a look...seems like 2.0.2 will be coming sooner than later ;)

EDIT: Found the issue *facepalm*. Stand by for 2.0.2 ;)

---------- Post added at 18:48 ---------- Previous post was at 18:36 ----------

Updated to version 2.0.2 (HOTFIX 2).

Fixes an issue with "side whitelisting". Resolves "All VAs in Showcase mission are empty".

https://github.com/ImperialAlex/XLA_FixedArsenal/releases/download/v2.0.2/XLA_FixedArsenal_v2.0.2.zip

Edited by ImperialAlex

Share this post


Link to post
Share on other sites

If I want to use this on a dedicated server that has the mod as allowed (but not required) - do I need to do anything special when adding arsenal to items in the world? Assume I'm doing my own 'addVirtualItemCargo(...)' calls already and using the '["AmmoboxInit",<box>] spawn BIS_fnc_arsenal;' method to add arsenal.

Do I have to use your custom 'xla_fnc_arsenal' method to add arsenal on the server for features like the 'load partially available loadouts' to work? Or is this only a concern when making arsenal boxes locally on the client? If so, does this imply that the server must run your mod for it to function? Do clients NOT running the mod in that case still function correctly?

Share this post


Link to post
Share on other sites
If I want to use this on a dedicated server that has the mod as allowed (but not required) - do I need to do anything special when adding arsenal to items in the world? Assume I'm doing my own 'addVirtualItemCargo(...)' calls already and using the '["AmmoboxInit",<box>] spawn BIS_fnc_arsenal;' method to add arsenal.

Do I have to use your custom 'xla_fnc_arsenal' method to add arsenal on the server for features like the 'load partially available loadouts' to work? Or is this only a concern when making arsenal boxes locally on the client? If so, does this imply that the server must run your mod for it to function? Do clients NOT running the mod in that case still function correctly?

As of version 2 the "fixed" arsenal is pretty much entirely separated (no shared variables, etc, except for the actual "saved inventories" in a users profile namespace. So you'll have the same outfits saved in both arsenals).

The arsenal (both vanilla and mine) use the variables in the object's/ammocrate's namespace to store the available items. As of v2, my mod no longer uses the same variables (bis_....) but instead uses its own set (xla_...).

This means that if you want to have it as an optional mod you're going to have to duplicate all calls.

_whitelistItems = ["...","...","..."];
if (isnil xla_fnc_arsenal) then {
[....] call bis_fnc_addVirtualItemCargo;
} else {
[....] call xla_fnc_addVirtualItemCargo;
};

and the same applies for the final "AmmoBoxInit" call.

You don't have to run the mod on the server...but then you should make sure that the addVirtualItemCargo calls are done on each player (with global option set to false) and not just once (with global option set to true) on the server :)

Edited by ImperialAlex

Share this post


Link to post
Share on other sites

Would it be possible to get spare optics or attachments off the VA? In BWA3 there are some optics attachments, which are attached via an action, and they aren´t compatible with any slot by themselves. (if you have them in your inventory, and the actual scope in on the rifle, on the action the rifle scope turns into the combined one) These attachments can´t be equipped straight out of VA, but you have to get the pre-attached ones and de-attach these.

Anyways great job on 2.0.2 ;)

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites
Would it be possible to get spare optics or attachments off the VA? In BWA3 there are some optics attachments, which are attached via an action, and they aren´t compatible with any slot by themselves. (if you have them in your inventory, and the actual scope in on the rifle, on the action the rifle scope turns into the combined one) These attachments can´t be equipped straight out of VA, but you have to get the pre-attached ones and de-attach these.

Anyways great job on 2.0.2 ;)

Oh, that's interesting. Would it be sufficient to have these attachment-attachments listed under "items"? I'm pretty sure that's just a question of defining them properly in the mod....I'll have a look at the mod tomorrow :)

Share this post


Link to post
Share on other sites
Oh, that's interesting. Would it be sufficient to have these attachment-attachments listed under "items"? I'm pretty sure that's just a question of defining them properly in the mod....I'll have a look at the mod tomorrow :)

Yes that would be sufficient ;), an "override to items" option would be nice, where you can set an array of items, which are added to the items section.

I think i stumbled upon another issue over here: If you save a radio (i´m using TFAR) it saves the indexed radio (indexed for the ability to program these - for example tf_anprc152_5 where 5 is the index). If you now load your equip from VA, you always get the index you have saved. This can cause issues, if two players have the same index. If so, the two radios are identical so all the settings are copied.(This leads to one player setting for example his stereo settings to right, and the one with the same index is wondering about the lack of the left speaker.)

I have ran in a similar situation with VAS, and Robalo or Tonic fixed it with this bit of code

if (getText (configFile >> "CfgWeapons" >> _item >> "simulation") == "ItemRadio") then {
if (isClass(configFile >> "CfgPatches" >> "task_force_radio_items")) then {
	_radio = getText (configFile >> "CfgWeapons" >> _item >> "tf_parent");
	if (typeName _radio == "STRING" && _radio != "") then {_item = _radio};
};
};

Share this post


Link to post
Share on other sites

Thanks for adding ASDG JR support.

Be aware that soon (probably right after patch 1.42) ASDG JR will no longer modify the arsenal function.

In dev branch, BIS added a new function which is used by arsenal: bis_fnc_compatibleItems. Worst case scenario - I will plug my fixes in there instead :)

Share this post


Link to post
Share on other sites

ImperialAlex. Thank so much, I have been trying to move our unit from server side VAS to VA. Everything was working accept save / load. Thanks to your mod we don't have this problem, meanwhile players cant use un-whitlested gear. You are a genius! TY!!!

The one and only thing that we lack now is CSE items into VA. You can save / load cse items but they just don't show up, even in vanilla. Maybe CSE's fault. But for now we can make do just using inventory.

Thanks again Alex

Share this post


Link to post
Share on other sites
The one and only thing that we lack now is CSE items into VA. You can save / load cse items but they just don't show up, even in vanilla. Maybe CSE's fault.

It was a CSE 'design decision' so as not to clutter the Arsenal with 45 types of bandage etc.

Share this post


Link to post
Share on other sites
It was a CSE 'design decision' so as not to clutter the Arsenal with 45 types of bandage etc.

Very logical. The qusetion is - would it be possible to re-add the CSE items to the Arsenal as a new subcatagory? (Ammo, grenades, explosives, medical equipment, misc....)

Share this post


Link to post
Share on other sites
Very logical. The qusetion is - would it be possible to re-add the CSE items to the Arsenal as a new subcatagory? (Ammo, grenades, explosives, medical equipment, misc....)

Indeed, though perhaps a question for the CSE thread (to be ignored, like the last time I asked about it).

Share this post


Link to post
Share on other sites
Thanks for adding ASDG JR support.

Be aware that soon (probably right after patch 1.42) ASDG JR will no longer modify the arsenal function.

In dev branch, BIS added a new function which is used by arsenal: bis_fnc_compatibleItems. Worst case scenario - I will plug my fixes in there instead :)

Thanks for the heads up!

---------- Post added at 01:07 ---------- Previous post was at 01:05 ----------

Very logical. The qusetion is - would it be possible to re-add the CSE items to the Arsenal as a new subcatagory? (Ammo, grenades, explosives, medical equipment, misc....)

You could probably solve that with a little "CSE-scope-change" mod that simply changes the arsenalScope of the CSE items :)

EDIT: Or read the one below

---------- Post added at 01:08 ---------- Previous post was at 01:07 ----------

an "override to items" option would be nice, where you can set an array of items, which are added to the items section.

This might be a general way to solve issues with scope (BWMod attachments, CSE... I'll think about this for the next real release.

---------- Post added at 01:12 ---------- Previous post was at 01:08 ----------

I think i stumbled upon another issue over here: If you save a radio (i´m using TFAR) it saves the indexed radio (indexed for the ability to program these - for example tf_anprc152_5 where 5 is the index). If you now load your equip from VA, you always get the index you have saved. This can cause issues, if two players have the same index. If so, the two radios are identical so all the settings are copied.(This leads to one player setting for example his stereo settings to right, and the one with the same index is wondering about the lack of the left speaker.)

We use TFAR as well and our idea was to not whitelist any of the "tf_anprc152_number" classnames and only whitelist "tf_anprc152". That base class will always be replaced by a "real" radio.

If you save a loadout without leaving the arsenal inbetween you can even save a loadout with that "Baseclass" radio still in it. The only 'issue' is that loadouts with "real" radios will have their radio taken away...

But thanks to partial loading that's not a big issue. You just get a message that "1x Item "tf_anprc152_166" in vest is not whitelisted" and have to grab a new one from the arsenal :)

Would this "workaround" be sufficient for you? I'm a bit reluctant to add in code that's too specialized towards a single mod.

---------- Post added at 01:25 ---------- Previous post was at 01:12 ----------

Thank you all for trying my mod and leaving great feedback. If you have any features that you'd like to see in the next version, check out https://github.com/ImperialAlex/XLA_FixedArsenal/issues

Edited by ImperialAlex
spelling is a art.

Share this post


Link to post
Share on other sites

I think it would be amazing if your mod would support having the VA script on the server side, userconfig. So that when one change is made to the script, all missions that use it will get the change. This way all our mission dev's can make missions with the same script without having to share different versions of it. We used this system for VAS and it was the best thing ever for our unit. In fact we still have that modified VAS system, we just don't use it now that VA works.. thanks to you.

Oh, and maybe a way to limit the amount of any given item,mag,wep,ect.

Edited by R-o-x
Another feature

Share this post


Link to post
Share on other sites
I think it would be amazing if your mod would support having the VA script on the server side, userconfig. So that when one change is made to the script, all missions that use it will get the change. This way all our mission dev's can make missions with the same script without having to share different versions of it. We used this system for VAS and it was the best thing ever for our unit. In fact we still have that modified VAS system, we just don't use it now that VA works.. thanks to you.

Oh, and maybe a way to limit the amount of any given item,mag,wep,ect.

Mh, what do you mean by "having the VA script on the serverside"? Do you mean the 'setup' scripts (e.g. what you shared) or the actual 'xla_fnc_arsenal' functions?

I've never played with userconfigs so if you had a link to your custom VAS I might better understand what you mean :)

Limiting the amount of copies of a certain item: Do you mean per-player or per-crate? (I.e. each player can take 5 magazines vs there are 50 magazines in the box).

The second one would probably be easier to implement (simply make the arsenal use the actual inventory of the box rather than 'virtual cargo') while the first one is probably more useful.

Share this post


Link to post
Share on other sites

We use TFAR as well and our idea was to not whitelist any of the "tf_anprc152_number" classnames and only whitelist "tf_anprc152". That base class will always be replaced by a "real" radio.

If you save a loadout without leaving the arsenal inbetween you can even save a loadout with that "Baseclass" radio still in it. The only 'issue' is that loadouts with "real" radios will have their radio taken away...

But thanks to partial loading that's not a big issue. You just get a message that "1x Item "tf_anprc152_166" in vest is not whitelisted" and have to grab a new one from the arsenal :)

Would this "workaround" be sufficient for you? I'm a bit reluctant to add in code that's too specialized towards a single mod.

It would kinda... But imagine a lot of people using VA with your fixes and TFAR or ACRE2 in addition, they would have to do this either. I think a solution "out of the box" would be much better. (correct me if im wrong, but this should be a check for each mod, thats independent from the mod itself; with a solution like this

if (getText (configFile >> "CfgWeapons" >> _item >> "simulation") == "ItemRadio") then {
if (isClass(configFile >> "CfgPatches" >> "task_force_radio_items")) then {
	_radio = getText (configFile >> "CfgWeapons" >> _item >> "tf_parent");
	if (typeName _radio == "STRING" && _radio != "") then {_item = _radio};
};
};

this is taken directly from the fn_handleItem.sqf from VAS and it reverts the indexed radio the parent. _item is the item that is handled.

If TFAR is not installed, the check is false and obsolete)

Share this post


Link to post
Share on other sites

I went ahead and sent you a PM with all I have on serverside scripts.

As for limiting, I did mean per-crate, just did not think of that. As I would just fill the crate and use it that way.

Since 2.0.2, everything is working perfectly :yay:

Share this post


Link to post
Share on other sites

@OnkelDisMaster: Mh, I guess it would be a nice feature to have. Do you know if @ACRE2 has something similar going on? What would the code need to look like to support ACRE, too?

@R-o-x: Thanks, I'll try to dig into that a bit more next week but don't expect any sudden updates (from a first look, though, it would probably be reasonably easy to do this)

I assume you only had one set of VAS allowed items (rather than several boxes with several different available equipment lists)?

Share this post


Link to post
Share on other sites
@OnkelDisMaster: Mh, I guess it would be a nice feature to have. Do you know if @ACRE2 has something similar going on? What would the code need to look like to support ACRE, too?

Unfortunately we don´t use ACRE2, but ACRE1 had something similar. I actually don´t know too much about ACRE2 ;)

Share this post


Link to post
Share on other sites
@R-o-x: I assume you only had one set of VAS allowed items (rather than several boxes with several different available equipment lists)?

Yes, just one box with one set of restrictions.

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

×