ImperialAlex 72 Posted April 16, 2015 Mmmm....I can't seem to make work the "not whitelisting equipped items". This is my line (more or less, I also use the whitelisting functions) ["AmmoboxInit",[_ammoBox,false,{true},"Abrir Arsenal",false]] spawn xla_fnc_arsenal; Using the feature is pretty simple, so I do not know what I may be doing wrong. Mh, I'm going to see if I can reproduce that tonight. Just to check: You're sure the items you're wearing aren't whitelisted anyway? If you DON'T run any of the whitelisting functions and just run your line, does it still give you your equipped items in the list? Share this post Link to post Share on other sites
Zriel 12 Posted April 18, 2015 (edited) Mh, I'm going to see if I can reproduce that tonight. Just to check: You're sure the items you're wearing aren't whitelisted anyway?If you DON'T run any of the whitelisting functions and just run your line, does it still give you your equipped items in the list? Sorry, sometimes I forgot that I have posted something XDD Gonna check in a few minutes. Yeah, items are not whitelisted (If I save the loadout, unequip everything out of the arsenal, and then load the loadout in the arsenal, it gives me some warnings on items not whitelisted). Have to say sometimes the custom string for the action is not parsed and shows the default "Arsenal" string. ---------- Post added at 14:22 ---------- Previous post was at 13:39 ---------- BTW....if I run the line without whitelisting functions...well, it does not add the acction, as there are no whitelisted items to show... This are the whitelisting (without all the data) [_ammoBox,_rhs_weapons,true,false] call xla_fnc_addVirtualWeaponCargo; [_ammoBox,_rhs_items,true,false] call xla_fnc_addVirtualItemCargo; [_ammoBox,_rhs_backpacks,true,false] call xla_fnc_addVirtualBackPackCargo; [_ammoBox,_rhs_magazines,true] call xla_fnc_addVirtualMagazineCargo; ---------- Post added at 14:27 ---------- Previous post was at 14:22 ---------- Fixed! I have to change "[_ammoBox,_rhs_magazines,true] call xla_fnc_addVirtualMagazineCargo;" and add the final "false" so it gets like this "[_ammoBox,_rhs_magazines,true,false] call xla_fnc_addVirtualMagazineCargo;" If not, the whitelisting function adds its proper Arsenal action, which is not the one you put in the script/init. This caused too not seeing the custom string on the arsenal action (as it was being substituted) Pretty dumb XD Thanks for the help! Edited April 18, 2015 by Zriel Share this post Link to post Share on other sites
ImperialAlex 72 Posted April 23, 2015 Sorry for the bug with allowEquipped :( Since allowEquipped = 'false' is the recommended setting I neglected testing of the function with allowEquipped = 'true'. I'll make sure that the next version has it working as intended :) Since the way "allowEquipped" and white/blacklisting in general are handled internally will change a lot with the next update, I'm going to focus on shipping the next update rather than hot-fixing the allowEquipped system right now. Share this post Link to post Share on other sites
Zriel 12 Posted April 23, 2015 Sorry for the bug with allowEquipped :( Since allowEquipped = 'false' is the recommended setting I neglected testing of the function with allowEquipped = 'true'. I'll make sure that the next version has it working as intended :)Since the way "allowEquipped" and white/blacklisting in general are handled internally will change a lot with the next update, I'm going to focus on shipping the next update rather than hot-fixing the allowEquipped system right now. Can't really say I understand last post. Does it have to do with my comments? Share this post Link to post Share on other sites
ImperialAlex 72 Posted April 23, 2015 Can't really say I understand last post. Does it have to do with my comments? Sorry, I got carried away with internal terms there. "allowEquipped" is the internal name of the parameter that toggles the "not whitelisting equipped items" behaviour. When setting it to true, it *should* add the items that the player has equipped to the whitelist, but it seems like that feature is currently broken. I'm doing some major refactoring of the addon right now, so I'm not going to work on fixing the bug in the 'old' version since the entirety of the code that used to be responsible for it needs to be re-written anway. I hope that made more sense :=) Share this post Link to post Share on other sites
Zriel 12 Posted April 23, 2015 OK, then I think you understond me wrong. Yes, that feature is working as intended on the "xla_fnc_arsenal" function. All is alright, nothing to fix. Problem was, if you check the WHITELISTING functions "(xla_fnc_addVirtualWeaponCargo"; and such, BIS ones work the same way too) the 4th parameter makes the whitelisting function to ADD the "open arsenal" action to the box. Default for this parameter is true. So, my problem was, I used xla_fnc_arsenal, all OK, and then I used the WHITELITING functions to add mi items I wanted to show. All of the functions had the 4th parameter set up on false BUT the last one (you can check my code a few posts up). So, that one not having it defined, and "default true if not defined" made the whitelisting function add (and substitute) the action for opening arsenal I had just set up with the previous "xla_fnc_arsenal;" And thus, that's why I had a problem. The action that whitelisting added had default parameters, and neither "allowEquipped" or the custom string where being shown as I defined. Hope I made myslef clear. Really looking forward into the performance improvements!! Share this post Link to post Share on other sites
tobinator 41 Posted April 25, 2015 Is it possible to add folders to the save function? Can you maybe try to add that function? Share this post Link to post Share on other sites
ImperialAlex 72 Posted April 28, 2015 Is it possible to add folders to the save function? Can you maybe try to add that function? I love that idea! I'm no expert on UI though so it'd probably take me forever. If you happen to know somebody who's good with UI and who would be willing to contribute to the mod we could make this a reality much sooner than if I just put this on my already-growing ToDo list :) Share this post Link to post Share on other sites
kecharles28 197 Posted May 4, 2015 Updated mod v3.0.0 available at withSIX. Download now by clicking: Share this post Link to post Share on other sites
Guest Posted May 4, 2015 Updated version frontpaged on the Armaholic homepage. XLA FixedArsenal v3.0.0 Share this post Link to post Share on other sites
ImperialAlex 72 Posted May 5, 2015 (edited) ^- as above, v3.0.0 is now available. It introduces some major performance improvements along with 1.) force-adding things to the arsenal. You can supply a list of classnames to the AmmoBoxInit/Open calls. Classnames on that list will be displayed even if they don't have the proper scope set. There are still some other tests the class has to pass (e.g. have a model defined). Let me know whether or not the current system works for your usecases. (See the header of xla_fnc_arsenal for info on what the function call should look like) 2.) force replace! You can now supply a list of [classname,new_classname] pairs to the AmmoBoxInit/Open calls. Whenever somebody accesses the arsenal any items in their current equipment will be tested and if applicable exchanged. (Make sure "new_classname" is on the whitelist or they won't get to keep their new equipment for very long ;) ). Again, see xla_fnc_arsenal (or the sample mission included in the download) for more info on how to use this. An example of how to set this up to force-replace unique TFAR radios with "generic" radios will be coming shortly :) Edit: The mod is now also available on the steam workshop. Edit2: A more refined changelog + updated documentation will come in the next few days. If you're using some of the more "advanced" features (manual preload calls, side/black-listing, "allowEquipped=true") please let me know if the new update has negatively affected the way you use the arsenal. Edited May 5, 2015 by ImperialAlex Share this post Link to post Share on other sites
Zriel 12 Posted May 11, 2015 Well...got an important bug report. Seems that your mod messes with something within RHS, as having both enabled, I can't push up the optics of the javelin, neither lock on targets with the stinger. For us is quite important having both enabled. Please, hope you can fix it as soon as possible. Share this post Link to post Share on other sites
ImperialAlex 72 Posted May 12, 2015 Well...got an important bug report. Seems that your mod messes with something within RHS, as having both enabled, I can't push up the optics of the javelin, neither lock on targets with the stinger. For us is quite important having both enabled. Please, hope you can fix it as soon as possible. That's incredibly unlikely to be caused by my mod. Please make sure you can actually reproduce this with just my mod and @RHS running. Share this post Link to post Share on other sites
Zriel 12 Posted May 12, 2015 That's incredibly unlikely to be caused by my mod. Please make sure you can actually reproduce this with just my mod and @RHS running. Already done. Do you want a repro mission? XD I know it is unlikely, which is why I have asked for support instead of pointing to the problem, cause I don't have a clue on why it would be happening or where to start looking at. ---------- Post added at 16:54 ---------- Previous post was at 16:51 ---------- Still...going to be 100% sure. Later I will download usaf addon and yours, and put them in new fresh folders all alone. I maintain the addons of my comunity and I'm 99% sure there's nothing else messing, but just in case I don't want to waste your time. Share this post Link to post Share on other sites
ImperialAlex 72 Posted May 12, 2015 Yeah, a repro mission would be great. Thanks for making extra sure it really is an issue with the arsenal :) Share this post Link to post Share on other sites
Zriel 12 Posted May 12, 2015 Tested again, and still not working. Repro mision, with a javelin: (change to javelin and try to bring up lock on interface) And stinger (try to lock on with T key onto the enemy heli.) https://mega.co.nz/#!44R3GDSY!e1KypEGTo6B7fDlVlgIpw-bMhTokXywhyEAL2QVrpf4 Addons needed: @RHSUSF, @XLA_FixedArsenal www.rhsmods.org/mod/2 Share this post Link to post Share on other sites
ImperialAlex 72 Posted May 13, 2015 Thanks! Yep, reproduces for me. I've noticed that I do get the lock-on symbol to display for very short times...weird. ---------- Post added at 02:53 ---------- Previous post was at 01:44 ---------- Update: Found the problem and it really is my fault (sorry!). definesides.hpp accidentally has the titans inherit from the wrong launcher (one that can't lock on), this propagates down the inheritance tree to the stinger/javelin. I'm trying to figure out a good way of detecting or avoiding errors like that. I'll push a fix for this tomorrow/day-after-tomorrow. Share this post Link to post Share on other sites
champ-1 40 Posted May 13, 2015 (edited) Hey, Alex. I'm trying to make my script work with your mod. It seems like some of your functions doesn't work properly, because when I use default arsenal functons everything is fine. Or maybe I don't understand something. Anyway, here's the example: if (_useXLA) then { [_obj, [_obj] call XLA_fnc_getVirtualBackpackCargo] call XLA_fnc_removeVirtualBackpackCargo; [_obj, [_obj] call XLA_fnc_getVirtualItemCargo] call XLA_fnc_removeVirtualItemCargo; [_obj, [_obj] call XLA_fnc_getVirtualMagazineCargo] call XLA_fnc_removeVirtualMagazineCargo; [_obj, [_obj] call XLA_fnc_getVirtualWeaponCargo] call XLA_fnc_removeVirtualWeaponCargo; [_obj, _itemsArray] call XLA_fnc_addVirtualBackpackCargo; [_obj, _itemsArray] call XLA_fnc_addVirtualItemCargo; [_obj, _itemsArray] call XLA_fnc_addVirtualMagazineCargo; [_obj, _itemsArray] call XLA_fnc_addVirtualWeaponCargo; _obj removeAction (_obj getVariable ["XLA_fnc_arsenal_action", -1]); } else { [_obj, [_obj] call BIS_fnc_getVirtualBackpackCargo] call BIS_fnc_removeVirtualBackpackCargo; [_obj, [_obj] call BIS_fnc_getVirtualItemCargo] call BIS_fnc_removeVirtualItemCargo; [_obj, [_obj] call BIS_fnc_getVirtualMagazineCargo] call BIS_fnc_removeVirtualMagazineCargo; [_obj, [_obj] call BIS_fnc_getVirtualWeaponCargo] call BIS_fnc_removeVirtualWeaponCargo; [_obj, _itemsArray] call BIS_fnc_addVirtualBackpackCargo; [_obj, _itemsArray] call BIS_fnc_addVirtualItemCargo; [_obj, _itemsArray] call BIS_fnc_addVirtualMagazineCargo; [_obj, _itemsArray] call BIS_fnc_addVirtualWeaponCargo; _obj removeAction (_obj getVariable ["bis_fnc_arsenal_action", -1]); }; Basicly these are two identical pieces of code, all I did is changed the tag. BIS arsenal getting reset just fine, but your arsenal is not reseting after this is executed. Please help me understand what could be the problem. Edited May 13, 2015 by Champ-1 Share this post Link to post Share on other sites
sonsalt6 105 Posted May 13, 2015 Updated mod v3.0.1 available at withSIX. Download now by clicking: Share this post Link to post Share on other sites
Guest Posted May 14, 2015 Updated version frontpaged on the Armaholic homepage. XLA FixedArsenal v3.0.1 Share this post Link to post Share on other sites
ImperialAlex 72 Posted May 14, 2015 Tested again, and still not working.Repro mision, with a javelin: (change to javelin and try to bring up lock on interface) And stinger (try to lock on with T key onto the enemy heli.) https://mega.co.nz/#!44R3GDSY!e1KypEGTo6B7fDlVlgIpw-bMhTokXywhyEAL2QVrpf4 Addons needed: @RHSUSF, @XLA_FixedArsenal www.rhsmods.org/mod/2 3.0.1 should solve these issues, let me know if it's working for you guys :) Share this post Link to post Share on other sites
Zriel 12 Posted May 14, 2015 3.0.1 should solve these issues, let me know if it's working for you guys :) Works correctly, thanks for the quick update. Share this post Link to post Share on other sites
ImperialAlex 72 Posted May 14, 2015 Hey, Alex. I'm trying to make my script work with your mod. It seems like some of your functions doesn't work properly, because when I use default arsenal functons everything is fine. Or maybe I don't understand something. Anyway, here's the example: if (_useXLA) then { [_obj, [_obj] call XLA_fnc_getVirtualBackpackCargo] call XLA_fnc_removeVirtualBackpackCargo; [_obj, [_obj] call XLA_fnc_getVirtualItemCargo] call XLA_fnc_removeVirtualItemCargo; [_obj, [_obj] call XLA_fnc_getVirtualMagazineCargo] call XLA_fnc_removeVirtualMagazineCargo; [_obj, [_obj] call XLA_fnc_getVirtualWeaponCargo] call XLA_fnc_removeVirtualWeaponCargo; [_obj, _itemsArray] call XLA_fnc_addVirtualBackpackCargo; [_obj, _itemsArray] call XLA_fnc_addVirtualItemCargo; [_obj, _itemsArray] call XLA_fnc_addVirtualMagazineCargo; [_obj, _itemsArray] call XLA_fnc_addVirtualWeaponCargo; _obj removeAction (_obj getVariable ["XLA_fnc_arsenal_action", -1]); } else { [_obj, [_obj] call BIS_fnc_getVirtualBackpackCargo] call BIS_fnc_removeVirtualBackpackCargo; [_obj, [_obj] call BIS_fnc_getVirtualItemCargo] call BIS_fnc_removeVirtualItemCargo; [_obj, [_obj] call BIS_fnc_getVirtualMagazineCargo] call BIS_fnc_removeVirtualMagazineCargo; [_obj, [_obj] call BIS_fnc_getVirtualWeaponCargo] call BIS_fnc_removeVirtualWeaponCargo; [_obj, _itemsArray] call BIS_fnc_addVirtualBackpackCargo; [_obj, _itemsArray] call BIS_fnc_addVirtualItemCargo; [_obj, _itemsArray] call BIS_fnc_addVirtualMagazineCargo; [_obj, _itemsArray] call BIS_fnc_addVirtualWeaponCargo; _obj removeAction (_obj getVariable ["bis_fnc_arsenal_action", -1]); }; Basicly these are two identical pieces of code, all I did is changed the tag. BIS arsenal getting reset just fine, but your arsenal is not reseting after this is executed. Please help me understand what could be the problem. Mhh....what exactly do you mean by "reset"? What are you trying to achieve? I can also see that you're calling the [xla/bis]_fnc_removeVirtual[Category]Cargo functions without the necessary parameters. You need both an object and a list of classnames! The list of classnames is not optional according to the function header. I'm not quite sure why that works on the vanilla arsenal since that part of my arsenal is pretty much exactly the same as the vanilla one... I also don't understand why you remove the arsenal action after you initialize the arsenal. Oh, and why are you adding _itemsArray to all categories? That makes little sense since e.g. Backpack cargo should be classnames that exist in CfgVehicles, weapons should be from CfgWeapons and magazines from CfgMagazines.. If you could explain to me what you're trying to achieve I'm sure I can give you a few pointers to achieve the same thing in a 'cleaner' fashion. Independently of that I would love to have the entire context/a repro mission so that I can understand better where the vanilla arsenal and my arsenal differ. Share this post Link to post Share on other sites
champ-1 40 Posted May 14, 2015 (edited) Mhh....what exactly do you mean by "reset"? What are you trying to achieve?I'm removing old items from arsenal and add new ones. I know there is some function that suppose to remove arsenal completly from given object, but I can't make it work. So I remove every type of item individually.I can also see that you're calling the [xla/bis]_fnc_removeVirtual[Category]Cargo functions without the necessary parameters. You need both an object and a list of classnames!The list of classnames is not optional according to the function header. I'm not quite sure why that works on the vanilla arsenal since that part of my arsenal is pretty much exactly the same as the vanilla one... I have second parameter in both XLA and BIS examples. [ _obj, // object [_obj] call XLA_fnc_getVirtualBackpackCargo // list of classnames ] call XLA_fnc_removeVirtualBackpackCargo; I also don't understand why you remove the arsenal action after you initialize the arsenal.I'm adding my own custom action later...Oh, and why are you adding _itemsArray to all categories? Idk, it works fine for me. It doesn't show any errors, just some notes to the log file.Here's the whole script. Example, I brought above is from file "fn_updateLocalArsenal.sqf". P.S. Some guy in my thread reporting that my script works fine with XLA Arsenal. Even though it doesn't work for me lol Edited May 14, 2015 by Champ-1 Share this post Link to post Share on other sites
ImperialAlex 72 Posted May 14, 2015 I'm removing old items from arsenal and add new ones. I know there is some function that suppose to remove arsenal completly from given object, but I can't make it work. So I remove every type of item individually.I have second parameter in both XLA and BIS examples. [ _obj, // object [_obj] call XLA_fnc_getVirtualBackpackCargo // list of classnames ] call XLA_fnc_removeVirtualBackpackCargo; Oh, I see - didn't read that carefully enough. Yeah, that's exactly what you should be doing... How does it "not work" for you? I.e. what do you expect to happen (I assume you expect a box without any action on it but there's still an old action?) @AmmoBoxExit: Yeah, that's apparently broken in vanilla and since I didn't know about that until relatively recently I haven't gotten around to fixing it in my mod ;) Share this post Link to post Share on other sites