Custom Debug Monitor

Voltan

New Member
Hi,

I am new to scripting etc and I am using this debug monitor below on my server, and for my admin work I would like to have the worldspace coordinates for scripting work show in the debug, and possibly GPS coords as well? Does anyone know how to easily add this in?

Thanks in advance.

Code:
private ["_humanity", "_pic", "_info_player"];

fnc_debug = {

    while {debugMonitor} do {
       
        _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'));
        };
                   
        _txt = '';
        _txt = (getText (configFile >> 'CfgVehicles' >> (typeOf vehicle player) >> 'displayName'));
        hintSilent parseText format ["
            <t size='1' font='Bitstream' align='center' color='#5882FA'>Survived %11 Days</t><br/>
            <t size='1' font='Bitstream' align='Center' >%1</t><br/>
            <img size='4.75' image='%2'/><br/>
            <t size='1' font='Bitstream' align='left' color='#CC0000'>Blood: </t><t size='1' font='Bitstream' align='right'>%10</t><br/>
            <t size='1' font='Bitstream' align='left' color='#0066CC'>Altitude: </t><t size='1' font='Bitstream' align='right'>%13</t><br/>
            <t size='1' font='Bitstream' align='left' color='#0066CC'>Speed: </t><t size='1' font='Bitstream' align='right'>%12KPH</t><br/>
            <t size='1' font='Bitstream' align='left' color='#0066CC'>Humanity: </t><t size='1' font='Bitstream' align='right'>%6</t><br/>
            <br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>Players Online: </t><t size='1 'font='Bitstream' align='right'>%3</t><br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>Murders: </t><t size='1' font='Bitstream' align='right'>%8</t><br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>Bandits Killed: </t><t size='1' font='Bitstream' align='right'>%9</t><br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>Zombies Killed: </t><t size='1' font='Bitstream' align='right'>%7</t><br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>FPS: </t><t size='1' font='Bitstream' align='right'>%4</t><br/>
            <br/>
            <t size='1' font='Bitstream' align='center' color='#FFBF00'>Server Restart: </t><t size='1' font='Bitstream' align='right'>%5min</t><br/>
            <t size='1'font='Bitstream'align='center' color='#104E8B' >Press F10 to Toggle Debug</t><br/>
            ",
            _txt,// %1 Vehicle/weapon name
            _pic, // %2 vehicle/weapon pic
            (count playableUnits), // %3Players Online
            round(diag_fps), // %4 FPS
            (round(480-(serverTime)/60)), // %5 restart time
            (player getVariable["humanity",0]), // %6 Humanity
            (player getVariable["zombieKills",0]), //  %7 Zombie Kills
            (player getVariable["humanKills",0]), // %8 Murders
            (player getVariable["banditKills",0]), // %9 Bandit kills
            round (r_player_blood), // %10 blood
            (dayz_Survived), // %11 days survived
            round(speed (vehicle player)),// %12 player speed
            round(getPos player select 2)//Altitude
        ];
        sleep 1;   
    };
};
[] spawn fnc_debug;
 
put this at the top of the file rigfht below while {debugMonitor} do {

_myPos = getPos player;
_textPos = format ["%1", _myPos];
copyToClipboard _textPos;


<t size='1' font='Bitstream' align='center' color='#FFBF00'>Worldspace </t><t size='1' font='Bitstream' align='right'>14</t><br/>

and at the end of your variable list
_textPos



The code at the top will output the location AND copy it to the clipboard so all you have to do is CTRL V to paste it into your scripts.

and dont forget to add a comma to the previously last variable.

for GPS coordinates, take _mypos select 1 and subtract it from 15000 then you can use
format to put the 2 coords into a gps display
_gpscoord = format ["%1 - %2",_mypos select 0, 15000 - (_mypos select 1)];

and then add a line for GPS referring to %15 , add _gpscoord at the bottom of your variables list.
 
Last edited:
Does there need to be a percentage symbol before the 14 in this line?

<t size='1' font='Bitstream' align='center' color='#FFBF00'>Worldspace </t><t size='1' font='Bitstream' align='right'>14</t><br/>
 
Cool! Thanks for your help! The debug code looks like this now.

Code:
private ["_humanity", "_pic", "_info_player"];

fnc_debug = {

    while {debugMonitor} do {
    _myPos = getPos player;
    _textPos = format ["%1", _myPos];
    copyToClipboard _textPos;
    _gpscoord = format ["%1 - %2",_mypos select 0, 15000 - (_mypos select 1)];
       
        _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'));
        };
                   
        _txt = '';
        _txt = (getText (configFile >> 'CfgVehicles' >> (typeOf vehicle player) >> 'displayName'));
        hintSilent parseText format ["
            <t size='1' font='Bitstream' align='center' color='#5882FA'>Survived %11 Days</t><br/>
            <t size='1' font='Bitstream' align='Center' >%1</t><br/>
            <img size='4.75' image='%2'/><br/>
            <t size='1' font='Bitstream' align='left' color='#CC0000'>Blood: </t><t size='1' font='Bitstream' align='right'>%10</t><br/>
            <t size='1' font='Bitstream' align='left' color='#0066CC'>Altitude: </t><t size='1' font='Bitstream' align='right'>%13</t><br/>
            <t size='1' font='Bitstream' align='left' color='#0066CC'>Speed: </t><t size='1' font='Bitstream' align='right'>%12KPH</t><br/>
            <t size='1' font='Bitstream' align='left' color='#0066CC'>Humanity: </t><t size='1' font='Bitstream' align='right'>%6</t><br/>
            <br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>Players Online: </t><t size='1 'font='Bitstream' align='right'>%3</t><br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>Murders: </t><t size='1' font='Bitstream' align='right'>%8</t><br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>Bandits Killed: </t><t size='1' font='Bitstream' align='right'>%9</t><br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>Zombies Killed: </t><t size='1' font='Bitstream' align='right'>%7</t><br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>FPS: </t><t size='1' font='Bitstream' align='right'>%4</t><br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>GPS: </t><t size='1' font='Bitstream' align='right'>%15</t><br/>
            <t size='1' font='Bitstream' align='left' color='#FFBF00'>Worldspace </t><t size='1' font='Bitstream' align='right'>%14</t><br/>
            <br/>
            <t size='1' font='Bitstream' align='center' color='#FFBF00'>Server Restart: </t><t size='1' font='Bitstream' align='right'>%5min</t><br/>
            <t size='1'font='Bitstream'align='center' color='#104E8B' >Press F10 to Toggle Debug</t><br/>
            ",
            _txt,// %1 Vehicle/weapon name
            _pic, // %2 vehicle/weapon pic
            (count playableUnits), // %3Players Online
            round(diag_fps), // %4 FPS
            (round(480-(serverTime)/60)), // %5 restart time
            (player getVariable["humanity",0]), // %6 Humanity
            (player getVariable["zombieKills",0]), //  %7 Zombie Kills
            (player getVariable["humanKills",0]), // %8 Murders
            (player getVariable["banditKills",0]), // %9 Bandit kills
            round (r_player_blood), // %10 blood
            (dayz_Survived), // %11 days survived
            round(speed (vehicle player)),// %12 player speed
            round(getPos player select 2),//Altitude
            _textPos, // %14 Worldspace location
            _gpscoord // %15 GPS Location
        ];
        sleep 1;   
    };
};
[] spawn fnc_debug;
 
probably should have done some type of math to reduce the worldspace into normal gps coordinates. they are going to be the large numbers, so you will also have to remove the decimal places then divide by 100 .. I think.

but see that it works before you get too much involved , then we can edit the formatting
 
I want them to be the large numbers though, for scripting, alot of things have wanted those worldspace locations and this will make it so much easier :p
 
_gpscoord = format ["%1 - %2",(round(_mypos select 0))/100,(round( 15000 - (_mypos select 1)))/100];
this MIGHT be the correct formatting .. just off the top of my head here.

that is for the GPS coords that players see in the game. the worldspace will be normal formatted worldspace and copied to your clipboard so you can just paste them into your script.
 
Back
Top