Jump to content

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


Recommended Posts

  On 3/29/2014 at 11:15 PM, jOoPs said:

 

 

note: ... and yes, combatinside (class RscPicture_1211) and combatborder (class RscPicture_1307) graphics are not linked/included in that post.. go and get them from dayz_1.7/1.8 by yourself

 

 

Both of those are also in the dayz_code\gui\status folder as well.  No need to get them elsewhere.

 

Thanks jOoPs!  :)

Link to comment
Share on other sites

  On 3/29/2014 at 11:15 PM, jOoPs said:

  Reveal hidden contents

^^ dayz_code\compile\player_updateGui.sqf

 

-------

 

  Reveal hidden contents

 

^^ RscPlayerUI.hpp (include it your description.ext) (new classname now: "playerStatusGUIcustom")

 

----

 

  Reveal hidden contents

 

^^ dayz_code\compile\ui_changeDisplay.sqf

 

----

 

in "dayz_code\system\player_monitor.fsm" search for "playerStatusGUI" and replace it with "playerStatusGUIcustom"

 

now change the pathes of "ui_changeDisplay.sqf" and "player_updateGui.sqf" in your custom-"compiles.sqf"

in your mission init.sqf change the path to your modified "player_monitor.fsm"

 

cheers

Followed your instructions

ErrorMessage: File mpmissions\__cur_mp.Panthera2\custom\RscPlayerUI.hpp, line 7: /playerStatusGUIcustom/ControlsBackground.RscPicture_1901: Undefined base class 'RscPictureGUI' 

and get this

 

Link to comment
Share on other sites

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;
};

^^ put this class into your description.ext ..right before class RscTitles definition

 

cheers

Link to comment
Share on other sites

thanks for this, you just filled in the missing gaps i had in my version ...you are missing the display for the epoch nametags tho and im not sure why you made the ear/eye light up instead of using the indicators, but i guess you like it better that way?

 

personally i used the olde broken bone icon and a few other minor details ...

 

anyways, great work ... this helped me understand these display numbers a lot better

Link to comment
Share on other sites

  On 3/30/2014 at 12:44 PM, Halvhjearne said:

thanks for this, you just filled in the missing gaps i had in my version ...you are missing the display for the epoch nametags tho and im not sure why you made the ear/eye light up instead of using the indicators, but i guess you like it better that way?

 

personally i used the olde broken bone icon and a few other minor details ...

 

anyways, great work ... this helped me understand these display numbers a lot better

 

missing nametagelement added - thanks for hint! :)

Link to comment
Share on other sites

  On 3/30/2014 at 1:50 PM, Renegade2k6 said:

I now get Resource title PlayerStatusGUIcustom not found.

...
...
...
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 RscTitles {
	#include "dayz_code\config\RscHintMEM.hpp"
	#include "dayz_code\config\RscPlayerUI.hpp"
	#include "dayz_code\config\RscCustomScr.hpp"
};
...
...
...

^^ maybe it helps you if you see the structure of my external classdefinition

Link to comment
Share on other sites

I dont have class RscTitles { in my description.ext.

 

  Quote

 

respawn = "BASE";

respawndelay = 5;
onLoadMission="DayZ_Epoch Napf";
OnLoadIntro = "Welcome to Napf";
OnLoadIntroTime = False;
OnLoadMissionTime = False;
disabledAI = true;
disableChannels[]={0,2,6};
enableItemsDropping=0;
 
briefing = 0;
debriefing = 0;
 
onPauseScript = "";
//----------------------------------------------------------------------------------------Start
loadScreen = "Scripts\Dayzloading.jpg";
//----------------------------------------------------------------------------------------End
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[] =  {introSong,signalka};
    class introSong
    {
    name="introSong";
    sound[]={Scripts\introSong.ogg,0.9,1};
    titles[] = {};
    };
        class signalka
        {
                name = "signalka";
                sound[] = {Scripts\signalka.ogg,0.2,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};
};
};
};

Where would you suggest I stick it??

Link to comment
Share on other sites

After I did all of your instructions I stuck on "Loading Character Data". But no rpt errors or something.

 

The only difference I had to do was the execution of the player_monitor.fsm... in my Init there it was like:

_playerMonitor = 	[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";

changed it to my custom:

_playerMonitor = 	[] execVM "custom\player_monitor.fsm";

Think I found my mistake, give it a try now.

Link to comment
Share on other sites

  On 3/30/2014 at 5:05 AM, jOoPs said:

RscPlayerUI.hpp updated - thanks for hint! :)

 

np, i did some more testing and it seems its quite easy to implement the blood +/- calculation by copy-pasting some lines from newer dayz code ...

 

another thing i was thinking is, that this seems a bit complicated and confusing for guys that dont know much about coding this, i belive we can make an easy install that does not overwrite the already made config but just mearly switch to the one vbawol already made ... below is the buttom of org epoch rscTitles.hpp:

#ifdef NewPlayerUI
	#include "RscDisplay\RscNewPlayerUI.hpp"
#else
	#include "RscDisplay\RscOldPlayerUI.hpp"
#endif

(not exactly sure how it works, but i belive this switches between those configs somehow)

 

i know this would not add all icons, but i belive it would be an easy way to implement them tho ...

Link to comment
Share on other sites

  On 3/30/2014 at 12:30 PM, jOoPs said:
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;
};

^^ put this class into your description.ext ..right before class RscTitles definition

 

cheers

 

 

 

Note:  This code above MUST go BEFORE the line at the bottom where you define this at the bottom of description.ext:

#include "fixes\RscPlayerUI.hpp"

The class MUST be defined BEFORE it is loaded.  Had the error you guys mentioned above and was able to fix it by moving the class definition up higher in the description.ext file.

Link to comment
Share on other sites

  On 3/30/2014 at 2:56 PM, Halvhjearne said:

... it seems its quite easy to implement the blood +/- calculation by copy-pasting some lines from newer dayz code ...

 

yes, your right.. have a working version of it on one of my testservers running.. but i think its too much patching/modifing for the users (or me to help them get it running :P)

 

scripts that needs to be rewritten are...

\z\addons\dayz_code\init\variables.sqf

\z\addons\dayz_code\medical\setup_functions_med.sqf

\z\addons\actions\player_drink.sqf

\z\addons\actions\player_eat.sqf

\z\addons\dayz_code\compile\player_updateGui.sqf

and class playerStatusGUI

 

^^ if i remember right...

 

to your idea of a simple switch.. this week will be horror for me, not sure if and when i have the time to keep an eye on it but ill see what i can do.

 

cheers

Link to comment
Share on other sites

  On 3/29/2014 at 11:15 PM, jOoPs said:

  Reveal hidden contents

^^ dayz_code\compile\player_updateGui.sqf

 

-------

 

  Reveal hidden contents

 

^^ RscPlayerUI.hpp (include it your description.ext) (new classname now: "playerStatusGUIcustom")

 

----

 

  Reveal hidden contents

 

^^ dayz_code\compile\ui_changeDisplay.sqf

 

----

 

in "dayz_code\system\player_monitor.fsm" search for "playerStatusGUI" and replace it with "playerStatusGUIcustom"

 

now change the pathes of "ui_changeDisplay.sqf" and "player_updateGui.sqf" in your custom-"compiles.sqf"

in your mission init.sqf change the path to your modified "player_monitor.fsm"

 

cheers

 

Works great. I've noticed my nametags don't work anymore though.

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
×
×
  • Create New...