Jump to content

Custom debug monitor


Kisha

Recommended Posts

<t color='#707D8D' size='1' font='Bitstream'align='left'>Игроков Убито:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%3</t><br/>
				<t color='#707D8D' size='1'	font='Bitstream'align='left'>Бандитов убито:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%4</t><br/>
				<t color='#707D8D' size='1'	font='Bitstream'align='left'>Зомби убито:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%5</t><br/>
				<t color='#707D8D' size='1' font='Bitstream'align='left'>Транспорт:</t><t size='0.95' font='Bitstream'align='right'color='#707D8D'>%16</t><br/>
				<t color='#72708D' size='1' font='Bitstream'align='left'>fps: </t><t size='1' font='Bitstream'align='right'color='#72708D'>%14</t><br/>
				<t color='#80708D' size='1' font='Bitstream'align='left'>Игроки онлайн: </t><t size='1' font='Bitstream'align='right'color='#80708D'>%15</t><br/> 
				<t size='1'	font='Bitstream'align='center'color='#8D708B'>Сервер Работает %18ч %8м</t><br/>	
				<img size='6' image='%9'/>
				"
			};
			case 1:{
				"
				<t color='#708D72' size='1' font='Bitstream'align='left'>Кровь:</t><t size='1' font='Bitstream'align='right'color='#708D72'>%1</t><br/>
				<t color='#707D8D' size='1'	font='Bitstream'align='left'>Бандитов убито:</t><t size='1' font='Bitstream'align='right'color='#707D8D'>%4</t><br/>
				<t color='#72708D' size='1' font='Bitstream'align='left'>fps: </t><t size='1' font='Bitstream'align='right'color='#72708D'>%14</t><br/>
				<t color='#80708D' size='1' font='Bitstream'align='left'>Игроки онлайн: </t><t size='1' font='Bitstream'align='right'color='#80708D'>%15</t><br/> 
				<t size='1'	font='Bitstream'align='center'color='#8D708B'>Сервер Работает %18ч %8м</t><br/>	
				"
			};
			case 2:{
				""
			};
		};
		
		if(((getPlayerUID player) in ["198262150","12614854"]) and custom_monitor_state == 1 ) then {
			_position = getPos player;//Позиция игрока
			_px = _position select 0;//X
			_py = _position select 1;//Y
			_text = _text + format ["<t color='#00bcbc' size='0.8'font='Bitstream'align='left'>x:%1 y:%2</t><br/>",_px,_py];
		};
		
		hintSilent parseText format 
			[
				_text,
				r_player_blood,												//1
				round _humanity,											//2
				_killsH,													//3
				_killsB,													//4
				_kills,														//5
				_headShots,													//6
				(dayz_Survived),											//7
				((floor(serverTime/60)) mod 60), 							//8
				_pic,														//9
				_logo,														//10
				_textCity,													//11
				0,															//12
				0,															//13
				round diag_fps,												//14
                {side _x == west} count allUnits,                           //15
	            (count([6800, 9200, 0] nearEntities [["StaticWeapon","Car","Motorcycle","Tank","Air","Ship"],25000])),//16
	            count vehicles,												//17
				(floor(serverTime/3600)),											//18
				dayz_Survived                                                      //19

Code is on line 8  and 43

Link to comment
Share on other sites

  • 2 weeks later...

Well that's simple, everything you change in dayz_code.pbo or whatever has to be put in your DayZ_Epoch_11.Chernarus.pbo (or whatever it is called).

That is the only way all players receive the changes you have made. The only exception is the dayz_server.pbo of course because that will only run on the server.

So it will do nothing if you change the compiles.sqf or any other file in the dayz_code.pbo, you have to change the copy in your mission.pbo! :)

 

That said you need to change the following to costomize the debug monitor:

1. copy the file "@DayZ_Epoch\addons\dayz_code\actions\playerstats.sqf" to your mission folder (I put it in the custom folder for this example)

2. in compiles.sqf change "\z\addons\dayz_code\actions\playerstats.sqf" to "custom\playerstats.sqf", there are 2 places where you have to to that, you use replace or find it with your editor

3. change the "custom\playerstats.sqf" file to your liking

That's it, repack your mission.pbo if you want. :)

 

Just as a reference what you could change I'll post my changed playerstats.sqf here:

//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'>BRS 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'>brsquad.enjin.com</t><br/>
	<t size='1' font='Bitstream' align='center' color='#DDDDDD'>TS 46.20.46.243:14713</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),
	(120-(round(serverTime/60)))
];

It will look like this:

 dayz_monitor.png

I'm trying to recreate this but unfortunately I don't have a compile.sqf anywhere that contains anything that references playerstats.sqf, any tips?

Link to comment
Share on other sites

I'm trying to recreate this but unfortunately I don't have a compile.sqf anywhere that contains anything that references playerstats.sqf, any tips?

The link to playerstats.sqf is actually located in the dayz_spaceInterrupt.sqf. Which you will need to grab from your Epoch files and move into your custom folder and also update your compiles.sqf to reflect the new dayz_spaceInterrupt.sqf path. Then update that file to where your custom playerstats.sqf is.

Link to comment
Share on other sites

  • 3 weeks later...

I have a custom debug monitor that works in game but for some reason the old one keeps appearing every second causing the two of them to constantly switch, how can I fix this?

yeah me to Link can anyone add to this plz?

No one is gonna be able to help you if you dont explain more. You need to tell us how you went about adding your debug monitor first.

Link to comment
Share on other sites

having an issue with my debug monitor since updating to 1.0.5, headshots register for every kill instead of just the headshots. the following is the code i'm using.

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

while {custom_monitor} do 
	{
		_nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750];
		_textCity = "Wilderness";
		if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)};
		
		_timeleft = _combattimeout-time;
		_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];
		_zombies =              count entities "zZombie_Base";
		_zombiesA =     		{alive _x} count entities "zZombie_Base";
    
	hintSilent parseText format ["
	<t size='1.15' font='Bitstream' align='center' color='#DDDDDD'>%17 Players online</t><br/>
	<t size='1' font='Bitstream' align='left' color='#EEC900'>Location:</t><t size='1' font='Bitstream' align='right' color='#FFFAF0'>%11</t><br/>
	<t size='1' font='Bitstream' align='left' color='#EEC900'>Blood:</t><t size='1' font='Bitstream' align='right' color='#FFFAF0'>%1</t><br/>
	<t size='1' font='Bitstream' align='left' color='#EEC900'>Humanity:</t><t size='1' font='Bitstream' align='right' color='#FFFAF0'>%2</t><br/>
	<t size='1' font='Bitstream' align='left' color='#EEC900'>Hero Kills:</t><t size='1' font='Bitstream' align='right' color='#FFFAF0'>%3</t><br/>
	<t size='1' font='Bitstream' align='left' color='#EEC900'>Bandit Kills:</t><t size='1' font='Bitstream' align='right' color='#FFFAF0'>%4</t><br/>
	<t size='1' font='Bitstream' align='left' color='#EEC900'> Zed Kills:</t><t size='1' font='Bitstream' align='right' color='#FFFAF0'>%5</t><br/>
	<t size='1' font='Bitstream' align='left' color='#EEC900'>Headshots:</t><t size='1' font='Bitstream' align='right' color='#FFFAF0'>%6</t><br/>
	<t size='1' font='Bitstream' align='left' color='#EEC900'>Zombies (alive/total):</t><t size='1' font='Bitstream' align='right' color='#FFFAF0'>%13/%12</t><br/>
	<t size='1' font='Bitstream' align='left' color='#EEC900'>FPS:</t><t size='1' font='Bitstream' align='right' color='#FFFAF0'>%14</t><br/>
	<t size='1' font='Bitstream' align='center' color='#DDDDDD'>Fucked in the Mind</t><br/>
	<t size='1' font='Bitstream' align='center' color='#DDDDDD'>facebook.com/groups/derpfitm</t><br/>",

      	r_player_blood,												//1
				round _humanity,											//2
				_killsH,													//3
				_killsB,													//4
				_kills,														//5
				_headShots,													//6
				(dayz_Survived),											//7
				(360-(round(serverTime/60))),								//8 change the 180 to suit your server mins for restarts
				_pic,														//9
				_logo,														//10
				_textCity,													//11
				count entities "zZombie_Base",								//12
				{alive _x} count entities "zZombie_Base",					//13
				(round diag_FPS),													//14
        dayz_playerName, //15
        round(dayz_temperatur), //16
        (count playableUnits)  //17
			]; 
sleep 2;
};


If anyone would be willing to look it over and see if something is incompatible with the latest update i'd greatly appreciate it.

Link to comment
Share on other sites

No one is gonna be able to help you if you dont explain more. You need to tell us how you went about adding your debug monitor first.

Sorry DangerRuss I used the steps on page 5

 

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 !isDedicated block in your init.sqf in MPMissions:

if (isNil 'debugMonitor') then

{

    debugMonitor = true;

    _nill = execvm "custom\debug.sqf";

};

Enjoy :)

Link to comment
Share on other sites

  • 3 weeks later...

Hey guys I use the infiSTAR's Antihack's debug monitor and i tried editing and it did not work

.I was trying to get it to look like this but actually work 

20v1d1f.jpg

Heres what it looks like in my AH, the headshots and survived dayz does not work properly, any help is appreciated. 

25i6xj6.jpg

Link to comment
Share on other sites

Hey guys I use the infiSTAR's Antihack's debug monitor and i tried editing and it did not work

.I was trying to get it to look like this but actually work 

20v1d1f.jpg

Heres what it looks like in my AH, the headshots and survived dayz does not work properly, any help is appreciated. 

25i6xj6.jpg

For your "Players Online" line, you're referencing %12, but %12 is headshot count, change it to 13.

For "Survived" you're referencing %1 but that's the _txt line which I believe gets the player name, you don't actually have anything in there to get the days survived that I can see.

 

You only said you wanted it working, but didn't say what was broken so I'm assuming it's those two points since they look wrong haha. 

Link to comment
Share on other sites

  • 2 weeks later...

if you have GPS:https://lh6.googleusercontent.com/8h_Q6DIJh8DSXxz9fhoXWwaUo1jIBnj5l1HkyWR-53QkBnutyLQFmFY929WxnHcGlDzSn8kvi8c=w1886-h833

 

if you don't have:https://lh5.googleusercontent.com/qwbT5sDIu2nWh-zQjkd-dAKDQ53-fXkJQc1g9ZfQyOPGzBFWR4htURN47g7NK0g9jdw4NHGoGCQ=w1886-h833

 

debug_monitor.sqf:

fnc_debug = {
    private ["_kills","_killsH","_killsB","_humanity","_headShots","_vehname","_crew","_crew2","_crew3","_crew4","_crew5","_crew6","_crew7","_crew8","_crew9"];
    debugMonitor = true;
    while {debugMonitor} do
    {
		_mags = [currentWeapon player] + (weapons player) + (magazines player);
		_My_speed = speed (vehicle player);
		_kills = player getVariable["zombieKills",0];
		_killsH = player getVariable["humanKills",0];
		_killsB = player getVariable["banditKills",0];
		_headShots = player getVariable["headShots",0];
		_humanity =	player getVariable["humanity",0];

		_dmweapons = "";
		_dmvehicle = "";
		_dmweaponsname = "";
		_dmvehiclename = "";
		_dmweapons = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
		_dmvehicle = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
		_dmweaponsname = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'displayName'));
		_dmvehiclename = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'displayName'));

		_zPos = getPos player select 2; //Select Z

		if ("ItemGPS" in _mags) then {
			hintSilent parseText format ["
			<t size='1.5'font='Bitstream'align='left'color='#0000FF'>%1</t>							<t size='0.90'font='Bitstream'align='right'color='#FFCC00'>FPS: %11</t><br/>
			<t size='0.95'font='Bitstream'align='left'>Players:%2</t>							<t size='0.95'font='Bitstream'align='right'>500m: %3</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#FF0000'>Blood:</t>						<t size='0.95'font='Bitstream'align='right'color='#FF0000'>%4 (%18)</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#66FFFF'>Humanity:</t>						<t size='0.95'font='Bitstream'align='right'color='#66FFFF'>%5</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#66FF66'>Vehicles:</t>						<t size='0.95' font='Bitstream'align='right'color='#66FF66'>%16 / %17</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#D793D1'>Killed Zombies:</t>					<t size='0.95'font='Bitstream'align='right'color='#D793D1'>%8</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#D793D1'>Killed Bandits:</t>					<t size='0.95'font='Bitstream'align='right'color='#D793D1'>%6</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#D793D1'>Killed Survivors:</t>					<t size='0.95'font='Bitstream'align='right'color='#D793D1'>%7</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#D793D1'>Headshot:</t>						<t size='0.95'font='Bitstream'align='right'color='#D793D1'>%9</t><br/>
			<t size='0.95'font='Bitstream'align='left'>GPS:%10 H:%20 S:%21</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#B4B4B4'>%12</t>						<t size='0.95'font='Bitstream'align='right'color='#B4B4B4'>%13</t><br/>
			<img size='3.5' image='%14' align='left'/>									<img size='3.5' image='%15' align='right'/><br/>
			<t size='0.95'font='Bitstream'align='left'color='#FFFF00'>Server Restart in : %19 m</t>
			",
			dayz_playerName,
			(count playableUnits),
			(({isPlayer _x} count (getPos vehicle player nearEntities [["AllVehicles"], 500]))-1),
			round(r_player_blood),
			round _humanity,
			_killsB,
			_killsH,
			_kills,
			_headShots,
			(mapGridPosition getPos player),
			(round diag_fps),
			_dmweaponsname,
			_dmvehiclename,
			_dmweapons,
			_dmvehicle,
			(count([6800, 9200, 0] nearEntities [["StaticWeapon","Car","Motorcycle","Tank","Air","Ship"],50000])),
			count vehicles,
			(round((r_player_blood/12000)*100)),
			(299-(round(serverTime/60))),
			(round _zPos),
			round(_My_speed)
			];
		} else {
			hintSilent parseText format ["
			<t size='1.5'font='Bitstream'align='left'color='#0000FF'>%1</t>							<t size='0.90'font='Bitstream'align='right'color='#FFCC00'>FPS: %11</t><br/>
			<t size='0.95'font='Bitstream'align='left'>Players:%2</t>							<t size='0.95'font='Bitstream'align='right'>500m: %3</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#FF0000'>Blood:</t>						<t size='0.95'font='Bitstream'align='right'color='#FF0000'>%4 (%18)</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#66FFFF'>Humanity:</t>						<t size='0.95'font='Bitstream'align='right'color='#66FFFF'>%5</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#66FF66'>Vehicles:</t>						<t size='0.95' font='Bitstream'align='right'color='#66FF66'>%16 / %17</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#D793D1'>Killed Zombies:</t>					<t size='0.95'font='Bitstream'align='right'color='#D793D1'>%8</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#D793D1'>Killed Bandits:</t>					<t size='0.95'font='Bitstream'align='right'color='#D793D1'>%6</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#D793D1'>Killed Survivors:</t>					<t size='0.95'font='Bitstream'align='right'color='#D793D1'>%7</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#D793D1'>Headshot:</t>						<t size='0.95'font='Bitstream'align='right'color='#D793D1'>%9</t><br/>
			<t size='0.95'font='Bitstream'align='left'>GPS:xxxxxx H:x S:x</t><br/>
			<t size='0.95'font='Bitstream'align='left'color='#B4B4B4'>%12</t>						<t size='0.95'font='Bitstream'align='right'color='#B4B4B4'>%13</t><br/>
			<img size='3.5' image='%14' align='left'/>									<img size='3.5' image='%15' align='right'/><br/>
			<t size='0.95'font='Bitstream'align='left'color='#FFFF00'>Server Restart in : %19 m</t>
			",
			dayz_playerName,
			(count playableUnits),
			(({isPlayer _x} count (getPos vehicle player nearEntities [["AllVehicles"], 500]))-1),
			round(r_player_blood),
			round _humanity,
			_killsB,
			_killsH,
			_kills,
			_headShots,
			(mapGridPosition getPos player),
			(round diag_fps),
			_dmweaponsname,
			_dmvehiclename,
			_dmweapons,
			_dmvehicle,
			(count([6800, 9200, 0] nearEntities [["StaticWeapon","Car","Motorcycle","Tank","Air","Ship"],50000])),
			count vehicles,
			(round((r_player_blood/12000)*100)),
			(299-(round(serverTime/60))),
			(round _zPos),
			round(_My_speed)
			];
		};
		sleep 0.1;
    };
};

[] spawn fnc_debug;
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...

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...