Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zeus cannot edit supply crates #1139

Closed
FlaShG opened this issue May 7, 2019 · 5 comments · Fixed by #1140
Closed

Zeus cannot edit supply crates #1139

FlaShG opened this issue May 7, 2019 · 5 comments · Fixed by #1140
Assignees
Labels
Milestone

Comments

@FlaShG
Copy link

FlaShG commented May 7, 2019

Arma 3 Version: 1.92 (stable)
CBA Version: 3.11.1 (stable)

Mods:

- CBA_A3

Description:
Zeus (both virtual and not) cannot edit contents of supply crates, neither pre-existing ones nor self-placed. The crate content editing window displays none of the items in the crate, and none of the edits done by Zeus are actually applied when clicking OK.

Steps to reproduce:

  • Launch Arma with only CBA.
  • Start any Zeus scenario.
  • Place any supply crate.
  • Edit the crate. It is displayed as empty.
  • Add anything to the crate and confirm.
  • Edit the crate again. It's displayed as empty again.
  • Open the crate with a player entity. All of the crate's original items are there, but none of the items added by Zeus.

Where did the issue occur?

  • Self-Hosted Multiplayer, Editor (Multiplayer)

RPT log file:

@commy2
Copy link
Contributor

commy2 commented May 7, 2019

[CBA] (ui) Test OK: (cba_ui_fnc_preload3DEN is defined) x\cba\addons\ui\test_preload.sqf:7
[CBA] (ui) Test OK: (cba_ui_fnc_preloadCurator is defined) x\cba\addons\ui\test_preload.sqf:20
[CBA] (ui) ERROR: Test FAIL x\cba\addons\ui\test_preload.sqf:43
            (_vanilla isEqualTo _cba) cba_ui_fnc_preloadCurator

(preload3DEN check fails silently, because _vanilla undefined)

Diffs 1.90-1.92
3den: https://gist.github.com/commy2/613f277068e2240a6dd7394bde410364/revisions
curator: https://gist.github.com/commy2/0287b986d3543916bfbd1d4c67e25513/revisions

relevant curator:

- _addonListType pushback [_weapon,_displayName,_displayNameShort,_picture,_type,false];
+ _addonListType pushback [_displayName,_displayNameShort,_weapon,_picture,_type,false];

etc. (for new sort)

Fuckers made setting AmmoBox_list in 3den a scheduled script, so the test will have to be written scheduled too (longer load times :S). Test only.

  • add magwell stuff

@commy2 commy2 added the Bug label May 7, 2019
@commy2 commy2 added this to the 3.11.1 milestone May 7, 2019
@commy2 commy2 self-assigned this May 7, 2019
@commy2 commy2 modified the milestones: 3.11.1, 3.11.2 May 8, 2019
@commy2
Copy link
Contributor

commy2 commented May 20, 2019

@FlaShG
Is this resolved in 3.11.2?
BIF poster claims otherwise.

@FlaShG
Copy link
Author

FlaShG commented May 20, 2019

The update checks out for us in the following tests:

  • Unit with GM Module (custom scenario)
    • With a pre-existing crate
    • With a crate placed by GM
  • Virtual GM (default scenario)
    • With a crate placed by GM

In all cases, the GM sees the same inventory as the players, and the crate can be edited (including clear). We tested only with a completely unconstrained GM.

@FlaShG
Copy link
Author

FlaShG commented May 21, 2019

@commy2 We found the issue - Achilles replaces the standard UI for crate editing, and when using this mod, the bug happens with the new CBA patch. I assume that Achilles depends on CBA working as it did before. I also assume that it's the Achilles' maintainer's job to fix the issue from here on.

Edit: The Achilles repository already has an open issue for this.

@commy2
Copy link
Contributor

commy2 commented May 21, 2019

Thanks for finding this. That's unfortunate.

The arsenal data is essentially a big array containing sub-arrays for all available items. All CBA does is to precompile this array in a more effective way and cache it, which tremendously speeds up load times. CBA does not change the UI which interprets this data.

In 1.92 BI changed the order of the sub-arrays. They switched the positions of the displayed name (i.e. MX 6.5 mm) and the classname (i.e. arifle_MX_F), presumably to enable alphabetical sorting easily.

Therefore after 1.92 and when using CBA the list would be empty, because MX 6.5 mm is not a valid classname. (If there were a weapon with displayed name equal to the classname it would still be shown).

Achilles replaces the UI part of Zeus. Therefore when using Achilles and old CBA, you would still be seeing all items, because both UI and item array creation remain unaffected by the switch by BI as they were both overwritten with scripts using the old order of classname and displayed name.

Now after the CBA update, CBA is using the 1.92 new order. Therefore when using Achilles which is still based on the old order, the same issue of MX 6.5 mm not being a valid classname happens, just in the opposite position of the sub-array.

CBA has to comply with the change of BI, otherwise when using only CBA the list would be empty. Achilles must switch to the new order too. In the mean time, you can use the old version of CBA (3.11.1) when using Achilles and the new version of CBA (3.11.2) when not using Achilles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants