DX | Custom Debug Monitor

Did This Work For You?

  • Yes

    Votes: 17 63.0%
  • No

    Votes: 10 37.0%

  • Total voters
    27
Can you type the text I would need for days survived and fps? Thanks man!

This is how I have my Debug_Monitor.sqf setup...

Code:
if (isNil "custom_monitor") then {custom_monitor = true;} else {custom_monitor = !custom_monitor;};
 
while {custom_monitor} do
{
    _kills =        player getVariable["zombieKills",0];
    _headShots =    player getVariable["headShots",0];
    hintSilent parseText format ["
    <t size='1'font='Bitstream'align='center'>%1</t><br/>
    <t size='1'font='Bitstream'align='left' color='#ff0000'>Blood:</t><t size='1' font='Bitstream'align='right'>%2</t><br/>
    <t size='1'font='Bitstream'align='left'>Zombies Killed:</t><t size='1'font='Bitstream'align='right'>%3</t><br/>
    <t size='1'font='Bitstream'align='left'>Headshots:</t><t size='1'font='Bitstream'align='right'>%4</t><br/>
    <t size='1'font='Bitstream'align='left'>Survived:</t><t size='1'font='Bitstream'align='right'>%5 Days</t><br/>
    <t size='1'font='Bitstream'align='left'>FPS:</t><t size='1'font='Bitstream'align='right'>%6</t><br/>
 
    ",dayz_playerName,r_player_blood,_kills,_headShots,(dayz_Survived),floor(diag_fps)];
sleep 1;
};

I just have Debug_Monitor.sqf in the dayz_mission folder.
Don't forget to add this at the bottom of your init.sqf file...

Code:
[] ExecVM "Debug_Monitor.sqf";

If you put your Debug_Monitor.sqf into a subfolder like Custom or Fixes, you'll need to reflect that in the init.sqf line above.
 
Can anyone confirm this works for 1.7.7.1?
Can't seem to get it running on my server at all!

Works great on my dayZ.st server running v1.7.7.1
See my post #22 above. You might have to add/delete entries to your taste.
 
(120-(round(serverTime/60))) change the 120 to your play time in minutes.

Excelsior, here's one for you...
How about changing "Days Survived" to "Hours Survived"? Or better yet, Days AND Hours (example You Survived: 4 days 7 hours so far).
 
This has everything incuding fps time until restart kills days survived etc, thanks go to Innuce and everyone else who's code I read.




if (isNil "custom_monitor") then {custom_monitor = true;} else {custom_monitor = !custom_monitor;};

while {custom_monitor} do
{
_kills = player getVariable["zombieKills",0];
_killsH = player getVariable["humanKills",0];
_killsB = player getVariable["banditKills",0];
_humanity = player getVariable["humanity",0];
_headShots = player getVariable["headShots",0];
hintSilent parseText format ["
<t size='2'font='Bitstream'align='center'>%1</t><br/><br/>
<t size='1'font='Bitstream'align='left' color='#ff0000'>Blood:</t><t size='1' font='Bitstream'align='right'>%2</t><br/>
<t size='1'font='Bitstream'align='left'>Humanity:</t><t size='1'font='Bitstream'align='right'>%3</t><br/>
<t size='1'font='Bitstream'align='left'>Murders:</t><t size='1'font='Bitstream'align='right'>%4</t><br/>
<t size='1'font='Bitstream'align='left'>Bandits Killed:</t><t size='1'font='Bitstream'align='right'>%5</t><br/>
<t size='1'font='Bitstream'align='left'>Zombies Killed:</t><t size='1'font='Bitstream'align='right'>%6</t><br/>
<t size='1'font='Bitstream'align='left'>Headshots:</t><t size='1'font='Bitstream'align='right'>%7</t><br/>
<t size='1'font='Bitstream'align='left'>Survived:</t><t size='1'font='Bitstream'align='right'>%8 Days</t><br/>
<t size='1'font='Bitstream'align='left'>FPS:</t><t size='1'font='Bitstream'align='right'>%9</t><br/>
<t size='1'font='Bitstream'align='left'>Time Until Restart:</t><t size='1'font='Bitstream'align='right'>%10</t><br/>
<t size='1'font='Bitstream'align='center' color='#ff0000'>www.GitsClan.co.uk</t><br/><br/>

",dayz_playerName,r_player_blood,round _humanity,_killsH,_killsB,_kills,_headShots,(dayz_Survived),floor(diag_fps),(60-(round(serverTime/60))) ];
sleep 1;
};
 
Wrong text element 'null'
I am getting a hell of a lot of these in my .RPT since adding the debug monitor does anyone know what causes this issue?
For now I will have a play around and disable a few features to see if I can get rid of it.
 
unlikely like the usual way ti add in it in player_spawn_2.sqf i can´t see a way to check for

_combattimeout = player getVariable["combattimeout",0]; to display a combattimer
figured it out. Was an error in player_spawn_2.sqf i have edited before-

so the code to display combattime will be:

Code:
while {custom_monitor} do
{
    _combattimeout = player getVariable["combattimeout",0];
if (_combattimeout> 0) then 
{
_timeleft= _combattimeout - time;
hintSilent parseText format ["
<t size='0.90' font='Bitstream' color='#FF8000' align='left'>%1</t><t size='0.90' font='Bitstream' align='right' color='#FF8000'>%2 FPS</t><br/><br/>
<t size='0.90' font='Bitstream' align='left'>Zombies: %9 </t><t size='0.90' font='Bitstream' align='right'>%3</t><br/>
<t size='0.90' font='Bitstream' align='left'>Survivors: </t><t size='0.90' font='Bitstream' align='right'>%4</t><br/>
<t size='0.90' font='Bitstream' align='left'>Bandits: </t><t size='0.90' font='Bitstream' align='right'>%5</t><br/>
<t size='0.90' font='Bitstream' align='left'>Blood: </t><t size='0.90' font='Bitstream' align='right'>%6</t><br/>
<t size='0.90' font='Bitstream' align='left'>Humanity: </t><t size='0.90' font='Bitstream' align='right'>%7</t><br/>
<t size='0.90' font='Bitstream' align='left' color='#FF0000'>In Combat: </t><t size='0.90' font='Bitstream' align='right' color='#FF0000'>%8</t><br/>",
(name player),
(round diag_fps),
(player getVariable['zombieKills', 0]),
(player getVariable['humanKills', 0]),
(player getVariable['banditKills', 0]),
(round r_player_blood),
(player getVariable['humanity', 0]),
round(_timeleft)];
} else 
{
   hintSilent parseText format ["
<t size='0.90' font='Bitstream' color='#FF8000' align='left'>%1</t><t size='0.90' font='Bitstream' align='right' color='#FF8000'>%2 FPS</t><br/><br/>
<t size='0.90' font='Bitstream' align='left'>Zombies: %9 </t><t size='0.90' font='Bitstream' align='right'>%3</t><br/>
<t size='0.90' font='Bitstream' align='left'>Survivors: </t><t size='0.90' font='Bitstream' align='right'>%4</t><br/>
<t size='0.90' font='Bitstream' align='left'>Bandits: </t><t size='0.90' font='Bitstream' align='right'>%5</t><br/>
<t size='0.90' font='Bitstream' align='left'>Blood: </t><t size='0.90' font='Bitstream' align='right'>%6</t><br/>
<t size='0.90' font='Bitstream' align='left'>Humanity: </t><t size='0.90' font='Bitstream' align='right'>%7</t><br/>
<t size='0.90' font='Bitstream' align='left'>In Combat: </t><t size='0.90' font='Bitstream' align='right'>no</t><br/>",
(name player),
(round diag_fps),
(player getVariable['zombieKills', 0]),
(player getVariable['humanKills', 0]),
(player getVariable['banditKills', 0]),
(round r_player_blood),
(player getVariable['humanity', 0])];
};
sleep1;
};
 
unlikely like the usual way ti add in it in player_spawn_2.sqf i can´t see a way to check for

_combattimeout = player getVariable["combattimeout",0]; to display a combattimer
figured it out. Was an error in player_spawn_2.sqf i have edited before-

so the code to display combattime will be:

Code:
while {custom_monitor} do
{
    _combattimeout = player getVariable["combattimeout",0];
if (_combattimeout> 0) then
{
_timeleft= _combattimeout - time;
hintSilent parseText format ["
<t size='0.90' font='Bitstream' color='#FF8000' align='left'>%1</t><t size='0.90' font='Bitstream' align='right' color='#FF8000'>%2 FPS</t><br/><br/>
<t size='0.90' font='Bitstream' align='left'>Zombies: %9 </t><t size='0.90' font='Bitstream' align='right'>%3</t><br/>
<t size='0.90' font='Bitstream' align='left'>Survivors: </t><t size='0.90' font='Bitstream' align='right'>%4</t><br/>
<t size='0.90' font='Bitstream' align='left'>Bandits: </t><t size='0.90' font='Bitstream' align='right'>%5</t><br/>
<t size='0.90' font='Bitstream' align='left'>Blood: </t><t size='0.90' font='Bitstream' align='right'>%6</t><br/>
<t size='0.90' font='Bitstream' align='left'>Humanity: </t><t size='0.90' font='Bitstream' align='right'>%7</t><br/>
<t size='0.90' font='Bitstream' align='left' color='#FF0000'>In Combat: </t><t size='0.90' font='Bitstream' align='right' color='#FF0000'>%8</t><br/>",
(name player),
(round diag_fps),
(player getVariable['zombieKills', 0]),
(player getVariable['humanKills', 0]),
(player getVariable['banditKills', 0]),
(round r_player_blood),
(player getVariable['humanity', 0]),
round(_timeleft)];
} else
{
  hintSilent parseText format ["
<t size='0.90' font='Bitstream' color='#FF8000' align='left'>%1</t><t size='0.90' font='Bitstream' align='right' color='#FF8000'>%2 FPS</t><br/><br/>
<t size='0.90' font='Bitstream' align='left'>Zombies: %9 </t><t size='0.90' font='Bitstream' align='right'>%3</t><br/>
<t size='0.90' font='Bitstream' align='left'>Survivors: </t><t size='0.90' font='Bitstream' align='right'>%4</t><br/>
<t size='0.90' font='Bitstream' align='left'>Bandits: </t><t size='0.90' font='Bitstream' align='right'>%5</t><br/>
<t size='0.90' font='Bitstream' align='left'>Blood: </t><t size='0.90' font='Bitstream' align='right'>%6</t><br/>
<t size='0.90' font='Bitstream' align='left'>Humanity: </t><t size='0.90' font='Bitstream' align='right'>%7</t><br/>
<t size='0.90' font='Bitstream' align='left'>In Combat: </t><t size='0.90' font='Bitstream' align='right'>no</t><br/>",
(name player),
(round diag_fps),
(player getVariable['zombieKills', 0]),
(player getVariable['humanKills', 0]),
(player getVariable['banditKills', 0]),
(round r_player_blood),
(player getVariable['humanity', 0])];
};
sleep1;
};


sometimes the combattimer goes to -1 because auf the sleep1; maybe worth a try to set sleep0.2; to be more accurate
 
So I got this working, and with no conflict with the Journal, and no RPT errors.

First create the custom_monitor.sqf in a 'fixes' folder in your mission.pbo

Insert this code:

Code:
    [player,4,true,(getPosATL player)] spawn player_alertZombies;
 
    _kills =        player getVariable['zombieKills',0];
    _killsH =        player getVariable['humanKills',0];
    _killsB =        player getVariable['banditKills',0];
    _humanity =        player getVariable['humanity',0];
    _headShots =    player getVariable['headShots',0];
    hintSilent parseText format ["
    <t size='2'font='Bitstream'align='center'color='#DDDDDD'>MYSERVERNAME</t><br/>
    <t size='1.5'font='Bitstream'align='center'color='#DDDDDD'>----------------------</t><br/> 
    <t size='1'font='Bitstream'align='left' color='#FF0000'>Blood</t><t size='1' font='Bitstream'align='right'>%1</t><br/>
    <t size='1'font='Bitstream'align='left' color='#16DB57'>Humanity</t><t size='1'font='Bitstream'align='right'>%2</t><br/>
    <t size='1.5' font='Bitstream'align='center'color='#DDDDDD'>----------------------</t><br/>
    <t size='1'font='Bitstream'align='center' color='#16DB57'>Survived %8 dayz!</t><br/>
    <t size='1.5' font='Bitstream'align='center' color='#DDDDDD'>----------------------</t><br/>
    <t size='1'font='Bitstream'align='left'color='#DDDDDD'>Murders</t><t size='1'font='Bitstream'align='right'>%3</t><br/>
    <t size='1'font='Bitstream'align='left'color='#DDDDDD'>Bandits Killed</t><t size='1'font='Bitstream'align='right'>%4</t><br/>
    <t size='1'font='Bitstream'align='left'color='#DDDDDD'>Zombies Killed</t><t size='1'font='Bitstream'align='right'>%5</t><br/>
    <t size='1'font='Bitstream'align='left'color='#DDDDDD'>Headshots</t><t size='1'font='Bitstream'align='right'>%6</t><br/>
    <t size='1.5'font='Bitstream'align='center'color='#DDDDDD'>----------------------</t><br/> 
    <t size='1'font='Bitstream'align='center'color='#16DB57'>Restart in %7 minutes!</t><br/>
    <t size='1.5'font='Bitstream'align='center'color='#DDDDDD'>----------------------</t><br/>
    <t size='1'font='Bitstream'align='center'color='#DDDDDD'>MYSERVERWEBSITE</t><br/>
    <t size='1'font='Bitstream'align='center'color='#DDDDDD'>MYSERVERTEAMSPEAK</t><br/>",
    r_player_blood,round _humanity,_killsH,_killsB,_kills,_headShots,(180-(round(serverTime/60))),(dayz_Survived)
    ];


You will need to change the above code to suit your server, especially this: (180-(round(serverTime/60))) where 180 is the length of time between restarts, in minutes.

In your custom compiles.sqf , find:

Code:
if (_dikCode in actionKeys "User20" and (time - dayz_lastCheckBit > 5)) then {
            dayz_lastCheckBit = time;
            _nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
};

Directly after, paste:

Code:
if (_dikCode in actionKeys "User19" and (time - dayz_lastCheckBit > 5)) then {
            dayz_lastCheckBit = time;
            _nill = execvm "fixes\custom_monitor.sqf";
};

Then just remap Custom Action 19 to the key you wish, and bam! Custom Debug that fades out.
 
Possible to get a toggle function to open debug monitor from the mousewheel?

I would like the debug monitor OFF when someone logs in and use the mousewheel to open it.
 
Back
Top