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

Make Achilles support BIS_fnc_setCuratorAttributes #484

Open
Bummeri opened this issue May 7, 2019 · 6 comments
Open

Make Achilles support BIS_fnc_setCuratorAttributes #484

Bummeri opened this issue May 7, 2019 · 6 comments
Labels
bug Issue that is not working as intended. priority/medium Issue or PR that impacts some portions of the user base and should be resolved with due time.
Milestone

Comments

@Bummeri
Copy link

Bummeri commented May 7, 2019

Arma 3 Version: stable
CBA Version: stable
Achilles Version: stable

Mods:

- CBA_A3
- Achilles

Description:
BIS_fnc_setCuratorAttributes can normally be used to remove some functions from zeus interactions with Units/Vehicles/Groups/Waypoints.

Achilles however does not respect this.

[_zeusCuratorModule, "object",["unitPos"]] call BIS_fnc_setCuratorAttributes;

Running the above should result to this interface on units:
20190507232412_1

Not this:
20190507232145_1

@CreepPork CreepPork added bug Issue that is not working as intended. priority/medium Issue or PR that impacts some portions of the user base and should be resolved with due time. labels May 7, 2019
@CreepPork CreepPork added this to the 1.4.0 milestone May 7, 2019
@CreepPork CreepPork added the review Issue or PR that is being considered to be implemented or it's viability in Achilles. label May 7, 2019
@CreepPork CreepPork modified the milestones: 1.4.0, 1.3.0 May 9, 2019
@CreepPork
Copy link
Member

Achilles doesn't respect the variables because it forces them to %ALL, therefore ignoring any other inputs.

// Unlock all available attributes
_curatorModule setVariable ["BIS_fnc_curatorAttributesplayer",["%ALL"]];
_curatorModule setVariable ["BIS_fnc_curatorAttributesobject",["%ALL"]];
_curatorModule setVariable ["BIS_fnc_curatorAttributesgroup",["%ALL"]];
_curatorModule setVariable ["BIS_fnc_curatorAttributeswaypoint",["%ALL"]];
_curatorModule setVariable ["BIS_fnc_curatorAttributesmarker",["%ALL"]];

@CreepPork
Copy link
Member

CreepPork commented May 9, 2019

I'm not certain how to resolve the issue, to be honest. I think that for mission makers it would be really good if they could limit Achilles (Liberation for example) (keybinds should be limited too) but then for other types of missions? I think that a CBA setting would be the best approach because it gives you the flexibility to choose and the mission make can force to override the server settings.

@Bummeri
Copy link
Author

Bummeri commented May 20, 2019

At the moment I remove the options I do not want to be used by script:

    if ("achilles_ui_f" in activatedAddons) then //we need to hide stuff from achilles if its on.
    {
        [{isNull findDisplay 312 || {!isnull findDisplay -1}}, Bum_fnc_handleAchillesMod] call CBA_fnc_waitUntilAndExecute;
    };
Bum_fnc_handleAchillesMod = {

    if (isNull findDisplay 312) exitWith {};

    private _bum_fnc_hideCtrls = {
        params ["_ControlClassesToHide"];
        private _allCtrls = allControls findDisplay -1;

        {
            if (ctrlClassName _x in _ControlClassesToHide) then
            {

                _x ctrlShow false;
            };
        } forEach _allCtrls;
    };

    private _bum_fnc_restartAchillesHandle = {
        [{isNull findDisplay 312 || {!isnull findDisplay -1}}, Bum_fnc_handleAchillesMod] call CBA_fnc_waitUntilAndExecute;
    };


    switch (findDisplay -1 getVariable "BIS_fnc_initDisplay_configClass") do
    {
        case "RscDisplayAttributesGroup":
        {
            [["ButtonBehaviour","ButtonSide","RespawnPosition2","Skill2"]] call _bum_fnc_hideCtrls;
        };
        case "RscDisplayAttributesVehicle":
        {
            [["ButtonCargo","ButtonAmmo","ButtonDamage","ButtonSensors","ButtonFlag", "Skill2", "RespawnPosition2", "Rank", "Damage", "Fuel", "Ammo", "Lock2", "RespawnVehicle2", "Exec2", "ButtonBehaviour"]] call _bum_fnc_hideCtrls;
        };
        case "RscDisplayAttributesMan":
        {
            [["ButtonBehaviour","RespawnPosition2","Skill2", "Exec2", "ButtonCargo", "ButtonFlag", "Rank2", "Damage2", "Ammo"]] call _bum_fnc_hideCtrls;
        };
    };
    [{isnull findDisplay -1}, _bum_fnc_restartAchillesHandle] call CBA_fnc_waitUntilAndExecute;
};

And it is less than ideal. So any solution would be great!

@CreepPork CreepPork removed the review Issue or PR that is being considered to be implemented or it's viability in Achilles. label May 23, 2019
@CreepPork CreepPork self-assigned this May 23, 2019
@CreepPork
Copy link
Member

Currently, it is possible to hide all the attribute panels and show specifics using the BIS_fnc_setCuratorAttributes function. You would need to execute it after Achilles has initialized. For the attribute panels, you would need to provide the Achilles used RscAttribute names as the majority of them have been replaced you would need to use something like unitPos2.

You can find the names here:

@Bummeri
Copy link
Author

Bummeri commented May 27, 2019

Is there a variable I can check that tells me Achilles has initialized?

Is there a way to remove the extra buttons from between the "ok" and "cancel" buttons?

@CreepPork
Copy link
Member

CreepPork commented May 29, 2019

I haven't tested if the function supports removing the attribute buttons, I presume not, but when Achilles is initialized you can try to use this !isNil "ares_category_list".

That's we use for our ZGM missions: https://github.com/ArmaAchilles/ZGM_Achilles_Collection/blob/f1bf9a68018a8acfd54d535e2cbbd351d37d542f/src/ZGM-17_Achilles_Blufor.Altis/initPlayerLocal.sqf#L24

@CreepPork CreepPork removed their assignment Sep 22, 2019
@CreepPork CreepPork modified the milestones: 1.3.0, Backlog Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue that is not working as intended. priority/medium Issue or PR that impacts some portions of the user base and should be resolved with due time.
Projects
None yet
Development

No branches or pull requests

2 participants