Crowdedlight / Crows-Electronic-Warfare

Arma 3 Mod that enables electronic warfare features such as Radio/Drone jamming and spectrum signal tracking
https://crowdedlight.github.io/Crows-Electronic-Warfare/
Other
17 stars 6 forks source link

Allow scenario creators to prevent Crows from initializing on mission start #26

Closed darkcolouredbox closed 2 years ago

darkcolouredbox commented 2 years ago

Crows Electronic Warfare more or less seizes control of the spectrum device, fighting with any other script trying to handle signal sources.

By checking for the presence of a specific variable (crows_disabled, for example) before initializing, a mission maker would be able to disable Crows features in that mission, without requiring a client to remove the addon.

Crowdedlight commented 2 years ago

Fair point. Although would it not be easier to just not load the mod for the specific missions where you don't wish to use it? If you are asking to disable the entire mod with a parameter?

I can however see the interest in a mission parameter or another way to disable the spectrum device code, to allow to use other features of the mod, while using custom mission-code for the spectrum device. And as all other features are zeus enabled, those wouldn't have an impact unless used by zeus.

I will check what makes the most sense, a CBA setting, or probably just a crowsEW_spectrum_disabled variable. However that variable would have to be set before my initialization code is run, which is on post init.

Crowdedlight commented 2 years ago

Added in #27 Will come in next release. (Ideally looking at within 2 weeks, if time permits me)

Its implemented as a CBA setting. So you can set to disable the spectrum device and force it to overwrite all clients on mission.

20210902225600_1

Although be aware that even if disabled as override from mission then the following code will be run. It runs upon postInit event. This is to handle if the setting is changed mid-game it needs to reset the spectrum device options to ensure no signals are stuck in shown/transmission. So if you have a custom script you would have to set/reset your settings afterwards.

    {missionNamespace setVariable _x} forEach [
        ["#EM_FMin",0],                     // Minimum of frequency in MHz
        ["#EM_FMax",0],                     // Maximum of frequency in MHz
        ["#EM_SMin",-100],                  // Minimum of signal value, in RSSI -100 to 0, with 0 being the strongest
        ["#EM_SMax",0],                     // Maximum of signal value, in RSSI
        ["#EM_SelMin",0],               // currently selected frequency band that you scroll back and forth
        ["#EM_SelMax",0],               // currently selected frequency band that you scroll back and forth
        ["#EM_Values",[]],                  // signal values in array
        ["#EM_Transmit",false],             // boolean if you are transmitting, Affects the background of the graph and the icon on the device.
        ["#EM_Progress",0]                  // progress of transmission, between 0 and 1
    ];
Crowdedlight commented 2 years ago

It is now live with the latest release