ZEN icon indicating copy to clipboard operation
ZEN copied to clipboard

Add Saved selection for modules and Transfer Ownership Module

Open ampersand38 opened this issue 5 years ago • 14 comments

When merged this pull request will:

  • Add global variable zen_editor_savedSelection which tracks the previous-to-last content of curatorSelected, used for selecting entities then dropping a module affecting them.
  • Add Transfer Ownership module using saved selection
  • https://youtu.be/4L-czAJIIcQ
  • https://youtu.be/sAHKlZA-Vz4

ampersand38 avatar Jan 09 '21 19:01 ampersand38

~~Can you enable edits from maintainers?~~ ~~Wanted to add the revised selection preview.~~ Nvm, I was just stupid.

Kexanone avatar Jan 10 '21 19:01 Kexanone

Is that naked unit bug fix basically same as in ACEX Headless or did you improve it in any way?

Side-note: It would be nice to have ACEX Headless compatibility when transfering to client (automatically put into headless blacklist for automatic transfers). Or an API event to be able to do it in a mission framework for example.

jonpas avatar Jan 11 '21 09:01 jonpas

Is that naked unit bug fix basically same as in ACEX Headless or did you improve it in any way?

Oh, I forgot about the ACEX one. I basically improved the Achilles' version of the fix by switching to unscheduled and reducing network traffic by not broadcasting the loadouts to all clients.

Side-note: It would be nice to have ACEX Headless compatibility when transfering to client (automatically put into headless blacklist for automatic transfers). Or an API event to be able to do it in a mission framework for example.

Yeah, we still have to look into this.

Kexanone avatar Jan 11 '21 10:01 Kexanone

I basically improved the Achilles' version of the fix by switching to unscheduled and reducing network traffic by not broadcasting the loadouts to all clients.

ACEX Headless does transmit loadout to everyone as well, and that is for sure an improvement in network traffic. But I don't see how it can be enough of an improvement to "fix" the issue, not while there are a million way more intensive things being broadcasted.

This seems to be a possible better fix (which I haven't implemented in ACEX yet): https://github.com/acemod/ACEX/issues/180#issuecomment-662517165 (also ref. linked BI ticket).

We also haven't really experienced this issue since the first fix implementation in ACEX, so I am mostly putting it down to badly optimized missions/mods.

jonpas avatar Jan 11 '21 10:01 jonpas

ACEX Headless does transmit loadout to everyone as well, and that is for sure an improvement in network traffic. But I don't see how it can be enough of an improvement to "fix" the issue, not while there are a million way more intensive things being broadcasted.

I agree with that, but the more important improvement of the new implementation is that the loadouts are guaranteed to be defined when you restore them. Achilles did not check and wait for the loadouts broadcasted via public setVariable to be defined on the new owner.

Kexanone avatar Jan 11 '21 10:01 Kexanone

Ah I see what you mean. That's actually a pretty good point.

jonpas avatar Jan 11 '21 10:01 jonpas

Actually, seeing now the ACEX implementation. The local EH combined with the appropriate checks via CBA_fnc_waitUntilAndExecute could be the best approach to tackle this problem in a general way. At this point, why not provide a common fix for all of us with CBA?

Kexanone avatar Jan 11 '21 11:01 Kexanone

At this point, why not provide a common fix for all of us with CBA?

Sure, I think that would be in scope. Want to open a PR?

jonpas avatar Jan 11 '21 12:01 jonpas

Sure, I think that would be in scope. Want to open a PR?

Yeah, I'll work on one when I got time. Would fit nicely into the new characters addon if you merge CBATeam/CBA_A3#1344 ;)

Kexanone avatar Jan 11 '21 12:01 Kexanone

Awesome! :+1:

Yeah, it's tagged for 3.16. But things are slow in this age of Arma 3.

jonpas avatar Jan 11 '21 13:01 jonpas

Reverted the fix in favor of CBATeam/CBA_A3#1406

Kexanone avatar Jan 11 '21 21:01 Kexanone

image

ampersand38 avatar Jan 12 '21 00:01 ampersand38

For now, just focus on the transfer ownership module, which seems to work fine besides the naked unit issue that will be handled by CBA in future. We should make a separate PR for generalizing and applying the selection feature to other modules.

Kexanone avatar Jan 21 '21 22:01 Kexanone

https://youtu.be/sAHKlZA-Vz4

ampersand38 avatar Jan 25 '21 19:01 ampersand38