Jump to content

Custom debug monitor


Kisha

Recommended Posts

Credit goes to BushWookie

 

Copy dayz_spaceInterrupt.sqf from dayz_code.pbo\actions into your custom folder.

 

Change the path of dayz_spaceInterrupt.sqf in your custom compiles to:

dayz_spaceInterrupt 	= compile preprocessFileLineNumbers "custom\dayz_spaceInterrupt.sqf";

Create a new file in your custom folder called debug.sqf

Paste this in it

while {debugMonitor} do
{
 //Modify your debug starting here
	_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'));
        };
hintSilent parseText format ["
	<t size='1' font='Bitstream' align='center' color='#669933'>%1</t><br/>
	<img size='4' image='%9'/><br/>
        <t size='1' font='Bitstream' align='left'>Zombies Killed: </t><t color='#669933' size='1.2' font='Bitstream' align='right'>%2</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Survivors Killed: </t><t color='#669933' size='1' font='Bitstream' align='right'>%4</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Bandits Killed: </t><t color='#669933' size='1' font='Bitstream' align='right'>%5</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>FPS: </t><t color='#669933' size='1' font='Bitstream' align='right'>%8</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Humanity: </t><t color='#5882FA' size='1' font='Bitstream' align='right'>%7</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Blood: </t><t color='#ff5200' size='1' font='Bitstream' align='right'>%6</t><br/>
	<t size='1' font='Bitstream' align='center' color='#669933'>Press INSERT to toggle</t>
	",
        (name player),
        (player getVariable['zombieKills', 0]),
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['USEC_BloodQty', r_player_blood]),
        (player getVariable['humanity', 0]),
        (round diag_fps),
        _pic];
//Don't modify below this line
	sleep 1;
};

Open custom\dayz_spaceInterrupt.sqf

 

Replace this:

if (_dikCode == 210) then {
		_nill = execvm "\z\addons\dayz_code\actions\playerstats.sqf";
};

with this:

if (_dikCode == 210) then {
	if (isNil 'debugMonitor') then 
	{
		debugMonitor = true;
		_nill = execvm "custom\debug.sqf";
	}
	else
	{
		debugMonitor = !debugMonitor;
		hintSilent '';
		_nill = execvm "custom\debug.sqf";
	};
};

Comment out this:

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

like this:

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

If you want the debug monitor to be auto-shown when player connects

add this to the end of your init.sqf in MPMissions:

if (isNil 'debugMonitor') then 
{
	debugMonitor = true;
	_nill = execvm "custom\debug.sqf";
};

Enjoy :)

 the fps counter doesnt work properly and i got the restart timer from the first post but that doesnt work either, it just says server restarts in (blank) minutes.

please help

Link to comment
Share on other sites

Yeah, modify debug.sqf any way you like. There are some server restart timer examples on previous pages.

 

adg i was able to add a restart timer but it has broken the picture for some reason. Whenever someone logs in it says "Picture not found".

 

Could you advise? my debug.sqf is as follows and the picture does not work  with the restart timer addition. It works perfectly without it

while {debugMonitor} do
{
 //Modify your debug starting here
_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'));
        };
hintSilent parseText format ["
<t size='1' font='Bitstream' align='center' color='#D60000'>www.Rising-Dead.enjin.com</t><br/>
<img size='4' image='%9'/><br/>
        <t size='1' font='Bitstream' align='left'>Zombies Killed: </t><t color='#669933' size='1.2' font='Bitstream' align='right'>%2</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Survivors Killed: </t><t color='#669933' size='1' font='Bitstream' align='right'>%4</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Bandits Killed: </t><t color='#669933' size='1' font='Bitstream' align='right'>%5</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>FPS: </t><t color='#669933' size='1' font='Bitstream' align='right'>%8</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Humanity: </t><t color='#5882FA' size='1' font='Bitstream' align='right'>%7</t><br/>
        <t color='#ffffff' size='1' font='Bitstream' align='left'>Blood: </t><t color='#D60000' size='1' font='Bitstream' align='right'>%6</t><br/>
<t size='1.15' font='Bitstream'align='center' color='#5882FA'>Restart in %9 Minutes</t><br/> <----Restart timer addition
<t color='#D60000' size='1' font='Bitstream' align='center'>TS: 85.236.100.125:10037 </t><br/>
<t size='1' font='Bitstream' align='center' color='#669933'>Press INSERT to toggle</t>
",
        (name player),
        (player getVariable['zombieKills', 0]),
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['USEC_BloodQty', r_player_blood]),
        (player getVariable['humanity', 0]),
        (round diag_fps),
(239-(round(serverTime/60))), <----Restart timer addition
        _pic];
//Don't modify below this line
sleep 1;
};

EDIT: I have realised the error, I should have changed <img size='4' image='%9'/><br/> to <img size='4' image='%10'/><br/> after adding a new variable

 

 

Sorry about this

Link to comment
Share on other sites

Yes now my server. Have custom player HUD.  :D

aUxpxYb.jpg

 

 

I ended up finding a server with this HUD and tried adding it to my test server with no luck.

Getting this error: ErrorMessage: File mpmissions\__cur_mp.Chernarus\addons\playerhud\dialog\hud.hpp, line 9: /RscTitles/WPHUD/controlsBackground.WPHUD_Vehicle: Undefined base class 'w_RscText'

Link to comment
Share on other sites

I ended up finding a server with this HUD and tried adding it to my test server with no luck.

Getting this error: ErrorMessage: File mpmissions\__cur_mp.Chernarus\addons\playerhud\dialog\hud.hpp, line 9: /RscTitles/WPHUD/controlsBackground.WPHUD_Vehicle: Undefined base class 'w_RscText'

 

How you get this script.

Link to comment
Share on other sites

I ended up finding a server with this HUD and tried adding it to my test server with no luck.

Getting this error: ErrorMessage: File mpmissions\__cur_mp.Chernarus\addons\playerhud\dialog\hud.hpp, line 9: /RscTitles/WPHUD/controlsBackground.WPHUD_Vehicle: Undefined base class 'w_RscText'

 

Send me the files at

[email protected]

 

I see if i can get it to work

Link to comment
Share on other sites

  • 2 weeks later...

It's always been an irritation to me how the debug menu portrays 'Days Survived' as a stat. A much more interesting fact would be "Hours survived", based on actual ingame time. Does anyknow know if this is even possible? And if so - how?

 

Probably possible, looking at how dayz_Survived is calculated it appears from the number of minutes, I assume, survived.

 

GitHub

 

       "//Work out survival time" \n
       "_totalMins = _survival select 0;" \n
       "_days = floor (_totalMins / 1440);" \n
       "_totalMins = (_totalMins - (_days * 1440));" \n
       "_hours = floor (_totalMins / 60);" \n
       "_mins =  (_totalMins - (_hours * 60));" \n
       "" \n
       "//player variables" \n
       "dayz_characterID =		_charID;" \n
       "dayz_hasFire = 			objNull;		//records players Fireplace object" \n
       "dayz_myCursorTarget = 	objNull;" \n
       "dayz_myPosition = 		getPosATL player;	//Last recorded position" \n
       "dayz_lastMeal =			(_lastAte * 60);" \n
       "dayz_lastDrink =		(_lastDrank * 60);" \n
       "dayz_zombiesLocal = 	0;			//Used to record how many local zombies being tracked" \n
       "dayz_Survived = _days;  //total alive dayz" \n 
Link to comment
Share on other sites

It's always been an irritation to me how the debug menu portrays 'Days Survived' as a stat. A much more interesting fact would be "Hours survived", based on actual ingame time. Does anyknow know if this is even possible? And if so - how?

sure it would be better, but I think that's impossible with the data available in the database.

actually the "minutes" in that script are calculated in the HiveExt.dll from the creation date of the character to the current date,

so you only have access to an absolute date when your character is created and last login date, no real game time or anything sadly.

Link to comment
Share on other sites

  • 2 weeks later...

Yer, I get the rpt spam :(

 

I wish I new what specifically caused this!

 

Regarding the debug monitors that spam the .RPT file:

I found out the problem, when you use the command "parseText format", inside the square brackets [ ... ] is expected a String or array of strings.

 

When you pass variables that are integers or floats (but in Arma Engine only the format Numbers) you get an error because the numbers are not a String therefore they are not text.

Link to comment
Share on other sites

Is there a fix for this ?

 

Regarding the debug monitors that spam the .RPT file:

I found out the problem, when you use the command "parseText format", inside the square brackets [ ... ] is expected a String or array of strings.

 

When you pass variables that are integers or floats (but in Arma Engine only the format Numbers) you get an error because the numbers are not a String therefore they are not text.

 
Link to comment
Share on other sites

Are there any debug monitors available for EPOCH that look similar to Infistars admin version with the weapon / vehicle pic and one that shows player location days survived / location / etc etc

 

I am working on one right now, it will be more like a regular player monitor but will work with epoch and i just fixed the spamming part of the .RPT log file.

I can add all those extra variables like location on world or map direcation of the characer etc, but you need to know that will be longer and will cover the ear and the eye ingame the longer it gets (if that's a problem for you,)

 

what i want for you is to send me a pic of the Inifistar debug mon because I am not familiar with it.

 

I am basically modifying Torndeco debug monitor and I will give him the deserved credits.

Link to comment
Share on other sites

http://pastebin.com/uMQg8qJN

 

If you want, here is my debug with toggle function   "Insert is toggle" 

 

 

You will need to edit the dayz_spaceInterrupt find  

 

"if (_dikCode ==210)" code block

 

and change to 

 

if (_dikCode == 210) then {
_nill = execvm "custom\code\playerstats.sqf";
};
and change the code block of  "if (_dikCode in actionKeys "User20")" 
 
to 
 
if (_dikCode in actionKeys "User20" and (diag_tickTime - dayz_lastCheckBit > 5)) then {
            dayz_lastCheckBit = diag_tickTime;
            _nill = execvm "custom\code\playerstats.sqf";
};

and then add  

playerstats = compile preprocessFileLineNumbers "custom\code\playerstats.sqf";

to your init file, unless someone has mentioned all this already, change the location of your file though :)

 

also remember and remove our PID's from the admin debug section and change with yours 

 

 

the monitor I use is the Dual admin debug made by nomadichayward

Link to comment
Share on other sites

wrong text element "null"

 

i bet that if you look at your debug monitor .SQF you will see some variables that are using player getVariable["humanity",0]; and those need to be transformed into strings before they are referenced to their corresponding tag.

Link to comment
Share on other sites

Would be awesome if I knew how to do that :)

 

"florinel76, on 28 Mar 2014 - 10:41 PM, said:

i bet that if you look at your debug monitor .SQF you will see some variables that are using player getVariable["humanity",0]; and those need to be transformed into strings before they are referenced to their corresponding tag.

 
Link to comment
Share on other sites

  • 2 weeks later...
        <t size='1' font='Bitstream' align='center' color='#31C300'>Restart in %10 minutes</t><br/><br/>
	<t size='1' font='Bitstream' align='center' color='#31C300'>Press INSERT to toggle</t>
	",
        (name player),
        (player getVariable['zombieKills', 0]),
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['USEC_BloodQty', r_player_blood]),
        (player getVariable['humanity', 0]),
        (240-(round(serverTime/60))),
        (round diag_fps),
        _pic];
//Don't modify below this line
	sleep 1;
};

What is that ? See you the error?

 

Edit: Fixed. :)

Link to comment
Share on other sites

could anyone help me get restart time on my admin debug and fps on my players debug ???

 

admin............................

 

if ((getPlayerUID player) in ["12345678","12345678","12345678","12345678","12345678","12345678","12345678","12345678","12345678","12345678","12345678","12345678","12345678"]) then { 
 
 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))
];
 
I tried adding this but I broke it to admin 
 
<t size='1' font='Bitstream' align='center' color='#16DB57'>Restart in %10 minutes</t><br/><br/>
(180-(round(serverTime/60)))
 
player...........................................
 
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'>NO SIDE VOICE</t><br/>
<t size='1' font='Bitstream' align='center' color='#DDDDDD'>TS roguesgallery.teamspeak3.com password 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),
(180-(round(serverTime/60)))
];};
Link to comment
Share on other sites

  • 2 weeks later...

You would make it look something like this:

 

//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'>[iGS1]Epoch EU</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='left' color='#FFBF00'>UPTIME: </t><t size='1' font='Bitstream' align='right'>%11h %12min</t><br/>
<t size='1' font='Bitstream' align='center' color='#FFBF00'>igamingsquad.com</t><br/>
<t size='1' font='Bitstream' align='center' color='#FFBF00'>TS:5.9.226.69:9988</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),
(240-(round(serverTime/60))),
_hours,
_minutes2
];
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...