Jump to content
Cherdenko

Release: Another Generic Debug Monitor| or is it? 1.0.6+

Recommended Posts

Edit: Should be also working for 1062, as ive seen some servers running this

Hello guys i've decided to release my "Debug Monitor". It's not much like a monitor but its looking quiet nice.

This was originally for my Napf and Chernarus server and i thought why not share it, since the players seemed to like it.

So how does it look like? 45Cwdaz.png

Download Link:

how to initialize?
simply put an
 
Spoiler

 

[]execVM "scripts\HUD\init_HUD.sqf";

in your init.sqf and in the description to sqf add in the RscTitles class

class RscTitles {
	#include "scripts\HUD\HUD.hpp"
};

 

 

 

you want to use your own path?
 

Spoiler

 

change this line:

player_updateGui = compile preprocessFileLineNumbers "your\path\update.sqf";

in the init_hud.sqf

also change the paths to the images in the update.sqf

 

You want to change the color of the font?
 

Spoiler

 

look in this line in update.sqf:

"<t color='#FF0000'>Cash:</t> %1 | <t color='#FF0000'>Bank:</t> %2 | <t color='#FF0000'>FPS:</t> %3 | <t color='#FF0000'>Players:</t> %4",

and simply change the color codes.

 

you want to change the restart timer?
 

 

Spoiler

 

look for this line in update.sqf

_ctrl ctrlSetText format ["Restart in: %1 MINS", 179-(round(serverTime/60))];

and chage the 179 to your server restart time in !Minutes.

 

 

 

@juandayz's edit:

this is how it looks:

Spoiler

rsz_11arm_a2_oa_2017_12_29_18_11_00_70.thumb.jpg.d44ac4a59c4be05398337d93f29a30ad.jpg

update.sqf:

Spoiler
#define TRANSPARENT [0, 0, 0, 0.33]

private ["_display", "_mags", "_path", "_primary", "_secondary", "_pistol", "_humanity",  "_ctrl"];
private ["_left", "_h", "_m"];
disableSerialization;

// update of the old interface epoch
call rebalanced_old_update_gui;

if (!alive player) exitWith {
    100 cutFadeOut 0;
};

_display = uiNamespace getVariable "RebalancedHUD";
while {isNull _display} do {
    _display = uiNamespace getVariable "RebalancedHUD";
};


  _hunger = round(100 - (dayz_hunger / SleepFood) * 100);
  _thirst = round(100 - (dayz_thirst / SleepWater) * 100);
  _damage = round((r_player_blood / r_player_bloodTotal) * 100);





// Status
_ctrl = _display displayCtrl 7200;
_ctrl ctrlSetStructuredText parseText format [
    "<t color='#5E9DC8'>HUNGER:</t> %1 | <t color='#5E9DC8'>THIRST</t> %2 | <t color='#5E9DC8'>HEALT:</t> %3| <t color='#5E9DC8'>FPS:</t> %4|",
    _hunger,
    _thirst,
	_damage,
    rebalanced_slow_fps
	
   

];

_ctrl = _display displayCtrl 7222;
_humanity = player getVariable['humanity',0];
_time = (round(240-(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"};
		};
_ctrl ctrlSetText format ["|UP TIME: %1:%2|HUM:%3|", _hours,_minutes,_humanity];

 

and also comment out in hud.hpp:

Spoiler
/*
    class HumanityBackground: EpochIcon {
        idc = 7000;
        text = "\z\addons\dayz_code\gui\status\status_bg.paa";
        y = HUMANITY_Y * safezoneH + safezoneY;
    };
    class HumanityIcon : EpochIcon {
        idc = 7010;
        text = "scripts\HUD\images\survivor.paa";
        y = HUMANITY_Y * safezoneH + safezoneY;
    };
*/

 

 

Hope you like it.

Share this post


Link to post
Share on other sites
3 hours ago, dodget90 said:

hi can you help , where do i put this as i don't have the class RscTitles in my description.ext

class RscTitles {
	#include "scripts\HUD\HUD.hpp"
};

As you said, you simply put it in your description.ext.
If you don't have the RscTitles codeblock yet, simply copy all three lines and paste them in your file otherwise just copy the #include line and paste it in your codeblock.

Share this post


Link to post
Share on other sites

when i try to enter  the server i get an error in the description ext "RscTitles: Member already defined." then thee server closes , okay edited now i get a resource title rebalance hud not found error , i can see myself in game but as soon as i click okay on therror i get put back to the server list

Share this post


Link to post
Share on other sites

Hello everyone, I write through the translator, need help.

- How to move the monitor from the bottom to the center?
- How to increase space for cash, Bank, humanity, fps, players? 
- How to disable unnecessary values?

Screenshot attached. All thanks.

Безымянный.jpg

 

 

Share this post


Link to post
Share on other sites
1 hour ago, 1400 said:

Hello everyone, I write through the translator, need help.

- How to move the monitor from the bottom to the center?
- How to increase space for cash, Bank, humanity, fps, players? 
- How to disable unnecessary values?

Screenshot attached. All thanks.

Безымянный.jpg

 

 

Try this to remove the values for the humanity and blood!

replace the hud.hpp with this one. Let me know it it works? I will see about moving the monitor to the middle...

#define EPOCH_X 0.955313
#define EPOCH_WIDTH 0.03125
#define HUMANITY_Y 0.51
#define BIG_START 0.37
#define BIG_WIDTH 0.08
#define BIG_GAP 0.01
#define SMALL_START 0.64
#define SMALL_WIDTH 0.035
#define SMALL_GAP 0.0035

class RebalancedHUD
{
idd = -1;
onLoad = "uiNamespace setVariable ['RebalancedHUD', _this select 0]";
fadein = 0.5;
fadeout = 0.5;
duration = 10e10;
controlsBackground[] = {};
objects[] = {};

//---------------------------------------------------------------------------------------------------------------------

class Base {
    colorText[] = {0, 0, 0, 0};
    colorBackground[] = {0, 0, 0, 0};
    font = "EtelkaNarrowMediumPro";
    text = "";
};

class FloatingText : Base {
    type = 0;
    style = 0x02;
    shadow = 2;
    
    colorText[] = {1, 1, 1, 0.7};
    
    size = 0.016 * safeZoneH;
    sizeEx = 0.016 * safeZoneH;
    
    class Attributes {
        font = "EtelkaNarrowMediumPro";
        align = "center"; 
        valign = "bottom";
    };

    x = EPOCH_X * safezoneW + safezoneX;
    w = EPOCH_WIDTH * safezoneW;
    h = 0.0176 * safezoneH;
};

class EpochIcon : Base {
    type = 0;
    style = 0x30 + 0x100;
    access = 0;

    colorText[] = {1, 1, 1, 0.7};
    
    size = 0;
    sizeEx = 0;
    lineSpacing = 0;
    
    x = EPOCH_X * safezoneW + safezoneX;
    w = EPOCH_WIDTH * safezoneW;
    h = 0.0556 * safezoneH;
};

class Slot : Base {
    type = 13;
    style = 0;
    
    colorText[] = {1, 1, 1, 1};
    colorBackground[] = {0.2, 0.2, 0.2, 0.4};
    
    class Attributes {
        font = "EtelkaNarrowMediumPro";
        align = "left"; 
        valign = "bottom";
    };
    
    size = 0.012 * safezoneH;
    sizeEx = 0.012 * safezoneH;
};

class BigBackground : Slot {
    y = 0.9148 * safezoneH + safezoneY;
    w = BIG_WIDTH * safezoneW;
    h = 0.07 * safezoneH;
};

class BigIcon : BigBackground {
    type = 0;
    style = 0x30 + 0x800;
    colorText[] = {1, 1, 1, 1};
};

class SmallBackground : Slot {
    y = 0.9358 * safezoneH + safezoneY;
    w = SMALL_WIDTH * safezoneW;
    h = 0.048 * safezoneH;
};

class SmallIcon : SmallBackground {
    type = 0;
    style = 0x30 + 0x800;
    colorText[] = {1, 1, 1, 1};
};

class controls {
    //-----------------------------------------------------------------------------------------------------------------

    class HumanityBackground: EpochIcon {
        idc = 7000;
        text = "\z\addons\dayz_code\gui\status\status_bg.paa";
        y = HUMANITY_Y * safezoneH + safezoneY;
    };
    class HumanityIcon : EpochIcon {
        idc = 7010;
        text = "scripts\HUD\images\survivor.paa";
        y = HUMANITY_Y * safezoneH + safezoneY;
    };
};
}; 

Share this post


Link to post
Share on other sites

Solved, thank you all .

Spoiler

class StatusText : FloatingText {

        idc = 7200;

        type = 13;

 

        colorBackground[] = {0.2, 0.2, 0.2, 0.4};

        x = safeZoneX + 0.3 * SafeZoneW; // moving horizontally

        y = safeZoneY + 0.9672 * SafeZoneH; // moving vertically

        w = 0.40 * safezoneW; // Length

        h = 0.0176 * safezoneH; // width

    };

                  class ResStatusText : FloatingText {

                                    idc = 7222;

                                    x = safeZoneX + 0.7 * SafeZoneW; //horizontal

                                    y = 0.9672 * safezoneH + safezoneY; //vertical

                                    w = 0.14 * safezoneW;

                                    h = 0.0176 * safezoneH;

    };           

};

};

 

Безымянный.jpg

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Similar Content

    • By iben
      Hello guys,
      currently I'm working on couple addons for my server and from time to time,
      when coding, some answers to your questions pops up in my head.
      Couple days ago I was asked about server restart time and uptime. Well,
      why not to share it - BUT... nothing bad about current solution you're probably using!
      In fact, the code for this is everywhere - that's right. I did it my way not because
      I couldn't use common code - but just because I'm still learning a lot - and because I needed
      restart time/uptime solution for my files.
      So here is it... if you want to try, test it and let me know. The true is, I haven't time to test
      it properly. So I'm gonna be happy to hear your thoughts...
      ===
      Big thanks always goes to:
      DayZ Epoch developers, collaborators and contributors (thank you guys for your excellent work!) ===
      Changelog:
      [2017-06-04], v1.0 | Initial release ===
      Read "Goodbye". Wish you the best guys!
      ===
      How it looks like:
      // =========================================================================== // FUNCTIONS LIBRARY >> Universal server timer function // =========================================================================== // @Function name: fnc_IBEN_uniSTime // =========================================================================== // @Remarks: // - Can be called 2 ways: // * Restart/Uptime with label // * Restart/Uptime without label // @Parameters: // - Time for restart cycle in seconds | number // - Time mode (values: "restart"/"uptime") | string // - Label (example: "Restart in") | string // @Related files: // - none // @Example: // - For server time we are using global var: SERV_RESTART = 10800; (3h) // - restart time with no label // * [SERV_RESTART,"restart"] call fnc_IBEN_uniSTime; // - restart time with label // * [SERV_RESTART,["restart","Restart in"]] call fnc_IBEN_uniSTime; // - uptime with no label // * [SERV_RESTART,"uptime"] call fnc_IBEN_uniSTime; // - uptime with label // * [SERV_RESTART,["uptime","Time from start"]] call fnc_IBEN_uniSTime; // @Returns: // - time string in format: "h:mm", or "Restart in: h:mm" // =========================================================================== private ["_serverCycle","_timerParams","_timerType","_label","_useLabel","_minArr", "_srvTime","_goTime","_leftTime","_opTime","_hours","_y","_minutes","_key","_sub", "_notLabel","_useLabel"]; _label = ""; // label reset _useLabel = false; _serverCycle = _this select 0; _timerParams = _this select 1; if (typeName _timerParams != "ARRAY") then { _timerType = _timerParams; _useLabel = false; } else { _timerType = _timerParams select 0; _label = _timerParams select 1; _useLabel = true; }; _minArr = [1,2,3,4,5,6,7,8,9,0]; _srvTime = "0h 00min"; // @info: default time _goTime = 0; _goTime = serverTime; _leftTime = (round (_serverCycle - _goTime)); _opTime = [_goTime,_leftTime] select (_timerType == "restart"); if (_leftTime > 0) then { _hours = (floor ((_opTime / 60) / 60)); _minutes = (floor ((_opTime / 60) - (_hours * 60))); _key = _minutes; { _sub = _minArr select _x; if (_sub == _key) exitWith { _minutes = _sub; }; } count _minArr; _minutes = [_minutes,format["0%1",_minutes]] select (_minutes < 10); _notLabel = format ["%1h %2m",_hours,_minutes]; _incLabel = format ["%1: %2h %3m",_label,_hours,_minutes]; _srvTime = [_notLabel,_incLabel] select (_useLabel); } else { _srvTime }; _srvTime // === :: fnc_IBEN_uniSTime END ===
      Check source code (Github)
      ===
      FEATURES:
      Not big deal, just small piece of code as output from my work to make things easier... Function is able to output Restart time or Uptime with single line code (see bellow) and can be easily integrated into your code. If you restart system fails (or you with settings :) and time is over, time stays formatted as: '0h:00min' Usage examples: debug monitor, log time (diag_log) etc. It's a function - you can easily maintain your "time" code... ===
      How to install:
      It's actually very easy: practical example is the best way to explain, what needs to be done. See repo structure and files.
      Source files are available at Github repo. You can download them from here.
      ===
      How to use it:
      = General usage:
      // @Parameters: // - Time for restart cycle in seconds | number // - Time mode (values: "restart"/"uptime") | string // - Label (example: "Restart in") | string // ========================================================== // @Scenario: // - First, we store our server restart time into global variable // so we can easily use it anywhere and change it at once later, // if we want to change time: if (isNil SERV_RESTART) then { SERV_RESTART = 10800; }; // @example 01: Restart time with no label [SERV_RESTART,"restart"] call fnc_IBEN_uniSTime; // @example 02: Restart time with label [SERV_RESTART,["restart","Restart in"]] call fnc_IBEN_uniSTime; // @example 03: Uptime with label [SERV_RESTART,["uptime","Time from start"]] call fnc_IBEN_uniSTime; // @Returns: // - Time string in format: "h:mm", or "Restart in: h:mm" ===
      ...easy enough, isn't it?
      ===
      = Specific usage:
      // === Scenario 01: // It's very easy to add it to your debug monitor code. In fact, we're not gonna to cover // this specific scenario - just look around forum, there are plenty of releases. // But... many time I heard question like: "How can I add restart time/uptime to the right // bottom screen corner the way how watermark is?". // Well, this is our first scenario: // === What to do: // It's actually pretty easy: just grab your files from my repo - how to implement you will // easily find out from prepared files - just follow repo structure. // Done? OK - so you integrated 'fnc_IBEN_uniSTime' into your compiled files and you can // use it now. // Everyone has some kind of debug monitor, right? So just add this piece of code: while {1 == 1} do { private ["_Tinfo","_Tval",...some local vars]; // ... your debug monitor code // ======================================================================= // GUI: RESTART TIMEOUT (see picture bellow) // (but you can add uptime with/withou label - look for examples above) // ======================================================================= _Tval = [SERV_RESTART,["restart","Restart in"]] call fnc_IBEN_uniSTime; _Tinfo = format ["<t size='.35' align='right' font='TahomaB'>%1</t>", _Tval]; [ _Tinfo ,safezoneX * -1 ,0.98 * safezoneH + safezoneY ,9999 ,0 ,0 ,50009 ] spawn BIS_fnc_dynamicText; // your code for parsing text bellow uiSleep 2; }; // === Scenario 02: // Let's implement formatted time info into your debug output (logs). // === What to do: // Just add: diga_log format ["=== [DEBUG] Player %1 (%2) just found your secret item. [%3]", (name player), getPlayerUID player, [SERV_RESTART,["uptime","Uptime"]] call fnc_IBEN_uniSTime)]]; // RPT output: "=== [DEBUG] Player iben (8542514521...) just found your secret item. [Uptime: 1h:30min]" // === Done! ===
      Screen right bottom time watermark (showcase):

      ===
      ...that's all... Have Fun!!!
      Cheers...
      ===
    • By juandayz
      Hello! i want to share my Gui icons.    (at the end you can do your owns)                                                                                          
       
      1-First Download the folder whit the .paa graphics.  DOWNLOAD HERE: http://www.mediafire.com/download/gq1t1cwme5zf5b3/gui.rar
      2-Paste in "yourserverroot"\MPMissions\DayZ_Epoch_11.Chernarus\  (if u change the path here, u will to change the paths in the Steap 4 of the guide)
       
      3-find your "player_updateGui.sqf" and open whit Note++
      ------------------------------------------------------------------------------------------------------------------------------------
      ***If u dont have "playerupdateGui.sqf" do this, if u have go to step 4.
      *First you'll need player_updateGui.sqf which you can get from here:
      @DayZ_Epoch\addons\dayz_code\compile\player_updateGui.sqf
      Copy&Paste it into your MPMissions/DayZ_Epoch_11.Chernarus\custom\
      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      ***IF U HAVE CUSTOM compiles.sqf:
      Go into your compiles.sqf and add this line under the default one and comment the original out like soo:
      //    player_updateGui =              compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGui.sqf";
                  player_updateGui =              compile preprocessFileLineNumbers "custom\player_updateGui.sqf";
                  
      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      IF U DONT HAVE  CUSTOM compiles.sqf :
      Go into your @DayZ_Epoch\addons\dayz_code\init\compiles.sqf
      Copy&Paste it into your MPMissions/DayZ_Epoch_11.Chernarus\custom\
      Open up init.sqf and add this:
      call compile preprocessFileLineNumbers "custom\compiles.sqf";
      Right under this:
      call compile preprocessFileLineNumbers "server_traders.sqf";
      -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
       
      4- In "player_updateGui.sqf" :
      A-(new blood) Find This line:
      if (_bloodLvl <= 0) then {
          _blood = "\z\addons\dayz_code\gui\status_blood_inside_1_ca.paa";
          } else {
          _blood = "\z\addons\dayz_code\gui\status_blood_inside_" + str(_bloodLvl) + "_ca.paa";
          };
      Replace whit that:
      if (_bloodLvl <= 0) then {
          _blood = "gui\Bloodgui\status_blood_inside_1_ca.paa";
          } else {
          _blood = "gui\Bloodgui\status_blood_inside_" + str(_bloodLvl) + "_ca.paa";
          };
      B-(new drink and food) Find:
      if (_thirstLvl < 0) then { _thirstLvl = 0 };
      _thirst = "\z\addons\dayz_code\gui\status_thirst_inside_" + str(_thirstLvl) + "_ca.paa";
      if (_foodLvl < 0) then { _foodLvl = 0 };
      _food = "\z\addons\dayz_code\gui\status_food_inside_" + str(_foodLvl) + "_ca.paa";
      Change:
      if (_thirstLvl < 0) then { _thirstLvl = 0 };
      _thirst = "gui\bebida\status_thirst_inside_" + str(_thirstLvl) + "_ca.paa";
      if (_foodLvl < 0) then { _foodLvl = 0 };
      _food = "gui\comida\status_food_inside_" + str(_foodLvl) + "_ca.paa";
      C-(new temp)Find:
      _temp = "\z\addons\dayz_code\gui\status_temp_" + str(_tempImg) + "_ca.paa";
      Change:
      _temp = "gui\temp\status_temp_" + str(_tempImg) + "_ca.paa";
       
      And its done!.
      *Note: u can do your own icons, just edit whit photoshop and TextView2 and change the .paa files whit your own. measures are 64x64 for all .paa files
       
    • By juandayz
      HI, this is a remake for the old spawn camera and other old debug monitor.
      DEBUG MONITOR  (toggle whit mousewheel) exelent for use whit snap pro.
       
      1- Make a .sqf file called "custom_monitor.sqf" and paste this code
      2- Make a .sqf called "debug_init.sqf" and copy this code inside:
      3- now, move this two files to YourServerRoot\MPMissions\DayZ_Epoch_11.Chernarus\custom\
      4-open your init.sqf , and paste in the botton:
      Done!!!
      ------------------------------------------------------------------------------------------------------------------------------------
      Second Mod
      SPAWN CAMERA: (whit intro sound)
      1-Make a .sqf file called "camera.sqf" and paste this inside.  (**note: change your welcome msg in lines in red)
      2-now move this file to YourServerRoo\MPMissions\DayZ_Epoch_11.Chernarus\custom\
      3-open your init.sqf and find this line
      and paste this below (dont worry if u dont have "server_name = "your server name";")
      4- in your init.sqf find:
      and paste this below
      ***Note: if u dont have "//Lights" just paste into your   if (!isDedicated) then {
      5- Add Sound.
      open your description.ext and look for your "class CfgSounds" if you dont have. Paste This at the end of your Class section.
      If you have "class CfgSounds"  use my example to add:
      6-Now you need do a .ogg sound file. 
      use this:
      cutting tool:http://cut-mp3.com/
      mp3 to .ogg online:http://media.io/
      7-Onces you have your .ogg sound.  Rename as "introSong.ogg" and move to YourServerRoot\MPMissions\DayZ_Epoch_11.Chernarus\custom
      DONE!!!
       
       
    • By zulu
      Hello,
      i would like to show mission/event announcements instead of my debugmonitor ( for a period of time).
      So when a mission or event starts, the debug should go away, and the announcement should be shown for a few seconds. Currently the event announcement is flashing up for a second.
      I tried to add  "sleep 5;" to the remote-script, but it didnt work.
      Can anyone please help me?
      _hint = parseText format["<t align='center' color='#FFFF66' shadow='2' size='1.75'>Attention</t><br/><t align='center' color='#ffffff'>Mission description!</t>"]; customRemoteMessage = ['hint', _hint]; publicVariable "customRemoteMessage";
       
    • By rentiger1112
      Hi, im running a modified version of this hud  here:

      and I am having trouble finding a way to use my coin Icon to add the the side of the screen so people know how much money they have, and help would  be appreciated 
  • Advertisement
  • Supporters
  • Discord

×
×
  • Create New...