mwpowellhtx / KP-Liberation

The work on GreuhZbugs Liberation Mission for Arma 3 continues...
GNU General Public License v3.0
7 stars 1 forks source link

[Arsenal] [0002] Catch up non ACE following the ACE template #152

Open mwpowellhtx opened 9 months ago

mwpowellhtx commented 9 months ago

Basic Information

Mission version: v0.98.dev-s37 Map used: Altis

Short Issue Description

Discovered that with ACE not loaded, was running into an issue with the BIS virtual items being treated like an array, for starters, instead of making the jump into the HASHMAP bucketing subsystem. So we need to remedy this before we can do too much further in terms of current iteration priorities.

mwpowellhtx commented 9 months ago

More or less resolved the first portion of the effort, which is to arsenal/fnc/fn_scanConfig. That as well as a handful of supporting common module functions, common/fnc/fn_addon, common/fnc/fn_configName, for starters. Also introduced arsenal/fnc/fn_baseWeapon, modeling more or less from the ACE codebase as well. Verified via logging and error reduction process.

The next part is to connect the dots with the virtual items and to copy the appropriately configured items right from the scanned classes into the virtual items HASHMAP buckets. And that should just about do it for the arsenal features catching up, knocking on wood, and everything else being equal.

Of course we reserve the privilege of following up in consequent issues, as needs arise.

mwpowellhtx commented 9 months ago

Introduced the following functions, inspired by ACE, in particular around the structured virtual items revisions, for lack of a better moniker. Fundamentally, a difference between a tupled ARRAY based approach historically, and a structured HASHMAP based approach contemporarily.

mwpowellhtx commented 9 months ago

So far after a bit of smoke testing, there are no errors in the logs from these key improvements. Need to probably see it fully round trip with inventory manager before we will be 💯 satisfied that this did the trick, ACE versus no ACE. And we will, but we want to get back to the focus of the current iteration, which is the captives with no ACE. Leaving the issue open for now.

mwpowellhtx commented 9 months ago

Brief update and we may consider parking this one as "good enough" for the time being. These next couple of posts will try to remain as concise as possible.

mwpowellhtx commented 9 months ago

Removed ACE from the picture and did some testing. Primarily needed to reconsider the action placement, especially on escort units handling prisoner units. This was turning out to be a huge performance issue, more than one would think, but it was. So contained the actions to just the escort (player) units.

mwpowellhtx commented 9 months ago

Reviewed unit animations are appropriate. If anything needed to dial back couple of the conditions directing traffic a bit for them to work better. Thinking about customizing the unit animation when loaded into vehicles, in particular turret or person turret positions, at which time they are animated around a ghost primary. We like the idea of animating similar to ACE the sitting position, and will consider that.

mwpowellhtx commented 9 months ago

As reported, discovered that loading captured (properly captive) units in a transport asset is somehow blocking said asset from player access. This is not an ACE behavior, as it is not in the picture. Unknown perhaps it is a Zeus Enhanced thing? Honestly, also, do not recall historically that ever having been an issue, or at least never encountered it, as folks on transport duty would still be in the vehicles.

At any rate, decided it would be efficacious to introduce an escort ability to get into said asset. We do so via commanding menus, present the high level specialized roles as menu options. We make a best effort attempt to move escort units into the vehicle in the desired position. And if that position is not available, move into the best effort any position after that.

mwpowellhtx commented 9 months ago

Re: icons in the commanding menus, that seems to work, and we even polished it off a bit with icons presented as part of the structured text. We also rounded out the unload process with the same improvements in mind, including icons in the structured text. We simplified the manner in which we relay parameters by gathering a bundled hashmap of parameters keyed according to an appropriate commanding menu context. In this way we are easily able to raise the EH callback still having access to the arguments as need be.

mwpowellhtx commented 9 months ago

At the same time had to introduce some common functions that would calculate angles from eye to eye contact in order to consider the nearest units, within tolerance, as the target of the actions. Bit tricky, but we got that working.

Introduced a CBA per frame handler for candidate units as well as for transports, the timings of which could be adjusted depending on performance. This also seems to help a bit. Seems to work consistently enough, and the candidate units are "there" when they need to be for the action conditions to run with them.

mwpowellhtx commented 9 months ago

We are also conducting a thought experiement which personalizes the captives escort actions with the names of the candidate units in focus. This seems to work as expected about 66.67% of the time, with the other not applying the action text. Not sure why that is, maybe a flaw in the ARMA engine, don't know. If successful, this would have approximated personalized prisoner action texts, but if it will not work consistently, then would rather it not be there at all.

Therefore, we are considering remediating the base action texts and foregoing the experiment as a non-starter. Honestly, it would be so much better if the name could be somehow drawn out of code, but that would be too much, I think. This will more than likely be the next best acceptable outcome to simplify the action texts and let it be.