Jump to content

[RELEASE] Custom Debug Monitor


Chino

Recommended Posts

THANK YOU FOR READING.

This debug is very similar to one offered by a service. After so long, I armed my own Latin American server. I had everything in place as wanted, but something was missing .. I was missing the debug.

I've been looking for various topics, several forums, or maybe if there was someone who could share it with the community, and I have not succeeded. So why (besides being a beginner) I read about how.

I will come to share that secure more than one (like me) you are looking for.

 

THESE ARE THE STEPS.

Step 1) Go to your "MPMissions" folder, then "DayZ_Epoch_11.Chernarus" (or as your folder is called). If you have a folder named "Custom" in there create a folder called "Debug" and create a file with the following custom_monitor.sqf in and keep within it.

 

Spoiler

 if (isNil "debugMonitor") then { debugMonitor = false; };
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {
    debugMonitor = true;
private["_time","_hours","_minutes","_restartTime"];

/************************* CONFIG *************************/
    _restartTime = 180; //total time before server restart (3hrs = 180 minutes)    
/************************* CONFIG *************************/

while {debugMonitor} do {

_time = (round(_restartTime-(serverTime)/60));     //Want it to count up instead of down? use _time = (round serverTime)/60;
    _hours = (floor(_time/60));
    _minutes = (_time - (_hours * 60));
    
    switch(_minutes) do
    {
        case 9: {_minutes = "09"};
        case 8: {_minutes = "08"};
        case 7: {_minutes = "07"};
        case 6: {_minutes = "06"};
        case 5: {_minutes = "05"};
        case 4: {_minutes = "04"};
        case 3: {_minutes = "03"};
        case 2: {_minutes = "02"};
        case 1: {_minutes = "01"};
        case 0: {_minutes = "00"};
    };


//Define imagen
_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));

if (player == vehicle player) then

{

_pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));

}

else

{

_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));

};
//Fin imagen

hintSilent parseText format ["

    <t size='1.2' font='Bitstream' align='center' color='#ffffff'>%1</t><br/>
    
<t color='#ff0000' size='1' font='Bitstream' align='left'>Players Online: </t><t color='#ffffff' size='1' font='Bitstream' align='right'>%2</t><br/>
    
<t color='#ff0000' size='1' font='Bitstream' align='left'>FPS: </t><t color='#ffffff' size='1' font='Bitstream' align='right'>%3</t><br/>

<t color='#ff0000' size='1' font='Bitstream' align='left'>Blood: </t><t color='#ffffff' size='1' font='Bitstream' align='right'>%4</t><br/>

<t color='#ff0000' size='1' font='Bitstream' align='left'>Humanity: </t><t color='#ffffff' size='1' font='Bitstream' align='right'>%5</t><br/>

<br/>

<t color='#ff0000' size='1' font='Bitstream' align='left'>Murders: </t><t color='#ffffff' size='1' font='Bitstream' align='right'>%6</t><br/>

<t color='#ff0000' size='1' font='Bitstream' align='left'>Bandit Kills:  </t><t color='#ffffff' size='1' font='Bitstream' align='right'>%7</t><br/>

<t color='#ff0000' size='1' font='Bitstream' align='left'>Zombie Kills: </t><t color='#ffffff' size='1' font='Bitstream' align='right'>%8</t><br/>

<t color='#ff0000' size='1' font='Bitstream' align='left'>Restart In: </t><t color='#ffffff' size='1' font='Bitstream' align='right'>%9Hr(s) %10Min(s)</t><br/>

    <img size='5' image='%11'/><br/>
    
    <t size='1' font='Bitstream' align='center' color='#ffffff'>Hide debug with Scroll Mouse</t>
    ",

(name player),//1

(count playableUnits),//2

(round diag_fps),//3

(player getVariable['USEC_BloodQty', r_player_blood]),//4

(player getVariable['humanity', 0]),//5

(player getVariable['humanKills', 0]),//6

(player getVariable['banditKills', 0]),//7

(player getVariable['zombieKills', 0]),//8

_hours, // Used on line 52 to display hours //9
_minutes, // Used on line 52 to display minutes //10


_pic//11
];

sleep 2;
};
};

// Debug Monitor similar al que ofrece Infistar. Edicion Chino //
// Gracias JuanDayZ por la ayuda //
// Debug Monitor Infistar similar to that offer. Edicion Chino //
// Thanks JuanDayZ for help //

Step 2) Within the "Debug" folder create another debug_init.sqf file with the following.

 

Spoiler

if (isnil "debuginit") then {debuginit = true;};

    if (debuginit) then
    {
        []spawn
        {
            private["_veh", "_idb", "_idb2"];
            _idb = -1;
            while {alive player} do
            {
                if (_idb == -1) then
                {
                    _idb = (vehicle player) addaction [("<t color=""#ff0000"">" + ("Toggle debug") +"</t>"),"custom\debug\custom_monitor.sqf","",0,false,true,"",""];
                    _veh = vehicle player;
                };
                if (_veh != vehicle player) then
                {
                    _veh removeAction _idb;
                    _idb = -1;      
                };
                Sleep 2;
            };
        };
        debuginit = false;
    };
    waituntil {!alive player ; sleep 2;};
    debuginit = true;

IMPORTANT: This debug is hidden by mouse wheel. Since doing so by a key is broken.

Step 3) Go to your "init.sqf" and go to the bottom of everything and paste the following.

Spoiler

// Debug Monitor
[] execVM "custom\debug\debug_init.sqf";
[] execVM "custom\debug\custom_monitor.sqf";

If all goes well, when you open the server will see the debug so. View image. :)

Well, I hope you like it. It's my first "edition" you could say, so try to do it the best way. I hope to move forward and continue sharing.
Many thanks to user "Juandayz" for all the support he gave me.
See you soon!

 

debug.jpg

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Sorry but this debug monitor is VERY similar to the one by noxicarius on his Github. Have you adapted parts of his code and not given credit where credit is DUE?

Check the similarities between this guys "custom_monitor.sqf" and noxicarius'debug_monitor.sqf" file on his Github

https://github.com/noxsicarius/Custom-Debug-Monitor/blob/master/custom/debug_monitor/debug_monitor.sqf

I really do think you need to come clean and at least give the guy some credit for using part of their code. Im sure its part of the forum rules that if any part of someone elses code is used, credit MUST be given where it is due.

Link to comment
Share on other sites

@leegreaves all debugs are similars, then i think when you make a debug you need get credits to all peoples who make one of this in the past :D

for example in this case, Chino needs to get credits to noxicarius, bigg egg, thejoker,, and 3 or more guys :) .. cuz this debug had a lot of pieces of anothers debugs

Link to comment
Share on other sites

  • 7 months later...
  • 3 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...