This bothered me since Arma 2. The oval shape of the NVG overlay. I dunno, even if there is a reason for it, I don’t care. I just want it to be round. It looks better, it is more challenging, it seems more realistic judging by plentiful youtube videos of the real thing. So then I made round overlay and added it to mission config and it all went well except, cutRsc puts it on top of IGUI. This means you cannot see action menu or unit info when in NVGs. And while I really enjoyed how the whole thing came out, interacting with anything including vehicles became a problem. So I decided to try something else:

As you can see, you still cannot see the unit info, but you have the use of the action menu. Oh yes. This is a hack. 2 of IGUI displays that are not available through allDisplays are stored in uiNamespace variables during creation. These are:

  • “RscUnitInfo” – Display #300
  • “RscStanceInfo” – Display #303

Both displays are initialised before action menu, so if controls are created on any of these displays they will go “under” action menu. Creating control on “RscUnitInfo” display will create it after unit info, so it will cover it. If only there was another display started before 300, or at least a few empty picture controls so that one could use them to display something behind IGUI.

Anyway, this whole thing became possible only because of dynamic control creation. While still rough around the edges, it already proved to be quite useful. So here is the code of how I did it and hopefully someone from Bohemia will look at it and think of a way to use layer behind IGUI:

// init.sqf if (hasInterface) then { with uiNamespace do { waitUntil {time > 0}; waitUntil {isNil "RscStanceInfo"}; waitUntil {!isNull RscStanceInfo}; disableSerialization; RscOpticsMaskCtrls = []; _borderW = (safeZoneW - safeZoneH) / 2; _ctrl = RscStanceInfo ctrlCreate ["RscPicture", -1]; _ctrl ctrlShow false; _ctrl ctrlSetPosition [ safeZoneX + _borderW, safeZoneY, safeZoneH, safeZoneH ]; _ctrl ctrlSetText "a3\weapons_f\data\nightvisiontl.paa"; _ctrl ctrlCommit 0; RscOpticsMaskCtrls pushBack _ctrl; _ctrl = RscStanceInfo ctrlCreate ["RscPicture", -1]; _ctrl ctrlShow false; _ctrl ctrlSetPosition [ safeZoneX, safeZoneY, _borderW, safeZoneH ]; _ctrl ctrlSetText "#(rgb,8,8,3)color(0,0,0,1)"; _ctrl ctrlCommit 0; RscOpticsMaskCtrls pushBack _ctrl; _ctrl = RscStanceInfo ctrlCreate ["RscPicture", -1]; _ctrl ctrlShow false; _ctrl ctrlSetPosition [ safeZoneX + _borderW + safeZoneH, safeZoneY, safeZoneW, safeZoneH ]; _ctrl ctrlSetText "#(rgb,8,8,3)color(0,0,0,1)"; _ctrl ctrlCommit 0; RscOpticsMaskCtrls pushBack _ctrl; }; CVMPlayer = -1; player addAction [ "", {}, "", 0, false, true, "", "if !(currentVisionMode player isEqualTo CVMPlayer) then { CVMPlayer = currentVisionMode player; { _x ctrlShow (CVMPlayer > 0) } count (uiNamespace getVariable 'RscOpticsMaskCtrls') }; false" ]; };

Enjoy,
KK