Page MenuHomeFeedback Tracker

Unexpected behavior of scripted Zeus modules in SP/local MP environments
New, NormalPublic

Description

Context:
I've recently encountered some weird behavior with script-created Zeus modules while locally testing rc compatibility of the Admin/Development-Tool I'm writing at the moment. From what I've searched online / on the feedback tracker I couldn't find anything about this, although I might have filtered incorrectly (apologies if so).

Explanation:
In SP / local MP environment script-created Zeus modules are incapable of remote controlling AI units and can't open the "edit window" when double clicking units. Although Editor placed Zeus modules work as expected in these environments.
Further unexpected/unintended behavior comes along when having RCd a unit using an editor placed module previously. Subsequently using RC, with a script-created module, will default to the last RCd unit (if null / dead it displays the appropriate error message in the zeus menu - regardless of which unit you try to RC and their current status).
However: This is not the case in a dedicated MP environment. Script-created modules work perfectly fine and can use RC to control units just fine. This only happens in SP/local MP.

I've made a quick video trying to showcase this (I recommend watching at 1.5x speed). First part is showing it working perfectly fine on dedi, second part is showing the behavior in sp/local mp. (Video: https://www.youtube.com/watch?v=ubV4AvNd9Tg) (used my Tools mod to simplify showcasing in the video, the behavior isn't affected by this however).

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
unrelated
Category
Zeus - General
Steps To Reproduce

BASIC

  • Join any SP/local MP environment
  • Create a zeus module via script
  • Attempt to RC a unit or double click the unit (which would normally open the edit window)

FURTHER UNEXPECTED BEHAVIOR

  • Join any SP/local MP environment
  • Create a zeus module via script
  • First use an editor placed zeus module to RC a unit
  • Switch to a script created zeus module
  • Attempt to RC any other unit
Additional Information

For reference: While testing this, I was using the following code to create modules:

[[_randomVarStr], {

    _logicGrp = createGroup sideLogic;
    _module = _logicGrp createUnit ["ModuleCurator_F", [0, 0, 0], [], 0, "NONE"];

    { _module setCuratorCoef [_x, 1]; } forEach ["Place","Edit","Delete","Destroy","Group","Synchronize"];
    _module addCuratorEditableObjects[(allMissionObjects "All"), true];
    [_module, (_this#0)] remoteExec ["setVehicleVarName", 0];

}] remoteExec ["call", 2];

Game Version & such:
Launcher version: 1.5.152445
Game version: 2.18.152405
Branch: main / beta branch not specified
(used my Tools mod to simplify showcasing in the video - this doesn't affect the issue though)

Event Timeline

Kohjin created this task.Thu, Jun 5, 12:30 PM
dedmen added a subscriber: dedmen.Tue, Jun 17, 12:41 PM

https://github.com/WolfCorps/gf_scripts/blob/master/addons/gf_scripts/functions/fn_p_makeUnitCurator.sqf
I use this script to give units zeus access.
It spawns ModuleCurator_F in script, same as you show it.

I never had any problems with this.

Thanks for the response :)

Sadly, looking at the code there really isn't much difference between the code I used to create the modules and the Fnc you linked.

Pretty much only:

_curator addEventHandler ["CuratorObjectDoubleClicked", {_this spawn MCC_fnc_curatorInitLine}];
 _curator addEventHandler ["CuratorObjectPlaced", {if (local (_this select 1)) then {missionNamespace setVariable ["MCC_curatorMouseOver",curatorMouseOver]}}];

The purpose of which isn't clear to me. And

if (!GF_CuratorSyncPFHRunning) then {
        [{
            {
                _x addCuratorEditableObjects[(allMissionObjects "All"), true];
            } forEach GF_Curators;
        },2 /*2 seconds*/] call CBA_fnc_addPerFrameHandler;
    };

Which, since it is based on CBA functionality, isn't very relevant to the issue at hand.
I tried the Fnc (removing these two statements) and there was, as expected, no difference. Perhaps you can shed some light on what "MCC_fnc_curatorInitLine" does. Maybe it solves the RC/Edit issues.

Again, the reported issue only occurs in local mp and sp environments and is limited to the remote control functionality / edit window. On dedicated there are no such issues with script created modules. From the video above the described issue is perhaps a little more obvious/clearer than the text.

In general, since Zeus is mainly an MP oriented feature this isn't a huge problem. It's really mostly just odd. And makes it annoying to test RC compat and play around with RC in those environments.