Jump to content

Custom debug monitor


Kisha

Recommended Posts

This is one I made back in the days when I could be bothered with late nights and scripting :P

 

30rp5qx.jpg

 

https://github.com/nomadichayward/dayz_dual_debug_monitor

 

The key feature with mine is/was the ability to give admins a more advanced debug than regular users.  Unfortunately I've discontinued development and don't answer technical issues unless I'm getting paid (I was getting dozens of questions a day, mostly relating to requests for help that I'd already clearly explained in the readme).  It's easy to set up, just follow the instructions :)

 

Is it possible to show the debugmonitor permanently and refresh it every second to refresh the FPS and the within 500m and so on?

Link to comment
Share on other sites

Is it possible to show the debugmonitor permanently and refresh it every second to refresh the FPS and the within 500m and so on?

 

You could put a while loop in there (  while {sleep 0.1} do { ), it used to be always on but that version caused issues with sometimes not turning off or not turning on at all, I think it was connected with lag but never got the time to look into it properly.  Personally I think its down to my limited knowledge, so maybe someone else could figure it out and post an update.. 

 

Link to comment
Share on other sites

You could try this code:

//Let Zeds know
[player,4,true,(getPosATL player)] spawn player_alertZombies;

/*
Change the UID's below to match those of you and your admin(s)
Your admins will get the advanced version of your debug monitor,
while your regular users will get the cut down version. 
*/

if (isnil "permahint") then {permahint=1;};
if (permahint2==1) exitwith { hintSilent "Debug Off"; permahint2=nil; permahint=nil; };
 
if ((getPlayerUID player) in ["11111","22222"]) then { 

while {sleep 1;permahint==1;} do { 
         
          hintSilent parseText format ["
        <t size='0.95' font='Bitstream' align='left' >[%18]</t><t size='0.95' font='Bitstream' align='right'>[FPS: %10]</t><br/>
        <t size='0.95' font='Bitstream' align='center' color='#FFBF00'>Survived %7 Days</t><br/>
        <t size='0.95' font='Bitstream' align='left' >Players: %8</t><t size='0.95 'font='Bitstream' align='right'>Within 500m: %11</t><br/>
        <t size='0.95' font='Bitstream' align='left' >Vehicles:</t><t size='0.95' font='Bitstream'align='right'>%13(%14)</t><br/>
        <t size='0.95' font='Bitstream' align='left'>Air: %16</t><t size='0.95' font='Bitstream'align='right'>Sea: %23</t><br/>
        <t size='0.95' font='Bitstream' align='left' >All Bikes: %15</t><t size='0.95' font='Bitstream'align='right'>Cars: %17</t><br/>
        <t size='0.95' font='Bitstream' align='left' >Zombies (alive/total): </t><t size='0.95' font='Bitstream' align='right'>%20(%19)</t><br/>
        <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Zombies Killed: </t><t size='0.95' font='Bitstream' align='right'>%2</t><br/>
        <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Headshots: </t><t size='0.95' font='Bitstream' align='right'>%3</t><br/>
        <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Murders: </t><t size='0.95' font='Bitstream' align='right'>%4</t><br/>
        <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Bandits Killed: </t><t size='0.95' font='Bitstream' align='right'>%5</t><br/>
        <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Humanity: </t><t size='0.95' font='Bitstream' align='right'>%6</t><br/>
        <t size='0.95' font='Bitstream' align='left' color='#FFBF00'>Blood: </t><t size='0.95' font='Bitstream' align='right'>%9</t><br/>
        <t size='0.95' font='Bitstream' align='left' >GPS: %22</t><t size='0.95' font='Bitstream' align='right'>DIR: %24</t><br/>
        <t size='0.95'font='Bitstream'align='center' >%21</t><br/>",
        (name player),
        (player getVariable['zombieKills', 0]), 
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['humanity', 0]),
        (dayz_skilllevel),
        (count playableUnits),
        r_player_blood,
        (round diag_fps),
        (({isPlayer _x} count (getPos vehicle player nearEntities [["AllVehicles"], 500]))-1),
        viewdistance,
        (count([6800, 9200, 0] nearEntities [["StaticWeapon","Car","Motorcycle","Tank","Air","Ship"],25000])),
        count vehicles,
        (count([6800, 9200, 0] nearEntities [["Motorcycle"],25000])),
        (count([6800, 9200, 0] nearEntities [["Air"],25000])),
        (count([6800, 9200, 0] nearEntities [["Car"],25000])),
        (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'displayName')),
        (count entities "zZombie_Base"),
        ({alive _x} count entities "zZombie_Base"),
        (getPosASL player),
        (mapGridPosition getPos player),
        (count([6800, 9200, 0] nearEntities [["Ship"],25000])),
        (round(getDir player))
];
permahint2=1;
};

} else {

while {sleep 1;permahint==1;} do { 

hintSilent parseText format ["
        <t size='1.20' font='Bitstream' align='center' color='#00CC00'>%1</t><br/>
        <t size='0.95' font='Bitstream' align='center' >[%10]</t><br/>
        <t size='1.15' font='Bitstream' align='center' color='#FFCC00'>Survived %7 Days</t><br/><br/>
        <t size='1.15' font='Bitstream' align='left' color='#FFBF00'>Zombies Killed: </t><t size='1.15' font='Bitstream' align='right'>%2</t><br/>
        <t size='1.15' font='Bitstream' align='left' color='#FFBF00'>Headshots: </t><t size='1.15' font='Bitstream' align='right'>%3</t><br/>
        <t size='1.15' font='Bitstream' align='left' color='#FFBF00'>Murders: </t><t size='1.15' font='Bitstream' align='right'>%4</t><br/>
        <t size='1.15' font='Bitstream' align='left' color='#FFBF00'>Bandits Killed: </t><t size='1.15' font='Bitstream' align='right'>%5</t><br/>
        <t size='1.15' font='Bitstream' align='left' color='#FFBF00'>Humanity: </t><t size='1.15' font='Bitstream' align='right'>%6</t><br/><br/>
        <t size='1.15' font='Bitstream' color='#5882FA'>Tinyurl.com/DAYZ487</t><br/>",
        (name player),
        (player getVariable['zombieKills', 0]),
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['humanity', 0]),
        (dayz_skilllevel),
        (count entities "zZombie_Base"),
        ({alive _x} count entities "zZombie_Base"),
        (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'displayName'))
];
permahint2=1;
  };
};

Haven't tested it though, so no guarantees :)

Thank you!

It works very fine.

 

But it is only shown, if a player push Insert.

 

Is it possible to show it if a player logs into the server, so everyone see the monitor?

 

mfg

Link to comment
Share on other sites

Is it possible to show the debugmonitor for every player, when he/she connects to the server, so no player must push INSERT to show the debug monitor?

 

Yes, but with all due respect I find that kind of annoying and unfair on users that don't want to see it.  You would just need to call the script from the bottom of your init file, making sure the script has a while alive or some other loop to keep it on.  Personally though I'd go with letting the user choose whether to turn it on or not.  

Link to comment
Share on other sites

Am having a play with this for a DM event and using the debug monitor for scores.

 

Was curious why nearby zeds need to be alerted:

//Let Zeds know
[player,4,true,(getPosATL player)] spawn player_alertZombies;

Have added a sound in too (not tested yet) :)

//Play Sound
[player,"open_inventory",0,false,5] call dayz_zombieSpeak;
Link to comment
Share on other sites

why has no one mentioned using key down/key up event handlers so the debug is toggleable on a key press

something along the lines of this

fnc_debug = 
{
	while {debugMonitor} do
	{
		hintSilent parseText format ["<t size='0.95' font='Bitstream' align='left' >Debug Monitor Goes Here</t>"];
	};
};

fnc_debugTog = 
{
	if (isNil 'debugMonitor') then 
	{
		debugMonitor = true;
		[] spawn fnc_debug;
	}
	else
	{
		debugMonitor = !debugMonitor;
		hintSilent '';
		[] spawn fnc_debug;
	};
};

keyDownEvent = 
{
	_key = _this select 1;
	if (_key == 0xCF) then {[] spawn fnc_debugTog;};//0xCF is the END key go here for a list of key codes http://community.bistudio.com/wiki/DIK_KeyCodes
};
(findDisplay 46) displayAddEventHandler ['KeyUp','_this call keyDownEvent'];
Link to comment
Share on other sites

I cant get this working at all now insert does nothing at all.  please advise

in my compiles.sqf I have this in both places

changed this line 
_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
to this
_nill = execvm "custom\playerstats.sqf";
 
and this line
_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
to this
_nill = execvm "custom\playerstats.sqf";
 
 
in custom I have my playerstats.sqf
 
//Let Zeds know
[player,4,true,(getPosATL player)] spawn player_alertZombies;
 
//display gui (temp hint)
 
hintSilent parseText format ["
<t size='1.4' font='Bitstream' align='center' color='#DDDDDD'>Total Calamity DayZ Epoch</t><br/>
<t size='1.15' font='Bitstream' align='center' color='#DDDDDD'>%9 Players Online</t><br/><br/>
<t size='1.25' font='Bitstream' color='#5882FA'>%1</t><br/><br/>
<t size='1.20' font='Bitstream' color='#5882FA'>Survived %7 Days</t><br/><br/>
<t size='1.15' font='Bitstream' align='left'>Zombies Killed: </t><t size='1.15' font='Bitstream' align='right'>%2</t><br/>
<t size='1.15' font='Bitstream' align='left'>Headshots: </t><t size='1.15' font='Bitstream' align='right'>%3</t><br/>
<t size='1.15' font='Bitstream' align='left'>Murders: </t><t size='1.15' font='Bitstream' align='right'>%4</t><br/>
<t size='1.15' font='Bitstream' align='left'>Bandits Killed: </t><t size='1.15' font='Bitstream' align='right'>%5</t><br/><br/>
<t size='1.15' font='Bitstream' align='left'>Humanity: </t><t size='1.15' font='Bitstream' align='right'>%6</t><br/>
<t size='1.15' font='Bitstream' align='left' color='#C70000'>Blood: </t><t size='1.15' font='Bitstream' align='right' color='#C70000'>%8</t><br/><br/>
<t size='1' font='Bitstream' align='center' color='#16DB57'>Restart in %10 minutes</t><br/><br/>
<t size='1' font='Bitstream' align='center' color='#DDDDDD'>TS roguesgallery.teamspeak3.com saintpeter</t><br/>",
(name player),
(player getVariable['zombieKills', 0]),
(player getVariable['headShots', 0]),
(player getVariable['humanKills', 0]),
(player getVariable['banditKills', 0]),
(player getVariable['humanity', 0]),
(dayz_Survived)
(r_player_blood),
(count playableUnits),
(120-(round(serverTime/60)))
];
 
/*
player createDiarySubject ["MyDiary","My Diary"];
player createDiaryRecord ["MyDiary",["Stats", "Zombies Killed: <execute expression=player getVariable['zombieKills', 0]'</execute&gt]];
player createDiaryRecord ["MyDiary",["Stats", "Headshots: <execute expression=player getVariable['headShots', 0]'</execute&gt]];
player createDiaryRecord ["MyDiary",["Stats", "Murders: <execute expression=player getVariable['humanKills', 0]'</execute&gt]];
player createDiaryRecord ["MyDiary",["Stats", "Bandits Killed: <execute expression=player getVariable['banditKills', 0]'</execute&gt]];
player createDiaryRecord ["MyDiary",["Stats", "Humanity: <execute expression=player getVariable['humanity', 0]'</execute&gt]];
*/
 
Link to comment
Share on other sites

(player getVariable['zombieKills', 0]),
(player getVariable['headShots', 0]),
(player getVariable['humanKills', 0]),
(player getVariable['banditKills', 0]),
(player getVariable['humanity', 0]),
(dayz_Survived)                     <------- See he's got a , missing here.. 
(r_player_blood),
(count playableUnits),
(120-(round(serverTime/60)))
]; 

There you go.

Link to comment
Share on other sites

(player getVariable['zombieKills', 0]),
(player getVariable['headShots', 0]),
(player getVariable['humanKills', 0]),
(player getVariable['banditKills', 0]),
(player getVariable['humanity', 0]),
(dayz_Survived)                     <------- See he's got a , missing here.. 
(r_player_blood),
(count playableUnits),
(120-(round(serverTime/60)))
]; 

There you go.

 

thankz alot it works now

Link to comment
Share on other sites

I spent hours trying to figure out why a simple exitwith statement wouldn't work the other day, I'd had less than 3 hours sleep the day before and was starting to rage.. Then i realised what i'd done... can you see the error too :P

if ((180-(round(serverTime/60))) < 15 )	exitWith {  diag_log(" < 15 mins! "); // suspend };
This is one of those "when you spot it, you'll shit yourself" type memes for coders lol 

Well, for noobs anyway :P

 

Which is why I now always check my code with syntax highlighting on instead of just using plain text :)

Link to comment
Share on other sites

Hey guys, Im trying to add this in my antihack debug menu, but all im getting is waiting for autentication and black screen apon connection... doesnt try to load the database...

replacing with Axe cops debug, just trying to get it to connect before i edit values...
 

hintSilent parseText format [""
        <t size='1.4' font='Bitstream' align='center' color='#DDDDDD'>BRS DayZ Epoch</t><br/>
        <t size='1.15' font='Bitstream' align='center' color='#DDDDDD'>%9 Players Online</t><br/><br/>
        <t size='1.25' font='Bitstream' color='#5882FA'>%1</t><br/><br/>
        <t size='1.20' font='Bitstream' color='#5882FA'>Survived %7 Days</t><br/><br/>
        <t size='1.15' font='Bitstream' align='left'>Zombies Killed: </t><t size='1.15' font='Bitstream' align='right'>%2</t><br/>
        <t size='1.15' font='Bitstream' align='left'>Headshots: </t><t size='1.15' font='Bitstream' align='right'>%3</t><br/>
        <t size='1.15' font='Bitstream' align='left'>Murders: </t><t size='1.15' font='Bitstream' align='right'>%4</t><br/>
        <t size='1.15' font='Bitstream' align='left'>Bandits Killed: </t><t size='1.15' font='Bitstream' align='right'>%5</t><br/><br/>
        <t size='1.15' font='Bitstream' align='left'>Humanity: </t><t size='1.15' font='Bitstream' align='right'>%6</t><br/>
        <t size='1.15' font='Bitstream' align='left' color='#C70000'>Blood: </t><t size='1.15' font='Bitstream' align='right' color='#C70000'>%8</t><br/><br/>
        <t size='1' font='Bitstream' align='center' color='#16DB57'>Restart in %10 minutes</t><br/><br/>
        <t size='1' font='Bitstream' align='center' color='#DDDDDD'>brsquad.enjin.com</t><br/>
        <t size='1' font='Bitstream' align='center' color='#DDDDDD'>TS 46.20.46.243:14713</t><br/>"",
        (name player),
        (player getVariable['zombieKills', 0]),
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['humanity', 0]),
        (dayz_Survived),
        (r_player_blood),
        (count playableUnits),
        (120-(round(serverTime/60)))
        ];
        sleep 1;
            };
        };
Link to comment
Share on other sites

I don't know what you did to my script but you put at least 3 errors in the file so the game cannot load it this way..?? :p

 

The one I am using now looks like this, but it includes a misson indicator so if you don't run the epoch mission remove the line with "customMission ":

//Let Zeds know
[player,4,true,(getPosATL player)] spawn player_alertZombies;

//display gui (temp hint)

hintSilent parseText format ["
	<t size='1.4' font='Bitstream' align='center' color='#DDDDDD'>BRS DayZ Epoch</t><br/>
	<t size='1.15' font='Bitstream' align='center' color='#DDDDDD'>%11 Players Online</t><br/><br/>
	<t size='1.25' font='Bitstream' color='#5882FA'>%3</t><br/><br/>
	<t size='1.20' font='Bitstream' color='#5882FA'>Survived %9 Days</t><br/><br/>
	<t size='1.15' font='Bitstream' align='left'>Zombies Killed: </t><t size='1.15' font='Bitstream' align='right'>%4</t><br/>
	<t size='1.15' font='Bitstream' align='left'>Headshots: </t><t size='1.15' font='Bitstream' align='right'>%5</t><br/>
	<t size='1.15' font='Bitstream' align='left'>Murders: </t><t size='1.15' font='Bitstream' align='right'>%6</t><br/>
	<t size='1.15' font='Bitstream' align='left'>Bandits Killed: </t><t size='1.15' font='Bitstream' align='right'>%7</t><br/><br/>
	<t size='1.15' font='Bitstream' align='left'>Humanity: </t><t size='1.15' font='Bitstream' align='right'>%8</t><br/>
	<t size='1.15' font='Bitstream' align='left' color='#C70000'>Blood: </t><t size='1.15' font='Bitstream' align='right' color='#C70000'>%10</t><br/>"
	+ customMission + "<br/>
	<t size='1' font='Bitstream' align='center' color='#16DB57'>Restart in %12 minutes</t><br/><br/>
	<t size='1' font='Bitstream' align='center' color='#DDDDDD'>brsquad.enjin.com</t><br/>
	<t size='1' font='Bitstream' align='center' color='#DDDDDD'>TS 46.20.46.243:14713</t><br/>",
	"extras\debug_monitor\pirates.paa",
	"extras\debug_monitor\warning.paa",
	(name player),
	(player getVariable['zombieKills', 0]),
	(player getVariable['headShots', 0]),
	(player getVariable['humanKills', 0]),
	(player getVariable['banditKills', 0]),
	(player getVariable['humanity', 0]),
	(dayz_Survived),
	(r_player_blood),
	(count playableUnits),
	(120-(round(serverTime/60)))
];

Link to comment
Share on other sites

Thanks Axe I will try this when I get home, although I did try changing 1 line at a time to see if it would connect... like the player count, but it didn't,

I am editing the file in my dayz server pbo in init folder file called ah.sqf ( where the antihack debug menu is )

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...