DayZ 1.8.0.3. Toggle on Debug causing in game issues. In Search of new way to toggle!

DangerRuss

OpenDayZ Rockstar!
So I have for ages been experiencing some issues on my dayz server that I could never figure out the cause of. Players were unable to access their crafting menu or journals, they were unable to rotate deployables, or check the gear from inside a vehicle (and perhaps other issues as well). I found out that all of this was caused by the toggle option I had on my debug monitor. I believe this is the toggle here

Code:
dayz_spaceInterrupt = {
    private ["_dikCode", "_handled"];
    _dikCode = _this select 1;
    _handled = false;
    if (_dikCode == 0x44) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
    };
    _handled
};

Now I have read in J0k3r5 Stats Panel - Gear menu problem that on epoch there is a file called dayz_spaceInterrupt.sqf and you can edit that as explained in the linked post to replace the built in debug monitor with your debug monitor. However, I can't seem to find this file for regular dayz. Does it exist? If not, is there another way to go about adding a toggle to the debug monitor that wont interfere with other "toggles?"
 
So, find the code bit and add my debug minus the toggle bit?
Should be obvious once you locate it in compiles.sqf pretty sure you'll just need this block in with the rest

Code:
if (_dikCode == 0x44) then {
if (debugMonitor) then {
debugMonitor = false;
hintSilent "";
} else {[] spawn fnc_debug;};
};

copy paste the existing spaceInterupt and add that bit to that wherever you are defining it now if you don't want to have the whole compiles.sqf in your mission pbo.
 
Should be obvious once you locate it in compiles.sqf pretty sure you'll just need this block in with the rest

Code:
if (_dikCode == 0x44) then {
if (debugMonitor) then {
debugMonitor = false;
hintSilent "";
} else {[] spawn fnc_debug;};
};

copy paste the existing spaceInterupt and add that bit to that wherever you are defining it now if you don't want to have the whole compiles.sqf in your mission pbo.
A bit over my head, still trying to learn this stuff! I'll have a look and see what I can accomplish. The answer is here I just have to figure it out! Thanks again man.

Btw a bit off topic but Im fairly certain the issue I was having with gut human hurting the gutter 100% of the time was caused by this toggle in the debug I was using.
 
Open up for compiles.sqf

Find
Code:
dayz_spaceInterrupt = {

Somewhere under that place

Code:
        if (_dikCode == 0x57) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
        };

Around lines 610, you should see

Code:
dayz_originalPlayer =        player;

Under that place ( end of "if (!isDedicated) then {" )
Code:
    fnc_debug = {
        debugMonitor = true;
        while {debugMonitor} do
        {
         *code goes here*
        };
    };
    [] spawn fnc_debug;

f11 to toggle the menu(change the dikcode if you want to change it)
by placing the code under "if (!isDedicated) then {" you shouldn't get any text element spam in your RPT.

Hope this is useful for anyone, enjoy.
 
Last edited:
Open up for compiles.sqf

Find
Code:
dayz_spaceInterrupt = {

Somewhere under that place

Code:
        if (_dikCode == 0x57) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};

Around lines 610, you should see

Code:
dayz_originalPlayer =        player;

Under that place ( end of "if (!isDedicated) then {" )
Code:
    fnc_debug = {
        debugMonitor = true;
        while {debugMonitor} do
        {
         *code goes here*
        };
    };
    [] spawn fnc_debug;

f11 to toggle the menu(change the dikcode if you want to change it)
by placing the code under "if (!isDedicated) then {" you shouldn't get any text element spam in your RPT.

Hope this is useful for anyone, enjoy.
Thank you for taking the time to explain that to me my friend.
 
not sure where Im going wrong, although I suspect its
Code:
if (_dikCode == 0x57) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
this part.
Server is just perma stuck at loading. Heres my section.
Code:
dayz_spaceInterrupt = {
        private "_handled";
        _dikCode = _this select 1;
        _shiftState = _this select 2;
        _ctrlState = _this select 3;
        _altState = _this select 4;
        _handled = false;
       
        // Disable ESC after death (not sure if needed but it's here to make sure)
        if (_dikCode == 0x01 && r_player_dead) then {
            _handled = true;
        };
 
        if (_dikCode == 0x57) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
       
        switch (_dikCode) do {
            case 0x02: {
                ["rifle"] spawn player_switchWeapon;
                _handled = true;
Is this incorrect?​
 
I'm sorry, I made a typo.

it should look like

Code:
        if (_dikCode == 0x57) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
        };

Sorry! but that will work for sure.
 
I'm sorry, I made a typo.

it should look like

Code:
        if (_dikCode == 0x57) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
        };

Sorry! but that will work for sure.
Oh I see it was missing a closing bracket or whatever its called. I'll give it a go thanks again
 
Oh I see it was missing a closing bracket or whatever its called. I'll give it a go thanks again

If you use SQF highlighting for notepad plus, clicking on any opening brace will highlight the closing one in red. Can be really useful for catching mistakes like these :)
 
If you use SQF highlighting for notepad plus, clicking on any opening brace will highlight the closing one in red. Can be really useful for catching mistakes like these :)
and get in the habit of adding the closing brace right when you type the opening one.
 
yea I use that plugin but because I don't quite understand the code, the "color coding" doesn't mean much to me. To be honest I thought
Code:
} else {[] spawn fnc_debug;};
was a closing bracket just on the same line, and because of that perhaps it didn't need one below it. Im a newb
 
Did you get it to work? Toggleable?
Trying the same but the monitor does not appear.

Where in compiles.sqf did you paste ur code?
And what did it look like?

This is mine:
Code:
dayz_spaceInterrupt = {
        private "_handled";
        _dikCode = _this select 1;
        _shiftState = _this select 2;
        _ctrlState = _this select 3;
        _altState = _this select 4;
        _handled = false;

        // Disable ESC after death (not sure if needed but it's here to make sure)
        if (_dikCode == 0x01 && r_player_dead) then {
            _handled = true;
        };
        if (_dikCode == 210) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
        };

and further down, right after dayz_originalPlayer = player;

Code:
dayz_originalPlayer = player;
};
        fnc_debug = {
        debugMonitor = true;
        while {debugMonitor} do
    {
    _kills = player getVariable["zombieKills",0];
    _headShots = player getVariable["headShots",0];
    _humanity =  player getVariable["humanity",0];
    hintSilent parseText format ["
    <t size='1.5'font='Bitstream'align='center'>%1</t><br/>
    <t size='1'font='Bitstream'align='left'>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'>Zombies Killed:</t><t size='1'font='Bitstream'align='right'>%4</t><br/>
    <t size='1'font='Bitstream'align='left'>Headshots:</t><t size='1'font='Bitstream'align='right'>%5</t><br/>
    <t size='1'font='Bitstream'align='left'>Survived:</t><t size='1'font='Bitstream'align='right'>%6 Days</t><br/>
    <br/>
    <t size='1'font='Bitstream'align='left'>FPS:</t><t size='1'font='Bitstream'align='right'>%7</t><br/>
    <br/>
    <t size='1'font='Bitstream'align='center'>Press Insert to toggle Debug Monitor</t><br/>
    ",dayz_playerName,r_player_blood,round _humanity,_kills,_headShots,(dayz_Survived),round diag_fps];
    sleep 1;
    };
};

[] spawn fnc_debug;
    progressLoadingScreen 0.8;

Can't get the darn monitor to appear. Had it working but with the same issues in-game as you had.

Please help.

Thanks
 
Last edited:
No matter what I try I can't get the Debug Monitor to show in-game. Don't know what I am doing wrong.
I even copied ur code Russ but without success. I am missing something obvious perhaps?
Do i need to add code somewhere else aswell to "initialize" the debug?

No errors in RPT and server starts up just fine.
I have animated helicrashes, street lights and watermark logo added.

Thanks both of you for the help so far.
 
Last edited:
Back
Top