Darth_Rogue Posted March 30, 2014 Report Share Posted March 30, 2014 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 More sharing options...
Asian Kid Posted March 30, 2014 Report Share Posted March 30, 2014 Can someone just post the while thing? Link to comment Share on other sites More sharing options...
jOoPs Posted March 30, 2014 Report Share Posted March 30, 2014 Both of those are also in the dayz_code\gui\status folder as well. No need to get them elsewhere. Thanks jOoPs! :) RscPlayerUI.hpp updated - thanks for hint! :) Link to comment Share on other sites More sharing options...
Asian Kid Posted March 30, 2014 Report Share Posted March 30, 2014 /* bloodloss & bloodgain not implemented yet! */ /* cheers... jOoPs */ private ["_display","_uiNumber","_ctrlWeight","_bloodText","_ctrlCombatBorder","_ctrlCombatBorder2","_ctrlBloodOuter","_ctrlFoodBorder","_ctrlThirstBorder","_ctrlTempBorder","_ctrlBlood","_ctrlBleed","_bloodVal","_ctrlFood","_ctrlThirst","_thirstVal","_foodVal","_ctrlTemp","_tempVal","_combatVal","_array","_ctrlEar","_ctrlEye","_ctrlCombat","_ctrlFracture","_visualText","_visual","_audibleText","_audible","_blood","_thirstLvl","_foodLvl","_tempImg","_thirst","_food","_temp","_bloodLvl","_tempLvl","_color","_string","_humanity","_size","_friendlies","_charID","_rcharID","_rfriendlies","_rfriendlyTo","_distance","_targetControl","_humanityTarget"]; disableSerialization; _foodVal = 1 - (dayz_hunger / SleepFood); _thirstVal = 1 - (dayz_thirst / SleepWater); _tempVal = 1 - ((dayz_temperatur - dayz_temperaturmin)/(dayz_temperaturmax - dayz_temperaturmin)); // Normalise to [0,1] _combatVal = 1 - dayz_combat; // May change later to be a range of red/green to loosely indicate 'time left in combat' if (uiNamespace getVariable ['DZ_displayUI', 0] == 1) exitWith { _array = [_foodVal,_thirstVal]; _array }; _display = uiNamespace getVariable 'DAYZ_GUI_display'; _ctrlBloodOuter = _display displayCtrl 1200; _ctrlFoodBorder = _display displayCtrl 1201; _ctrlThirstBorder = _display displayCtrl 1202; _ctrlTempBorder = _display displayCtrl 1208; _ctrlCombatBorder = _display displayCtrl 1207; _ctrlCombatBorder2 = _display displayCtrl 1211; //Border white _ctrlBloodOuter ctrlSetTextColor [1,1,1,1]; _ctrlFoodBorder ctrlSetTextColor [1,1,1,1]; _ctrlThirstBorder ctrlSetTextColor [1,1,1,1]; _ctrlTempBorder ctrlSetTextColor [1,1,1,1]; _ctrlCombatBorder ctrlSetTextColor [1,1,1,1]; _ctrlCombatBorder2 ctrlSetTextColor [1,1,1,1]; _ctrlBlood = _display displayCtrl 1300; _ctrlBleed = _display displayCtrl 1303; _bloodVal = r_player_blood / r_player_bloodTotal; _ctrlFood = _display displayCtrl 1301; _ctrlThirst = _display displayCtrl 1302; _ctrlTemp = _display displayCtrl 1306; //TeeChange _ctrlEar = _display displayCtrl 1304; _ctrlEye = _display displayCtrl 1305; //_ctrlHumanity = _display displayCtrl 1207; _ctrlCombat = _display displayCtrl 1307; _ctrlFracture = _display displayCtrl 1203; //only show the weight-icon if R3F-weight-system is running ;) if (DZE_R3F_WEIGHT) then { _ctrlWeight = _display displayCtrl 1210; }; //Food/Water/Blood _ctrlBlood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_bloodVal))),(Dayz_GUI_G * _bloodVal),(Dayz_GUI_B * _bloodVal), 1]; _ctrlFood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_foodVal))),(Dayz_GUI_G * _foodVal),(Dayz_GUI_B * _foodVal), 1]; _ctrlThirst ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_thirstVal))),(Dayz_GUI_G * _thirstVal),(Dayz_GUI_B * _thirstVal), 1]; _ctrlTemp ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_tempVal))), (Dayz_GUI_G * _tempVal), _tempVal, 1]; // Color ranges from iceblue (cold) to red (hot) // << Already Done :) _ctrlCombat ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_combatVal))),(Dayz_GUI_G * _combatVal),(Dayz_GUI_B * _combatVal), 0.5]; /* Blood: round((r_player_blood / 2) / 1000) = _bloodLvl (6 = full, 1 = empty) Thirst: round(_thirstVal / 0.25) = _thirstLvl (4 = full, 0 = empty) Hunger: round(_foodVal / 0.25) = _foodLvl (4 = full, 0 = empty) Temp: round(dayz_temperatur) = tempLvl (>= 36 = full <= 28 = empty) */ _blood = ""; _thirst = ""; _food = ""; _temp = ""; _tempImg = 0; _bloodLvl = round((r_player_blood / 2) / 1000); _thirstLvl = round(_thirstVal / 0.25); _foodLvl = round(_foodVal / 0.25); _tempLvl = round(dayz_temperatur); _bloodText = "\z\addons\dayz_code\gui\status\status_blood_border"; if (r_player_infected) then { _bloodText = _bloodText + "_sick_ca.paa"; } else { _bloodText = _bloodText + "_CA.paa"; }; _ctrlBloodOuter ctrlSetText _bloodText; if (_bloodLvl <= 0) then { _blood = "\z\addons\dayz_code\gui\status\status_blood_inside_1_ca.paa"; } else { _blood = "\z\addons\dayz_code\gui\status\status_blood_inside_" + str(_bloodLvl) + "_ca.paa"; }; if (_thirstLvl < 0) then { _thirstLvl = 0 }; _thirst = "\z\addons\dayz_code\gui\status\status_thirst_inside_" + str(_thirstLvl) + "_ca.paa"; if (_foodLvl < 0) then { _foodLvl = 0 }; _food = "\z\addons\dayz_code\gui\status\status_food_inside_" + str(_foodLvl) + "_ca.paa"; switch true do { case (_tempLvl >= 36): { _tempImg = 4 }; case (_tempLvl > 33 and _tempLvl < 36): { _tempImg = 3 }; case (_tempLvl >= 30 and _tempLvl <= 33): { _tempImg = 2 }; case (_tempLvl > 28 and _tempLvl < 30): { _tempImg = 1 }; default { _tempImg = 0 }; }; _temp = "\z\addons\dayz_code\gui\status\status_temp_" + str(_tempImg) + "_ca.paa"; _ctrlBlood ctrlSetText _blood; _ctrlThirst ctrlSetText _thirst; _ctrlFood ctrlSetText _food; _ctrlTemp ctrlSetText _temp; // Visual: _visual = (dayz_disVisual / 185) min 1; if (_visual < 0.2) then {_visual = 0.2;}; _ctrlEye ctrlSetTextColor [1, 1, 1, _visual]; // Audible _audible = (dayz_disAudial / 40) min 1; if (_audible < 0.2) then {_audible = 0.2;}; _ctrlEar ctrlSetTextColor [1, 1, 1, _audible]; //Fracture if (!canStand player) then { if (!(ctrlShown _ctrlFracture)) then { r_fracture_legs = true; _ctrlFracture ctrlShow true; }; }; // Flashing if (_combatVal == 0) then { _ctrlCombat call player_guiControlFlash; }; if (_bloodVal < 0.2) then { _ctrlBlood call player_guiControlFlash; }; if (_thirstVal < 0.2) then { _ctrlThirst call player_guiControlFlash; }; if (_foodVal < 0.2) then { _ctrlFood call player_guiControlFlash; }; if (_tempVal > 0.8) then { _ctrlTemp call player_guiControlFlash; } else { _ctrlTemp ctrlShow true; }; if (r_player_injured) then { _ctrlBleed call player_guiControlFlash; }; //only show the weight-icon if R3F-weight-system is running ;) if (DZE_R3F_WEIGHT) then { if (R3F_Weight < 125) then { _ctrlWeight ctrlShow false; } else { if (R3F_Weight > 250) then { _ctrlWeight call player_guiControlFlash; } else { _ctrlWeight ctrlShow true; }; }; }; /* Opt-in tag system with friend tagging */ _targetControl = _display displayCtrl 1199; _string = ""; _humanityTarget = cursorTarget; if (!isNull _humanityTarget and isPlayer _humanityTarget and alive _humanityTarget) then { _distance = (player distance _humanityTarget); if (_distance < DZE_HumanityTargetDistance) then { _size = (1-(floor(_distance/5)*0.1)) max 0.1; // Display name if player opt-in or if friend _friendlies = player getVariable ["friendlies", []]; _charID = player getVariable ["CharacterID", "0"]; _rcharID = _humanityTarget getVariable ["CharacterID", "0"]; _rfriendlies = _humanityTarget getVariable ["friendlies", []]; _rfriendlyTo = _humanityTarget getVariable ["friendlyTo", []]; if ((_rcharID in _friendlies) and (_charID in _rfriendlies)) then { if (!(_charID in _rfriendlyTo)) then { // diag_log format["IS FRIENDLY: %1", _player]; _rfriendlyTo set [count _rfriendlyTo, _charID]; _humanityTarget setVariable ["friendlyTo", _rfriendlyTo, true]; // titleText [format[(localize "STR_EPOCH_ACTIONS_17"), (name _humanityTarget)], "PLAIN DOWN"]; }; // <br /><t %2 align='center' size='0.7'>Humanity: %3</t> _color = "color='#339933'"; _string = format["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size]; } else { // Humanity checks _humanity = _humanityTarget getVariable ["humanity",0]; _color = "color='#ffffff'"; if(_humanity < -5000) then { _color = "color='#ff0000'"; } else { if(_humanity > 5000) then { _color = "color='#3333ff'"; }; }; if(_humanityTarget getVariable ["DZE_display_name", false]) then { _string = format["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size]; }; }; }; }; // update gui if changed if (dayz_humanitytarget != _string) then { _targetControl ctrlSetStructuredText (parseText _string); dayz_humanitytarget = _string; }; _array = [_foodVal,_thirstVal]; _array ^^ dayz_code\compile\player_updateGui.sqf ------- /* modified for private usage */ /* cheers... jOoPs */ class playerStatusGUIcustom { idd = 6900; movingEnable = 0; duration = 100000; name = "statusBorder"; onLoad = "uiNamespace setVariable ['DAYZ_GUI_display', _this select 0];"; class ControlsBackground { class RscPicture_1901: RscPictureGUI { idc = 1901; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.79 * safezoneH + safezoneY;//2 w = 0.075; h = 0.10; }; class RscPicture_1201: RscPictureGUI { idc = 1201; text = "\z\addons\dayz_code\gui\status\status_thirst_border_ca.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.79 * safezoneH + safezoneY;//2 w = 0.075; h = 0.10; }; class RscPicture_1900: RscPictureGUI { idc = 1900; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.86 * safezoneH + safezoneY; //3 w = 0.075; h = 0.10; }; class RscPicture_1200: RscPictureGUI { idc = 1200; x = 0.955313 * safezoneW + safezoneX; y = 0.86 * safezoneH + safezoneY; //3 w = 0.075; h = 0.10; }; class RscPicture_1902: RscPictureGUI { idc = 1902; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.93 * safezoneH + safezoneY; //1 w = 0.075; h = 0.10; }; class RscPicture_1202: RscPictureGUI { idc = 1202; text = "\z\addons\dayz_code\gui\status\status_food_border_ca.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.93 * safezoneH + safezoneY; //1 w = 0.075; h = 0.10; }; class RscPicture_1908: RscPictureGUI { idc = 1908; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.72 * safezoneH + safezoneY; //3 w = 0.075; h = 0.10; }; class RscPicture_1208: RscPictureGUI { idc = 1208; text = "\z\addons\dayz_code\gui\status\status_temp_outside_ca.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.72 * safezoneH + safezoneY; //3 w = 0.075; h = 0.10; }; class RscPicture_1203: RscPictureGUI { idc = 1203; text = "\z\addons\dayz_code\gui\status\status_effect_brokenleg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.58 * safezoneH + safezoneY; w = 0.075; h = 0.10; colorText[] = {1,1,1,1}; }; class RscPicture_1204: RscPictureGUI { idc = 1204; text = "\z\addons\dayz_code\gui\status\status_connection_ca.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.44 * safezoneH + safezoneY; w = 0.075; h = 0.10; colorText[] = {1,1,1,1}; }; class RscPicture_1205: RscPictureGUI { idc = 1205; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.30 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1206: RscPictureGUI { idc = 1206; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.37 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1207: RscPictureGUI { idc = 1207; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.65 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1210: RscPictureGUI { idc = 1210; text = "\z\addons\dayz_code\gui\status\status_effect_weight.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.51 * safezoneH + safezoneY; w = 0.075; h = 0.10; colorText[] = {1,1,1,1}; }; class RscPicture_1211: RscPictureGUI { idc = 1211; text = "\z\addons\dayz_code\gui\status\status_combat_border_CA.paa"; x = 0.956813 * safezoneW + safezoneX; y = 0.6502 * safezoneH + safezoneY; w = 0.06; h = 0.08; }; }; class Controls { class RscPicture_1301: RscPictureGUI { idc = 1301; x = 0.955313 * safezoneW + safezoneX; y = 0.93 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1300: RscPictureGUI { idc = 1300; x = 0.955313 * safezoneW + safezoneX; y = 0.86 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1302: RscPictureGUI { idc = 1302; x = 0.955313 * safezoneW + safezoneX; y = 0.79 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1306: RscPictureGUI { idc = 1306; x = 0.955313 * safezoneW + safezoneX; y = 0.72 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1307: RscPictureGUI { idc = 1307; text = "\z\addons\dayz_code\gui\status\status_combat_inside_ca.paa"; x = 0.956813 * safezoneW + safezoneX; y = 0.6502 * safezoneH + safezoneY; w = 0.06; h = 0.08; }; class RscPicture_1303: RscPictureGUI { idc = 1303; text = "\z\addons\dayz_code\gui\status\status_bleeding_ca.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.86 * safezoneH + safezoneY; w = 0.075; h = 0.10; colorText[] = {1,1,1,0.5}; }; class RscPicture_1304: RscPictureGUI { idc = 1304; text = "\z\addons\dayz_code\gui\status\status_noise.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.30 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1305: RscPictureGUI { idc = 1305; text = "\z\addons\dayz_code\gui\status\status_visible.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.37 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; }; }; ^^ RscPlayerUI.hpp (include it your description.ext) (new classname now: "playerStatusGUIcustom") ---- private["_state"]; disableSerialization; _state = uiNamespace getVariable ['DZ_displayUI', 0]; // Hard code the GUI on and the Debug Monitor off if (dayzState != 0) then { 3 cutRsc ["playerStatusGUIcustom", "PLAIN",0]; //Update GUI call player_updateGui; call ui_initDisplay; hintSilent ""; }; dayzDebug = false; /* switch (_state) do { case 0: { if (dayzState != 0) then { 3 cutRsc ["playerStatusGUI", "PLAIN",0]; //Update GUI call player_updateGui; call ui_initDisplay; hintSilent ""; }; dayzDebug = false; }; case 1: { if (dayzState != 1) then { 3 cutRsc ["playerStatusGUI", "PLAIN",0]; //Update GUI call player_updateGui; call ui_initDisplay; }; dayzDebug = true; }; case 2: { if (dayzState != 2) then { 3 cutRsc ["default", "PLAIN",0]; hintSilent ""; }; dayzDebug = false; }; }; dayzState = _state; */ ^^ 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 More sharing options...
Renegade2k6 Posted March 30, 2014 Report Share Posted March 30, 2014 Same error as above, any ideas how to fix? Using NAPF. Link to comment Share on other sites More sharing options...
jOoPs Posted March 30, 2014 Report Share Posted March 30, 2014 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 More sharing options...
Halvhjearne Posted March 30, 2014 Report Share Posted March 30, 2014 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 More sharing options...
Renegade2k6 Posted March 30, 2014 Report Share Posted March 30, 2014 I now get Resource title PlayerStatusGUIcustom not found. Link to comment Share on other sites More sharing options...
jOoPs Posted March 30, 2014 Report Share Posted March 30, 2014 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 More sharing options...
jOoPs Posted March 30, 2014 Report Share Posted March 30, 2014 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 More sharing options...
Renegade2k6 Posted March 30, 2014 Report Share Posted March 30, 2014 I dont have class RscTitles { in my description.ext. 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 More sharing options...
jOoPs Posted March 30, 2014 Report Share Posted March 30, 2014 put it on bottom of description.ext Link to comment Share on other sites More sharing options...
Nexarion Posted March 30, 2014 Report Share Posted March 30, 2014 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 More sharing options...
Renegade2k6 Posted March 30, 2014 Report Share Posted March 30, 2014 Have it working nwo. missing nametagelement added - thanks for hint! :) Which file was this added too so I can update it. Link to comment Share on other sites More sharing options...
Nexarion Posted March 30, 2014 Report Share Posted March 30, 2014 I now get Resource title PlayerStatusGUIcustom not found. How did you solve this? Now I´ll get this message on login. Link to comment Share on other sites More sharing options...
Halvhjearne Posted March 30, 2014 Report Share Posted March 30, 2014 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 More sharing options...
Darth_Rogue Posted March 30, 2014 Report Share Posted March 30, 2014 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 More sharing options...
jOoPs Posted March 30, 2014 Report Share Posted March 30, 2014 ... 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 More sharing options...
Darth_Rogue Posted March 30, 2014 Report Share Posted March 30, 2014 Seems like a an awful lot of work just for four silly icons. lol Link to comment Share on other sites More sharing options...
Halvhjearne Posted March 31, 2014 Report Share Posted March 31, 2014 if you just want it to show if you are loosing blood, it can be done by adding a few lines ... what jOoPs is saying is if it needs to be done correctly like its done on newer dayz Link to comment Share on other sites More sharing options...
prominentalex Posted April 2, 2014 Report Share Posted April 2, 2014 Could you make a quick tutorial for that Halvhjearne? Link to comment Share on other sites More sharing options...
iPrismmm Posted April 7, 2014 Report Share Posted April 7, 2014 Anyone have an idea on where to start with implementing the inventory UI from 1.8? Link to comment Share on other sites More sharing options...
cen Posted April 7, 2014 Report Share Posted April 7, 2014 Yes, 1.0.5 :D Link to comment Share on other sites More sharing options...
iPrismmm Posted April 15, 2014 Report Share Posted April 15, 2014 /* bloodloss & bloodgain not implemented yet! */ /* cheers... jOoPs */ private ["_display","_uiNumber","_ctrlWeight","_bloodText","_ctrlCombatBorder","_ctrlCombatBorder2","_ctrlBloodOuter","_ctrlFoodBorder","_ctrlThirstBorder","_ctrlTempBorder","_ctrlBlood","_ctrlBleed","_bloodVal","_ctrlFood","_ctrlThirst","_thirstVal","_foodVal","_ctrlTemp","_tempVal","_combatVal","_array","_ctrlEar","_ctrlEye","_ctrlCombat","_ctrlFracture","_visualText","_visual","_audibleText","_audible","_blood","_thirstLvl","_foodLvl","_tempImg","_thirst","_food","_temp","_bloodLvl","_tempLvl","_color","_string","_humanity","_size","_friendlies","_charID","_rcharID","_rfriendlies","_rfriendlyTo","_distance","_targetControl","_humanityTarget"]; disableSerialization; _foodVal = 1 - (dayz_hunger / SleepFood); _thirstVal = 1 - (dayz_thirst / SleepWater); _tempVal = 1 - ((dayz_temperatur - dayz_temperaturmin)/(dayz_temperaturmax - dayz_temperaturmin)); // Normalise to [0,1] _combatVal = 1 - dayz_combat; // May change later to be a range of red/green to loosely indicate 'time left in combat' if (uiNamespace getVariable ['DZ_displayUI', 0] == 1) exitWith { _array = [_foodVal,_thirstVal]; _array }; _display = uiNamespace getVariable 'DAYZ_GUI_display'; _ctrlBloodOuter = _display displayCtrl 1200; _ctrlFoodBorder = _display displayCtrl 1201; _ctrlThirstBorder = _display displayCtrl 1202; _ctrlTempBorder = _display displayCtrl 1208; _ctrlCombatBorder = _display displayCtrl 1207; _ctrlCombatBorder2 = _display displayCtrl 1211; //Border white _ctrlBloodOuter ctrlSetTextColor [1,1,1,1]; _ctrlFoodBorder ctrlSetTextColor [1,1,1,1]; _ctrlThirstBorder ctrlSetTextColor [1,1,1,1]; _ctrlTempBorder ctrlSetTextColor [1,1,1,1]; _ctrlCombatBorder ctrlSetTextColor [1,1,1,1]; _ctrlCombatBorder2 ctrlSetTextColor [1,1,1,1]; _ctrlBlood = _display displayCtrl 1300; _ctrlBleed = _display displayCtrl 1303; _bloodVal = r_player_blood / r_player_bloodTotal; _ctrlFood = _display displayCtrl 1301; _ctrlThirst = _display displayCtrl 1302; _ctrlTemp = _display displayCtrl 1306; //TeeChange _ctrlEar = _display displayCtrl 1304; _ctrlEye = _display displayCtrl 1305; //_ctrlHumanity = _display displayCtrl 1207; _ctrlCombat = _display displayCtrl 1307; _ctrlFracture = _display displayCtrl 1203; //only show the weight-icon if R3F-weight-system is running ;) if (DZE_R3F_WEIGHT) then { _ctrlWeight = _display displayCtrl 1210; }; //Food/Water/Blood _ctrlBlood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_bloodVal))),(Dayz_GUI_G * _bloodVal),(Dayz_GUI_B * _bloodVal), 1]; _ctrlFood ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_foodVal))),(Dayz_GUI_G * _foodVal),(Dayz_GUI_B * _foodVal), 1]; _ctrlThirst ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_thirstVal))),(Dayz_GUI_G * _thirstVal),(Dayz_GUI_B * _thirstVal), 1]; _ctrlTemp ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_tempVal))), (Dayz_GUI_G * _tempVal), _tempVal, 1]; // Color ranges from iceblue (cold) to red (hot) // << Already Done :) _ctrlCombat ctrlSetTextColor [(Dayz_GUI_R + (0.3 * (1-_combatVal))),(Dayz_GUI_G * _combatVal),(Dayz_GUI_B * _combatVal), 0.5]; /* Blood: round((r_player_blood / 2) / 1000) = _bloodLvl (6 = full, 1 = empty) Thirst: round(_thirstVal / 0.25) = _thirstLvl (4 = full, 0 = empty) Hunger: round(_foodVal / 0.25) = _foodLvl (4 = full, 0 = empty) Temp: round(dayz_temperatur) = tempLvl (>= 36 = full <= 28 = empty) */ _blood = ""; _thirst = ""; _food = ""; _temp = ""; _tempImg = 0; _bloodLvl = round((r_player_blood / 2) / 1000); _thirstLvl = round(_thirstVal / 0.25); _foodLvl = round(_foodVal / 0.25); _tempLvl = round(dayz_temperatur); _bloodText = "\z\addons\dayz_code\gui\status\status_blood_border"; if (r_player_infected) then { _bloodText = _bloodText + "_sick_ca.paa"; } else { _bloodText = _bloodText + "_CA.paa"; }; _ctrlBloodOuter ctrlSetText _bloodText; if (_bloodLvl <= 0) then { _blood = "\z\addons\dayz_code\gui\status\status_blood_inside_1_ca.paa"; } else { _blood = "\z\addons\dayz_code\gui\status\status_blood_inside_" + str(_bloodLvl) + "_ca.paa"; }; if (_thirstLvl < 0) then { _thirstLvl = 0 }; _thirst = "\z\addons\dayz_code\gui\status\status_thirst_inside_" + str(_thirstLvl) + "_ca.paa"; if (_foodLvl < 0) then { _foodLvl = 0 }; _food = "\z\addons\dayz_code\gui\status\status_food_inside_" + str(_foodLvl) + "_ca.paa"; switch true do { case (_tempLvl >= 36): { _tempImg = 4 }; case (_tempLvl > 33 and _tempLvl < 36): { _tempImg = 3 }; case (_tempLvl >= 30 and _tempLvl <= 33): { _tempImg = 2 }; case (_tempLvl > 28 and _tempLvl < 30): { _tempImg = 1 }; default { _tempImg = 0 }; }; _temp = "\z\addons\dayz_code\gui\status\status_temp_" + str(_tempImg) + "_ca.paa"; _ctrlBlood ctrlSetText _blood; _ctrlThirst ctrlSetText _thirst; _ctrlFood ctrlSetText _food; _ctrlTemp ctrlSetText _temp; // Visual: _visual = (dayz_disVisual / 185) min 1; if (_visual < 0.2) then {_visual = 0.2;}; _ctrlEye ctrlSetTextColor [1, 1, 1, _visual]; // Audible _audible = (dayz_disAudial / 40) min 1; if (_audible < 0.2) then {_audible = 0.2;}; _ctrlEar ctrlSetTextColor [1, 1, 1, _audible]; //Fracture if (!canStand player) then { if (!(ctrlShown _ctrlFracture)) then { r_fracture_legs = true; _ctrlFracture ctrlShow true; }; }; // Flashing if (_combatVal == 0) then { _ctrlCombat call player_guiControlFlash; }; if (_bloodVal < 0.2) then { _ctrlBlood call player_guiControlFlash; }; if (_thirstVal < 0.2) then { _ctrlThirst call player_guiControlFlash; }; if (_foodVal < 0.2) then { _ctrlFood call player_guiControlFlash; }; if (_tempVal > 0.8) then { _ctrlTemp call player_guiControlFlash; } else { _ctrlTemp ctrlShow true; }; if (r_player_injured) then { _ctrlBleed call player_guiControlFlash; }; //only show the weight-icon if R3F-weight-system is running ;) if (DZE_R3F_WEIGHT) then { if (R3F_Weight < 125) then { _ctrlWeight ctrlShow false; } else { if (R3F_Weight > 250) then { _ctrlWeight call player_guiControlFlash; } else { _ctrlWeight ctrlShow true; }; }; }; /* Opt-in tag system with friend tagging */ _targetControl = _display displayCtrl 1199; _string = ""; _humanityTarget = cursorTarget; if (!isNull _humanityTarget and isPlayer _humanityTarget and alive _humanityTarget) then { _distance = (player distance _humanityTarget); if (_distance < DZE_HumanityTargetDistance) then { _size = (1-(floor(_distance/5)*0.1)) max 0.1; // Display name if player opt-in or if friend _friendlies = player getVariable ["friendlies", []]; _charID = player getVariable ["CharacterID", "0"]; _rcharID = _humanityTarget getVariable ["CharacterID", "0"]; _rfriendlies = _humanityTarget getVariable ["friendlies", []]; _rfriendlyTo = _humanityTarget getVariable ["friendlyTo", []]; if ((_rcharID in _friendlies) and (_charID in _rfriendlies)) then { if (!(_charID in _rfriendlyTo)) then { // diag_log format["IS FRIENDLY: %1", _player]; _rfriendlyTo set [count _rfriendlyTo, _charID]; _humanityTarget setVariable ["friendlyTo", _rfriendlyTo, true]; // titleText [format[(localize "STR_EPOCH_ACTIONS_17"), (name _humanityTarget)], "PLAIN DOWN"]; }; // <br /><t %2 align='center' size='0.7'>Humanity: %3</t> _color = "color='#339933'"; _string = format["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size]; } else { // Humanity checks _humanity = _humanityTarget getVariable ["humanity",0]; _color = "color='#ffffff'"; if(_humanity < -5000) then { _color = "color='#ff0000'"; } else { if(_humanity > 5000) then { _color = "color='#3333ff'"; }; }; if(_humanityTarget getVariable ["DZE_display_name", false]) then { _string = format["<t %2 align='center' size='%3'>%1</t>",(name _humanityTarget),_color,_size]; }; }; }; }; // update gui if changed if (dayz_humanitytarget != _string) then { _targetControl ctrlSetStructuredText (parseText _string); dayz_humanitytarget = _string; }; _array = [_foodVal,_thirstVal]; _array ^^ dayz_code\compile\player_updateGui.sqf ------- /* modified for private usage */ /* cheers... jOoPs */ class playerStatusGUIcustom { idd = 6900; movingEnable = 0; duration = 100000; name = "statusBorder"; onLoad = "uiNamespace setVariable ['DAYZ_GUI_display', _this select 0];"; class ControlsBackground { class RscPicture_1901: RscPictureGUI { idc = 1901; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.79 * safezoneH + safezoneY;//2 w = 0.075; h = 0.10; }; class RscPicture_1201: RscPictureGUI { idc = 1201; text = "\z\addons\dayz_code\gui\status\status_thirst_border_ca.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.79 * safezoneH + safezoneY;//2 w = 0.075; h = 0.10; }; class RscPicture_1900: RscPictureGUI { idc = 1900; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.86 * safezoneH + safezoneY; //3 w = 0.075; h = 0.10; }; class RscPicture_1200: RscPictureGUI { idc = 1200; x = 0.955313 * safezoneW + safezoneX; y = 0.86 * safezoneH + safezoneY; //3 w = 0.075; h = 0.10; }; class RscPicture_1902: RscPictureGUI { idc = 1902; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.93 * safezoneH + safezoneY; //1 w = 0.075; h = 0.10; }; class RscPicture_1202: RscPictureGUI { idc = 1202; text = "\z\addons\dayz_code\gui\status\status_food_border_ca.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.93 * safezoneH + safezoneY; //1 w = 0.075; h = 0.10; }; class RscPicture_1908: RscPictureGUI { idc = 1908; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.72 * safezoneH + safezoneY; //3 w = 0.075; h = 0.10; }; class RscPicture_1208: RscPictureGUI { idc = 1208; text = "\z\addons\dayz_code\gui\status\status_temp_outside_ca.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.72 * safezoneH + safezoneY; //3 w = 0.075; h = 0.10; }; class RscPicture_1203: RscPictureGUI { idc = 1203; text = "\z\addons\dayz_code\gui\status\status_effect_brokenleg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.58 * safezoneH + safezoneY; w = 0.075; h = 0.10; colorText[] = {1,1,1,1}; }; class RscPicture_1204: RscPictureGUI { idc = 1204; text = "\z\addons\dayz_code\gui\status\status_connection_ca.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.44 * safezoneH + safezoneY; w = 0.075; h = 0.10; colorText[] = {1,1,1,1}; }; class RscPicture_1205: RscPictureGUI { idc = 1205; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.30 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1206: RscPictureGUI { idc = 1206; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.37 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1207: RscPictureGUI { idc = 1207; text = "\z\addons\dayz_code\gui\status\status_bg.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.65 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1210: RscPictureGUI { idc = 1210; text = "\z\addons\dayz_code\gui\status\status_effect_weight.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.51 * safezoneH + safezoneY; w = 0.075; h = 0.10; colorText[] = {1,1,1,1}; }; class RscPicture_1211: RscPictureGUI { idc = 1211; text = "\z\addons\dayz_code\gui\status\status_combat_border_CA.paa"; x = 0.956813 * safezoneW + safezoneX; y = 0.6502 * safezoneH + safezoneY; w = 0.06; h = 0.08; }; }; class Controls { class RscPicture_1301: RscPictureGUI { idc = 1301; x = 0.955313 * safezoneW + safezoneX; y = 0.93 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1300: RscPictureGUI { idc = 1300; x = 0.955313 * safezoneW + safezoneX; y = 0.86 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1302: RscPictureGUI { idc = 1302; x = 0.955313 * safezoneW + safezoneX; y = 0.79 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1306: RscPictureGUI { idc = 1306; x = 0.955313 * safezoneW + safezoneX; y = 0.72 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1307: RscPictureGUI { idc = 1307; text = "\z\addons\dayz_code\gui\status\status_combat_inside_ca.paa"; x = 0.956813 * safezoneW + safezoneX; y = 0.6502 * safezoneH + safezoneY; w = 0.06; h = 0.08; }; class RscPicture_1303: RscPictureGUI { idc = 1303; text = "\z\addons\dayz_code\gui\status\status_bleeding_ca.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.86 * safezoneH + safezoneY; w = 0.075; h = 0.10; colorText[] = {1,1,1,0.5}; }; class RscPicture_1304: RscPictureGUI { idc = 1304; text = "\z\addons\dayz_code\gui\status\status_noise.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.30 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; class RscPicture_1305: RscPictureGUI { idc = 1305; text = "\z\addons\dayz_code\gui\status\status_visible.paa"; x = 0.955313 * safezoneW + safezoneX; y = 0.37 * safezoneH + safezoneY; w = 0.075; h = 0.10; }; }; }; ^^ RscPlayerUI.hpp (include it your description.ext) (new classname now: "playerStatusGUIcustom") ---- private["_state"]; disableSerialization; _state = uiNamespace getVariable ['DZ_displayUI', 0]; // Hard code the GUI on and the Debug Monitor off if (dayzState != 0) then { 3 cutRsc ["playerStatusGUIcustom", "PLAIN",0]; //Update GUI call player_updateGui; call ui_initDisplay; hintSilent ""; }; dayzDebug = false; /* switch (_state) do { case 0: { if (dayzState != 0) then { 3 cutRsc ["playerStatusGUI", "PLAIN",0]; //Update GUI call player_updateGui; call ui_initDisplay; hintSilent ""; }; dayzDebug = false; }; case 1: { if (dayzState != 1) then { 3 cutRsc ["playerStatusGUI", "PLAIN",0]; //Update GUI call player_updateGui; call ui_initDisplay; }; dayzDebug = true; }; case 2: { if (dayzState != 2) then { 3 cutRsc ["default", "PLAIN",0]; hintSilent ""; }; dayzDebug = false; }; }; dayzState = _state; */ ^^ 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 More sharing options...
jOoPs Posted April 17, 2014 Report Share Posted April 17, 2014 ^^ updated my RscPlayerUI.hpp file in post - do the same Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now