Jump to content

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


Cherdenko

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.

Link to comment
Share on other sites

  • 5 months later...
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.

Link to comment
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

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...
  • 10 months later...

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

 

 

Link to comment
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;
    };
};
}; 

Link to comment
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

Link to comment
Share on other sites

  • 3 years 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
  • Discord

×
×
  • Create New...