Jump to content
Sign in to follow this  
hoizen

Working around Zeus Bugs. Hacky Jury Rigged Solution and Problems

Recommended Posts

A bit ago I begun working on my own little project to introduce simulated Fog of War to the Zeus commander to allow for a true Zeus vs. Player experience. The idea is simply unrendering objects that the zeus's AI are not aware of. Unfortunately I had to put that project on hold because I ran into a bug that seems unavoidable. That bug being that zeus is completely capable of editing supposedly non-editable objects and even if you remove all editable attributes one-by-one, the fact still stands that the zeus player can simply scan his mouse across the map and find the names/locations of any unit on the map (Ultimately destroying the idea of FOW). Zooming out on the map makes it even easier to discover "hidden" units as the clickable area for all units is increased with the zoom. Original discovery thread here and cobwebbed bug report here

 

I've decided to come back and see if I can work around this problem with the idea of simply hiding the map when the zeus player is in the zeus interface. My hacky idea is this:

When the zeus player is in the curator display (IDD 312), recognize when the map is opened (keydown on "M") and black out their screen. Possibly with the text "No map available" or what ever. The prototyping code is:

if (player == ZeusCommander) then {
	
	fnc_blackScreen = {
		_blackScreened = _this getVariable "blackScreen";
		//Screen isn't black
		if !_blackScreened then {
			cutText ["","BLACK",0,true]; //black it
		//screen is black
		} else {
			cutText ["","BLACK IN",1,true]; //remove black
		};
		//flip boolean
		_this setvariable ["blackScreen",!_blackScreened];
	};

	ZeusCommander setvariable ["blackScreen",false];
	waituntil {!(IsNull (findDisplay 312))};  
	_keyDown = (findDisplay 312) displayAddEventHandler ["KeyDown","if (_this select 1 == 50) then {ZeusCommander call fnc_blackScreen;}"];
};

 

In the curator display, recognize "M" (50), check if screen already black. If not, black it, If is, un black it. Simple stuff. To much of my frustration however it seems like no matter what the Zeus map and zeus map unit icons are always ontop. I'm clueless with arma's UI and display infrastructure but it feels like the curator interface is just top priority. I have tried simply covering the map up for the zeus player with a giant area maker but it does not cover up unit icons (Only covers terrain) and now I have tried to black out the screen with cutText which which works perfectly on the normal map (display IDD 46) but not on zeus. It is clear the cutText is running but just behind the zeus map as I can see the BLACK IN fade when I close the zeus map.

 

At this point I'm looking for any recommendation, fix, hacky hack, or what ever to just get rid of this damned broken zeus map. The player's normal map is fine. No unit icons, no ability to hover over the map to discover units, nothin. It's the zeus map that is the problem. If I can discover a way to, in any form, stop the use of the zeus map, then I will have my Fog of War functioning without any extremely obvious exploits.

Share this post


Link to post
Share on other sites

The map has the IDC 50 so you could probably just hide it with
 

((findDisplay 313) displayCtrl 50) ctrlSetFade 1;

((findDisplay 313) displayCtrl 50) ctrlCommit 0;

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×