alganthe / ACE3ganthe

Open-source realism mod for Arma 3
http://ace3mod.com/
Other
0 stars 0 forks source link

Arsenal rewrite #8

Open alganthe opened 6 years ago

alganthe commented 6 years ago

Roadmap:

TODO:

BUGS:

maybe

self references:

virtualItem format:

Click to expand ``` [ [ [], [], [] ], // Weapons 0 [ [], [], [] ], // WeaponAccessories 1 [ ], // Magazines 2 [ ], // Headgear 3 [ ], // Uniform 4 [ ], // Vest 5 [ ], // Backpacks 6 [ ], // Goggles 7 [ ], // NVGs 8 [ ], // Binoculars 9 [ ], // Map 10 [ ], // Compass 11 [ ], // Radio slot 12 [ ], // Watch slot 13 [ ], // Comms slot 14 [ ], // WeaponThrow 15 [ ], // WeaponPut 16 [ ] // InventoryItems 17 [ ] // Unique misc 18* [ ], Unique mags 19* [ ], Unique throw 20* [ ], Unique put 21* [ [], [], [], [] ] // Unique accs 22* [ ], //misc CfgVehicles 23* [ ], // misc CfgGlasses 24* ]; *(exist only between onArsenalOpen and onArsenalClose) ```

CurrentItem format:

Click to expand ``` [ [ ], // primary 0 [ ], // secondary 1 [ ], // handgun 2 [ ], // Headgear 3 [ ], // Uniform 4 [ ], // Vest 5 [ ], // Backpacks 6 [ ], // Goggles 7 [ ], // NVGs 8 [ ], // Binoculars 9 [ ], // Map 10 [ ], // Compass 11 [ ], // Radio slot 12 [ ], // Watch slot 13 [ ], // Comms slot 14 [ ] // uniformItems 15 [ ] // vestItems 16 [ ] // backpackItems 17 [ ] // primary accessories 18 [ ] // secondary accessories 19 [ ] // handgun accessories 20 ]; ```

EHs list:

Click to expand All are local EHs | Name | Arguments | | ------------- | ------------- | | ace_arsenal_displayOpened | Arsenal display (DISPLAY) | | ace_arsenal_displayClosed | None | | ace_arsenal_leftPanelFilled | Arsenal display (DISPLAY), current left panel IDC (SCALAR), current right panel IDC (SCALAR) | | ace_arsenal_rightPanelFilled | Arsenal display (DISPLAY), current left panel IDC (SCALAR), current right panel IDC (SCALAR) | | ace_arsenal_onLoadoutSave | Loadout index (SCALAR), [loadout name (STRING), loadout data (ARRAY)] | | ace_arsenal_onLoadoutLoad | loadout data (ARRAY), loadout name (STRING) | | ace_arsenal_loadoutShared | Loadouts list listnBox control (CONTROL),, [loadout author (STRING), loadout name (STRING), loadout data (ARRAY)] | | ace_arsenal_loadoutUnshared | Loadouts list listnBox control (CONTROL), loadout name (STRING) | | ace_arsenal_cargoChanged | Arsenal display (DISPLAY), item (STRING), add or remove (BOOL), shiftState (BOOL) | | ace_arsenal_loadoutImported | Arsenal display (DISPLAY), (import list (BOOL) | | ace_arsenal_loadoutExported | Arsenal display (DISPLAY), export list (BOOL) | | ace_arsenal_loadoutsDisplayOpened | loadouts screen display (DISPLAY) | | ace_arsenal_loadoutsDisplayClosed | none | | ace_arsenal_loadoutsTabChanged | loadouts screen display (DISPLAY), tab control (CONTROL) | | ace_arsenal_loadoutsListFilled | loadouts screen display (DISPLAY), tab control (CONTROL) |
dedmen commented 6 years ago
tbeswick96 commented 6 years ago

Ability to load preset loadouts. Set in Mission. Special LOAD button that only displays these preset loadouts.

Similar to this: https://goo.gl/gPTEs3 https://goo.gl/tF5X53

Configurable in both normal config and mission config would be ideal. https://github.com/uksf/modpack/blob/master/addons/arsenal/CfgLoadouts.hpp

alganthe commented 6 years ago

no need for a separate load button, I could check wether shift is pressed of not (or ctrl, or alt)

tbeswick96 commented 6 years ago

no need for a separate load button, I could check wether shift is pressed of not (or ctrl, or alt)

I think an obvious button would be better for unfamiliar/uninformed users than a keybind

dedmen commented 6 years ago

baermitumlaut you could just rais an event or something on export and remove the id. or be so nice and do that automatically, for tfar as well. Posted in #random-arma

What I would prefer is a onExport event that provides a getUnitLoadout type array as reference. So everyone that hooks into that array can just modify the array reference to apply fixes.

jonpas commented 6 years ago

A config entry or event to handle unique items, to make unique (with ID, scope=1) ACRE2/TFAR radios and ACE3 dogtags show up in containers. But they can only be removed, not added, and only show up when they are present in the inventory.

dedmen commented 6 years ago

In addition to that eventHandler that fires when unique item was removed. Useful for ACRE's ID cleanup.

jonpas commented 6 years ago

In addition to that eventHandler that fires when unique item was removed. Useful for ACRE's ID cleanup.

No need, maybe for the future though, but there are other cases that still have to be handled, so not needed.

dedmen commented 6 years ago

For the rightPanel categories when putting attachments into container. visually distinguish attachments that are supported by the currently equipped weapons vs the ones that aren't.

I guess textColor would be a good way. Because greyed out can't be used as that's "doesn't fit into container" already.

Max255PL commented 6 years ago

Few things I noticed testing just now (keep in mind I know nothing about BI UI stuff), also disregard anything related to still WIP stuff, I can't remember what's done.

If I find anything else I'll add it here.

dedmen commented 6 years ago

moving the view with left-click is reversed left/right compared to BI Ars, makes it really unintuitive

Forgot to say... oops.. It seems that on one side it's correct. If you turn 180° it is inverted or something like that.. really weird.

atm you have to hit enter/search button to get it to search, automatic searching with 4 chars would be the best imo (but leave the option to hit enter/search with less than that)

We won't have performance problems after the first search most likely.. Because search is so fast

alganthe commented 6 years ago
jonpas commented 6 years ago

You should get rid of all access = 0; stuff.

alganthe commented 6 years ago

access needs to be define for those, access 0 means read and write is allowed for those classes.

jonpas commented 6 years ago

Ref https://github.com/acemod/ACE3/pull/5442

alganthe commented 6 years ago

access isn't defined for GVAR(display), only in the base classes in RscCommon, here's a excerpt from the biki

It's also noteworthy for more advanced developers that there is a numeric property named access with the following possible values (and their named constants):

0 - ReadAndWrite - this is the default case where properties can still be added or overridden.
1 - ReadAndCreate - this only allows creating new properties.
2 - ReadOnly - this does not allow to do anything in deriving classes.
3 - ReadOnlyVerified - this does not allow to do anything either in deriving classes, and a CRC check will be performed.

This does not have any impact other than limiting what deriving classes are allowed to (re-)specify. Generally this is not required for dialogs or dialog controls and can be safely ignored.

jonpas commented 6 years ago

Yes I know, just pointing out we already had issues with pboProject regarding this. I still don't see why you must have that in this Arsenal?

alganthe commented 6 years ago

@jonpas fixed.

dedmen commented 6 years ago

"Preset packs" Don't know a better name. You start a new loadout. grab a backpack you like. And then add the "medical light" preset pack and with one click add all the medical stuff a regular soldier needs. Or the "medical heavy" pack which contains full medic equipment. or the "sniper" pack which has kestrel, atragMX, range card

Ability to group a bunch of items to a hotkey. So you press your configured hotkey and with one button press you have all the medical stuff

alganthe: there's also a lot of space for additional buttons on the right side above the "clear container" button

Almost everytime when I pack a loadout I pack the same medical stuff over and over. Same for sniper stuff. I think making a menu to configure hotkeys is too hard. But just add a API function to retrieve the current open container. and a API function to put items into specific container

Buttons wouldn't be a good solution for this.. Or ... Well... You could add a category that just lists all these user made presets and only an "add" button next to it. I don't think it's feasible to have a remove button.

Slack #dev 24.10.2017 11:06AM

Max255PL commented 6 years ago

This time bug reports (mostly):

dedmen commented 6 years ago

We already talked about that. I don't see a reason in a clear Loadout button. I mean. you clear. And then you get new uniform,vest,backpack and all the other stuff. you basically do the exact same thing as if you didn't have the clear button.

Max255PL commented 6 years ago

I guess you're right, I thought of it when the bug with multiplying items happened and had no way to clear the mess. There'd be no need for it when that's fixed...

EDIT: And multiplying happens more than I wrote above, even when I load a set, then load an empty one and then back the first one I ended up with double the items. That's without exiting the loadout dialog between every load and no matter the tab I'm in.

dedmen commented 6 years ago

The only place where items could duplicate is inside containers anyway. And we already have the clear container button

alganthe commented 6 years ago

when in weapons tab and loading a loadout, the right panel (scrolling, selecting) stops working till you switch to a different left tab and back to weapons (both primary and secondary)

Fixed

when loading a loadout over the current one items in the currently selected container get added without clearing the old one

Fixed

the categories between Binoculars and Insignia (maps, watches, etc.) should reset to standing anim like all other non-weapon do

Done

"My loadouts" should be fully working now. Right panel buttons should be fixed too, currentMag should be working like other tabs now.

Max255PL commented 6 years ago

More bugs (tested before last 2 commits):

alganthe commented 6 years ago
alganthe commented 6 years ago

Accs are fixed

alganthe commented 6 years ago

binos fixed

Max255PL commented 6 years ago

Pretty sure the Helmet Cam is just an item, could probably use a refresh to CBA_MiscItem but should still show up regardless, like it does in vanilla Arsenal.

class ItemcTabHCam: ItemCore { descriptionshort = "HD Helmet Mounted Camera"; descriptionuse = "Use: Used to record and stream video"; displayname = "Helmet Camera"; picture = "\cTab\img\cTab_helmetCam_ico.paa"; scope = 2; simulation = "ItemMineDetector"; detectRange = -1; type = 0; class ItemInfo: InventoryItem_Base_F { mass = 4; }; author = "Gundy, Riouken, Raspu"; };

One more thing I noticed now - when frequently loading/saving and exiting/entering Arsenal there is a chance that every loadout will be greyed out, everything loads fine but needs a mission restart to fix itself.

And one QOL thing - presistent camera position/rotation when exiting/entering the Arsenal, like in vanilla one. Gets kinda annoying when testing stuff, every time you go back to Arsenal the cam is basically in the box (it's probably more annoying now since you have to get really close to get the option).

EDIT: I just got the weapon dissapear from the loadout in the menu again, so it's definitely a thing. It was a MP7A2 Desert from RHS.

alganthe commented 6 years ago

I just realized the mine detector type wasn't picked up, that may be why.

On the all items greyed out, I can't reproduce, do you have more precise steps, an RPT from when that happened?

Max255PL commented 6 years ago

I'll try to catch it but it happens randomly. Only thing in the RPT points to ItemRadioAcreFlagged.

alganthe commented 6 years ago

aaaaah, that's because the radio inventory item is set to scope 1 by acre, thus it's not in the list anymore