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

Create CNTO-specific checks for Validate Mission #28

Open
freghar opened this issue Mar 29, 2021 · 6 comments
Open

Create CNTO-specific checks for Validate Mission #28

freghar opened this issue Mar 29, 2021 · 6 comments
Labels
Enhancement Changes to existing features not based on mod updates Feature Request New feature currently not present in this repository

Comments

@freghar
Copy link
Collaborator

freghar commented Mar 29, 2021

https://github.com/freghar/arma-additions/tree/46ee20d7ae/addons/editor_extensions/validate_mission is currently still unreleased, but I figured we should collect some ideas what to check to help out MMT in reviewing missions.

First of all, there are the existing checks from a3aa:

  • Overloaded units
  • Bad MP lobby ordering
  • Unique ACRE2 radios with _ID_1234 instead of generic ones

But I figured https://community.bistudio.com/wiki/Eden_Editor:_Setting_Attributes could give some other ideas, ie.

  • GameType being either Coop or PvP, anything else might indicate broken / missing module composition
  • Respawn set to custom position (whichever number is that)
    • while at it, for coop, filter playableUnits to get all sides of players, check that each side has its appropriate respawn marker (in all3DENEntities select 5 - markers), don't forget to accept all valid variations on respawn_guer[r]il[l]a
      • will do this in A3AA directly, since it's not specific to CNTO
      • also check that the marker is invisible, alpha attribute value
      • also check that it's within 100m of the Player unit (or any playable unit if you wish) - doesn't have to always PASS, but it's a good catch if the MM moves units in 3D space, but forgets to select the marker
  • Some mission info basics the MM might have forgotten to fill

In addition, list (in an always-PASSing check) all mission-modified CBA settings: (allVariables CBA_settings_mission) select { ([_x] call CBA_settings_fnc_priority) isEqualTo "mission" }; (you could theoretically use just allVariables cba_settings_mission, but that would include mission-modified-but-not-enforced settings)

  • Extend respawn marker check to check for duplicates - this can be valid, but more likely is a result of a MM placing faction composition, deleting it in 3D space, and placing it again

Then maybe

  • check if count playableUnits > 10, just in case
  • check for some known-good role description in playableUnits? ..
  • persistent callsigns have been restored (for all all3DENEntities select 1, check if the a3aa_ee_persistent_callsign attribute exists and if it's non-empty string, then the groupId attribute must match it) -- I will do that in A3AA directly, seems generic enough // done
  • viscom/scopebox/telestation/whatever additional compositions were placed - search for them in all3DENEntities select 0 using Role Description (_obj get3DENAttribute "description" select 0)
    • check that their respective markers (get marker text to figure out which one is which) are within 5m of the object, in case the MM moved all objects in 3D space
    • report FAIL if they're not found - to detect composition bugs (empty role description on these objects)
  • viscom/scopebox are on their tables, not above or under
    • maybe try lineIntersectsSurfaces pointing down - if you get ground while on the table as well, try starting from the center of the laptop/scopebox model
  • if the mission time of day is between 21h and 04h (or so), check for NVGs or flares -- use dayTime, get3DENMissionAttribute is broken for anything in Environment
  • check if there are multiple map markers with text "VISCOM" or "Telestation" or so, catching an issue where MM places down a composition, deletes it in 3d, and leaves the old markers behind
  • check if all units have skill == 0.5, because some mods (3CB) change this and some AI mods (ie. mine) detect that as a user change and avoid dynamically assigned skill because of it

I'm out of ideas, ... anything else reasonably checkable? .. Most of the items on MMT checklist (headless client, etc.) are already indirectly covered by some of the things above.

Any volunteers wanting to implement this? .. I can push an example of 2 checks or something to get started.


PS: this is deferred to a time when the compositions have a new sniper team in place of the old DMT

@Seb105
Copy link
Contributor

Seb105 commented Mar 29, 2021

Some requirements for our missions such as having a title, having the opord filled in. I think most of the MMT checklist could be automated. I can probably implement the cnto specific stuff.

@Seb105
Copy link
Contributor

Seb105 commented Mar 29, 2021

@baegel49 as MMM you probably have a chance to make your life easier here so give it some thought.

@freghar
Copy link
Collaborator Author

freghar commented Mar 29, 2021

Some requirements for our missions such as having a title, having the opord filled in. I think most of the MMT checklist could be automated. I can probably implement the cnto specific stuff.

I already mentioned title/author/picture/etc ("Some mission info basics"), but checking whether a3aa_ee_briefing in (all3DENEntities select 3) and double checking that each field of the briefing contains >50 characters (or so) could be handy.

@freghar
Copy link
Collaborator Author

freghar commented Mar 30, 2021

I've added the persistent callsign check to A3AA directly, so that's one less thing here.

For the rest, the config.cpp should have ie.

...
        requiredAddons[] = {
            "cba_xeh",
            "a3aa_ee_validate_mission"
        };
...
class CfgFunctions {
    class cnto_validate_mission_checks {
        class all {
            file = "\cnto\validate_mission_checks";
            class run;
        };
    };
};
...
class Extended_PreInit_EventHandlers {
    class cnto_validate_mission_checks {
        init = "cnto_validate_mission_checks_fnc_run call a3aa_ee_validate_mission_fnc_register";
    };
};

and the fn_run.sqf something like

private _check_something = {
    if (game type in ["Coop","PvP"]) then {
        ["Check something", true]
    } else {
        ["Check something", false, [objects or whatever that failed], [
            "Checking for something failed, you suck.",
            "Try this and that and unbreaking it."
        ]]
    };
};

...

[
    [] call _check_something,
    ...
]

The reason for using private functions is that you can if (...) exitWith { pass } early, ie.

private _pass = { ["Check something", true] };
if (no applicable units) exitWith _pass;
private _blabla = process something;
if (isNil "_blabla") exitWith _pass;
...

@freghar
Copy link
Collaborator Author

freghar commented Apr 9, 2021

added a magnified scope adjustability check to #28 (comment)

@freghar
Copy link
Collaborator Author

freghar commented Apr 22, 2021

Crossed out items implemented by #30 .

@JamesTheClarke JamesTheClarke added Enhancement Changes to existing features not based on mod updates Feature Request New feature currently not present in this repository labels Jul 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Changes to existing features not based on mod updates Feature Request New feature currently not present in this repository
Projects
None yet
Development

No branches or pull requests

3 participants