astruyk / JTF2-PATROL-Ops

JTF2 Patrol Ops mission for the public server
1 stars 2 forks source link

Cannot load in saved loadouts in Arsenal #6

Closed TheOtherTaylor closed 9 years ago

TheOtherTaylor commented 9 years ago

I assume this is so that you can't just load in whatever the heck you premade in arsenal. Is there any way to allow us to load in loadouts, but restrict what equipment can be loaded in?

astruyk commented 9 years ago

I think what's happening is that some units spawn with equipment that isn't part of their allowed equipment set. When you save the loadout it adds all the items on your person, but when you go to load it again it doesn't let you because the item isn't in the box.

I still need to verify this is the case. It's also possible there's a bug with Arsenal. I found this http://feedback.arma3.com/view.php?id=19966 when looking just now, but haven't been able to verify that it was actually the case.

astruyk commented 9 years ago

I think I see what it is. It looks like the default unit loadouts that Patrol Ops are using start with special 'includes all the things' weapons by default, but the loadout manager is only adding the various bits that make up the composite weapons.

So, for example the player starts with 'machinegun_and_scope' and the loadout manager inserts 'machinegun' and 'scope' but not 'machinegun_and_scope'... So if you don't change your weapon it saves as 'machinegun_and_scope' in the loadout, and then when it looks to see if that's in the box it isn't there.

I'm going to report a bug about it - if you have all of the things for 'machinegun_and_scope' in the box it should allow you to load loadouts with the composite weapon saved.

In the meantime I think I can go through and add the composite weapons for each unit type to the loadouts for them and then they'll get added and save/load should work.

TheOtherTaylor commented 9 years ago

I still don't understand why the combined weapon/item things exist. It might save you one line of code from time to time but you add so much possibility for this crap happening.

One question I noticed in how you're implementing arsenal you remove the virtual cargo then you add back what you want. I was under the impression that if you used falls for the allowall parameter on BIS_fnc_arsenal the virtual cargo would default empty and you wouldn't need to remove anything.

Lastly, I didn't really test this thoroughly, but it seemed like non missile-specialist classes can't grab missile ammo out of arsenal. Digging around in the mission I can't find where the actual lists of assigned weapons are.

astruyk commented 9 years ago

I submitted a bug here: http://feedback.arma3.com/view.php?id=20978 with a simple sample mission. Hopefully they'll do something to make working around it easier.

The reason I remove the items is that there may be items leftover on your client if you change class. So if you spawn as a missile specialist, and then as a medic, you shouldn't still have access to the missile stuff.

The Patrol_Ops_3_Configuration.hpp file has the equipment available for each of the units.

astruyk commented 9 years ago

The way Arsenal works I don't think there's a way to add ammunition for a weapon that you don't have equipped. We can probably just add items to the normal inventory on the Arsenal boxes and you can add them manually to your loadout that way (selecting 'Inventory' instead of 'Arsenal'). As long as the items are in the virtual inventory as well you should still be able to save your config.

astruyk commented 9 years ago

It doesn't seem to allow me to put the composite weapon in the box - or putting it in there doesn't let you load it anyways.

astruyk commented 9 years ago

Should be fixed now.