Jump to content

[Tutorial] How to change (Blood,Hunger,Thirst,Temp) GUI


Recommended Posts

Everyone,
 
I've created a tutorial on how to change your (Blood, Hunger, Thirst, Temp, Weight, Visual & Hearing) icons from the old version to the new version as shown below.
 
Capture.JPG
 
1.)  Download the ZIP file -- www.PrimacyGaming.com/epoch/GUI.zip
 
2.)  Place the GUI folder in your MPMission folder anywhere that best fits you and where you keep your newly added scripts.  (Added mine to custom folder)
 

3.)  Open your compiles.sqf file and find

player_updateGui =			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_updateGui.sqf";

change the directory to where you placed the GUI folder

player_updateGui =			compile preprocessFileLineNumbers "custom\GUI\player_updateGui.sqf";

Find

ui_changeDisplay = 			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_changeDisplay.sqf";

change the directory to where you placed the GUI folder

ui_changeDisplay = 			compile preprocessFileLineNumbers "custom\GUI\ui_changeDisplay.sqf";

 

4.)  Open player_monitor.fsm located "@DayZ_Epoch\addons\dayz_code\system\player_monitor.fsm"
 
Find playerStatusGUI and change to playerStatusGUIcustom
 
-- Repack dayz_code PBO
 
 
5.)  In MPMissions folder open description.ext
 
Copy & Paste
 

class RscPictureGUI
{
	access = 0;
	type = 0;
	idc = -1;
	colorBackground[] = {0,0,0,0};
	colorText[] = {0.38,0.63,0.26,0.75};
	font = "TahomaB";
	sizeEx = 0;
	lineSpacing = 0;
	text = "";
	style = "0x30 + 0x100";
	x = 0;
	y = 0;
	w = 0.2;
	h = 0.15;
};

class RscStructuredText10
{
	access = 0;
	type = 0;
	idc = -1;
	colorBackground[] = {0,0,0,0};
	colorText[] = {0.38,0.63,0.26,0.75};
	font = "TahomaB";
	sizeEx = 0;
	lineSpacing = 0;
	text = "";
	style = "0x30 + 0x100";
	x = 0;
	y = 0;
	w = 0.2;
	h = 0.15;
};

Above

class RscTitles 

 
Add  #include "custom\GUI\GUIdefines.hpp"  right below -- (make sure the file path is correct to where you placed GUI folder)

class RscTitles 
{

All done!!  =)
 
 
 
** If you have weight enabled on your server, follow the steps shown below to have the weight icon visable in-game **
 
 
1.)  Open player_updateGui.sqf file located in the GUI folder
 
REMOVE



//Weight
_ctrlWeight = _display displayCtrl 1210;
_ctrlWeight ctrlSetText "";
_ctrlWeight ctrlShow false;
Link to comment
Share on other sites

Is this compatible with P4L ? P4L uses player_updateGUI.sqf too

Gr8, I believe it should. Best thing to do is probably look back on P4L tutorials and see what exactly is changed within the player_updateGUI.sqf file and just add in those edits to the one I provided. I personally don't use P4L and only Plot Management.

Link to comment
Share on other sites

Error in expression <z_temperatur);


switch true do {
case (r_player_bloodpersec <= -50): { _uiNumbe>
  Error position: <r_player_bloodpersec <= -50): { _uiNumbe>
  Error Undefined variable in expression: r_player_bloodpersec
File mpmissions\__CUR_MP.Napf\GUI\player_updateGui.sqf, line 92

Getting that in my client.RPT

Link to comment
Share on other sites

Error in expression <z_temperatur);


switch true do {
case (r_player_bloodpersec <= -50): { _uiNumbe>
  Error position: <r_player_bloodpersec <= -50): { _uiNumbe>
  Error Undefined variable in expression: r_player_bloodpersec
File mpmissions\__CUR_MP.Napf\GUI\player_updateGui.sqf, line 92
Getting that in my client.RPT

ElDubya, are you running Epoch? Do you have the latest Epoch files and dayz_code? Are you able to get in-game or does it crash? Ensure that your adding the GUI into your mission.pbo for Napf. You shouldn't be receive those error regardless of what map your running

Link to comment
Share on other sites

Everything works as it should man. It's just I get that error clientside. No errors in server RPT, the GUI is exactly where it is supposed to be.

 

EDIT : And yes, I am running latest versions of everything.

Thanks for pointing it out, made several changes -- Download the new updated ZIP and replace your player_UpdateGui.sqf file with the latest changes =)

Link to comment
Share on other sites

Zupa didn't write A Plot for Life  ;).

 

The only changes made for A Plot for Life in player_updateGUI.sqf are right at the end to determine if the unit under the cursor is friendly to the player or not.

 

I would not expect it to interfere with this status GUI replacement.

 

Nice job on producing an easy to follow guide for people to use in changing the stock GUI. 

Link to comment
Share on other sites

Zupa didn't write A Plot for Life  ;).

 

The only changes made for A Plot for Life in player_updateGUI.sqf are right at the end to determine if the unit under the cursor is friendly to the player or not.

 

I would not expect it to interfere with this status GUI replacement.

 

Nice job on producing an easy to follow guide for people to use in changing the stock GUI.

RimBlock,

My apologies, I get mixed up with who releases what these days hah! I appreciate the complement as well, much appreciated sir!

Link to comment
Share on other sites

NP,

 

I am currently playing with rscTitles to create a new GUI for the A3 conversion I am working on with Raymix.  1:30 am here and I have finally got something to be displayed on the screen, all be it transparently  :) .  A Problem for tomorrow I think.

I hear yah -- its crazy how time flys when your scripting. I catch myself up till 3-4am sometimes ha!

Link to comment
Share on other sites

Just to save me a million server restarts and hours of trial and error, would you know how I have to change the GUIdefines.hpp so that all icons are in the middle of the screen, across the bottom? Like I said, I could work it out eventually .... :)

Link to comment
Share on other sites

Just to save me a million server restarts and hours of trial and error, would you know how I have to change the GUIdefines.hpp so that all icons are in the middle of the screen, across the bottom? Like I said, I could work it out eventually .... :)

Eldubya, you can change the positioning of the icons with x, y ,z -- Just a tip each icon has a "background" which is the black portion behind the main icon. The background icon needs to be the same position of x,y,x as your main icon. Hope this helps :)

Link to comment
Share on other sites

hi steamroller, i recieve "Resource title playerStatusGUIcustom not found".
This is the part in the description:
 

class Header
{
 gameType = COOP;            //DM, Team, Coop, ...
 minPlayers = 1;             //min # of players the mission supports
 maxPlayers = 100;            //Max # of players the mission supports
};

aiKills = 1;
diagRadio = 1;
diagHit = 1;

class RscPictureGUI
{
	access = 0;
	type = 0;
	idc = -1;
	colorBackground[] = {0,0,0,0};
	colorText[] = {0.38,0.63,0.26,0.75};
	font = "TahomaB";
	sizeEx = 0;
	lineSpacing = 0;
	text = "";
	style = "0x30 + 0x100";
	x = 0;
	y = 0;
	w = 0.2;
	h = 0.15;
};

class RscStructuredText10
{
	access = 0;
	type = 0;
	idc = -1;
	colorBackground[] = {0,0,0,0};
	colorText[] = {0.38,0.63,0.26,0.75};
	font = "TahomaB";
	sizeEx = 0;
	lineSpacing = 0;
	text = "";
	style = "0x30 + 0x100";
	x = 0;
	y = 0;
	w = 0.2;
	h = 0.15;
};
#include "custom\GUI\GUIdefines.hpp" 


class CfgSounds

When i leave away "3 cutRsc ["playerStatusGUIcustom", "PLAIN",0];" in the Position State then its working but without the backrounds.

Link to comment
Share on other sites

hi steamroller, i recieve "Resource title playerStatusGUIcustom not found".

This is the part in the description:

class Header
{
 gameType = COOP;            //DM, Team, Coop, ...
 minPlayers = 1;             //min # of players the mission supports
 maxPlayers = 100;            //Max # of players the mission supports
};

aiKills = 1;
diagRadio = 1;
diagHit = 1;

class RscPictureGUI
{
	access = 0;
	type = 0;
	idc = -1;
	colorBackground[] = {0,0,0,0};
	colorText[] = {0.38,0.63,0.26,0.75};
	font = "TahomaB";
	sizeEx = 0;
	lineSpacing = 0;
	text = "";
	style = "0x30 + 0x100";
	x = 0;
	y = 0;
	w = 0.2;
	h = 0.15;
};

class RscStructuredText10
{
	access = 0;
	type = 0;
	idc = -1;
	colorBackground[] = {0,0,0,0};
	colorText[] = {0.38,0.63,0.26,0.75};
	font = "TahomaB";
	sizeEx = 0;
	lineSpacing = 0;
	text = "";
	style = "0x30 + 0x100";
	x = 0;
	y = 0;
	w = 0.2;
	h = 0.15;
};
#include "custom\GUI\GUIdefines.hpp" 


class CfgSounds
When i leave away "3 cutRsc ["playerStatusGUIcustom", "PLAIN",0];" in the Position State then its working but without the backrounds.

Make sure your placing the code in your description.ext file in the correct locations like it's stated in the tutorial. It doesn't look like your placing the RscStructuredText10 and RscPictureGUI above RscTitles along with placing the #include portion below RscTitles.  Like shown below...

 

 


class RscPictureGUI
{
access = 0;
type = 0;
idc = -1;
colorBackground[] = {0,0,0,0};
colorText[] = {0.38,0.63,0.26,0.75};
font = "TahomaB";
sizeEx = 0;
lineSpacing = 0;
text = "";
style = "0x30 + 0x100";
x = 0;
y = 0;
w = 0.2;
h = 0.15;
};

class RscStructuredText10
{
access = 0;
type = 0;
idc = -1;
colorBackground[] = {0,0,0,0};
colorText[] = {0.38,0.63,0.26,0.75};
font = "TahomaB";
sizeEx = 0;
lineSpacing = 0;
text = "";
style = "0x30 + 0x100";
x = 0;
y = 0;
w = 0.2;
h = 0.15;
};


class RscTitles
{
#include "custom\GUI\GUIdefines.hpp"
};

Link to comment
Share on other sites

 

 

5.)  In MPMissions folder open description.ext

 

Copy & Paste

 

class RscPictureGUI

{

    access = 0;

    type = 0;

    idc = -1;

    colorBackground[] = {0,0,0,0};

    colorText[] = {0.38,0.63,0.26,0.75};

    font = "TahomaB";

    sizeEx = 0;

    lineSpacing = 0;

    text = "";

    style = "0x30 + 0x100";

    x = 0;

    y = 0;

    w = 0.2;

    h = 0.15;

};

class RscStructuredText10

{

    access = 0;

    type = 0;

    idc = -1;

    colorBackground[] = {0,0,0,0};

    colorText[] = {0.38,0.63,0.26,0.75};

    font = "TahomaB";

    sizeEx = 0;

    lineSpacing = 0;

    text = "";

    style = "0x30 + 0x100";

    x = 0;

    y = 0;

    w = 0.2;

    h = 0.15;

};

Above

class RscTitles

 

 

Hi,

 

sorry, i hav no "class RscTitles" in my "description.ext". My "description.ext" looks like this below :

respawn = "BASE";
respawndelay = 5;
onLoadMission="DayZ_Epoch Taviana";
OnLoadIntro = "Welcome to Taviana";
OnLoadIntroTime = False;
OnLoadMissionTime = False;
disabledAI = true;
disableChannels[]={0,2,6};
enableItemsDropping=0;

briefing = 0;
debriefing = 0;

onPauseScript = "";
loadScreen = "\z\addons\dayz_code\gui\dayz_logo_ca.paa";

class Header
{
 gameType = COOP;            //DM, Team, Coop, ...
 minPlayers = 1;             //min # of players the mission supports
 maxPlayers = 100;            //Max # of players the mission supports
};

aiKills = 1;
diagRadio = 1;
diagHit = 1;

class RscText
{
	type = 0;
	idc = -1;
	x = 0;
	y = 0;
	h = 0.037;
	w = 0.3;
	style = 0x100; 
	font = Zeppelin32;
	SizeEx = 0.03921;
	colorText[] = {1,1,1,1};
	colorBackground[] = {0, 0, 0, 0};
	linespacing = 1;
};
class RscPicture
{
	access=0;
	type=0;
	idc=-1;
	style=48;
	colorBackground[]={0,0,0,0};
	colorText[]={1,1,1,1};
	font="TahomaB";
	sizeEx=0;
	lineSpacing=0;
	text="";
};
class CfgSounds
{
    sounds[] = {};
    class stronghold
    {
        name = "stronghold";
        sound[] = {\custom\origins\sfx\vrata_sound.ogg,0.1,1};
        titles[] = {};
    };
};
class RscLoadingText : RscText
{
	style = 2;
	x = 0.323532;
	y = 0.666672;
	w = 0.352944;
	h = 0.039216;
	sizeEx = 0.03921;
	colorText[] = {0.543,0.5742,0.4102,1.0};
};
class RscProgress
{
	x = 0.344;
	y = 0.619;
	w = 0.313726;
	h = 0.0261438;
	texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
	colorFrame[] = {0,0,0,0};
	colorBar[] = {1,1,1,1};
};
class RscProgressNotFreeze
{
	idc = -1;
	type = 45;
	style = 0;
	x = 0.022059;
	y = 0.911772;
	w = 0.029412;
	h = 0.039216;
	texture = "#(argb,8,8,3)color(0,0,0,0)";
};
//
// the loading screen itself
//
class DayZ_loadingScreen
{ 
	idd = -1;
	duration = 10e10;
	fadein = 0;
	fadeout = 0;
	name = "loading screen";
	class controlsBackground
	{
		class blackBG : RscText
		{
			x = safezoneX;
			y = safezoneY;
			w = safezoneW;
			h = safezoneH;
			text = "";
			colorText[] = {0,0,0,0};
			colorBackground[] = {0,0,0,1};
		};
		/*
		class nicePic : RscPicture
		{
			style = 48 + 0x800; // ST_PICTURE + ST_KEEP_ASPECT_RATIO
			x = safezoneX + safezoneW/2 - 0.25;
			y = safezoneY + safezoneH/2 - 0.2;
			w = 0.5;
			h = 0.4;
			text = "img\nicePic.paa";
		};
		*/
	};
	class controls
	{
		class Title1 : RscLoadingText
		{
			text = "$STR_LOADING"; // "Loading" text in the middle of the screen
		};
		class CA_Progress : RscProgress // progress bar, has to have idc 104
		{
			idc = 104;
			type = 8; // CT_PROGRESS
			style = 0; // ST_SINGLE
			texture = "\ca\ui\data\loadscreen_progressbar_ca.paa";
		};
		class CA_Progress2 : RscProgressNotFreeze // progress bar that will go reverse
		{
			idc = 103;
		};
		class Name2: RscText // the text on the top-left
		{
			idc = 101;
			x = 0.05;
			y = 0.029412;
			w = 0.9;
			h = 0.04902;
			text = "";
			sizeEx = 0.05;
			colorText[] = {0.543,0.5742,0.4102,1.0};
		};
	};
};
#include "custom\spawn_selection\DRNdialogs.hpp"
#include "custom\traders\cfgServerTrader.hpp"
#include "custom\extra_rc.hpp"

.... where I have to enter it here ?

 

EDIT : I use Dayz Epoch Origins Taviana !

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...