Jump to content

[Release] ZHB - Zupa's Hud & Builder. V1.2


Zupa

Recommended Posts

  • 4 weeks later...

I keep getting this error whenever I launch my server:

mpmissions\epoch.Altis\ZHB\ZHud.hpp, line 7:

/RscTitles/ZHud/controls.ZHUD_ICON: Undefined base class 'ZHUD_PIC' 

 

I take it that is has something to do with my description.ext so here that is:

author = "Epoch Mod Team";
class Header
{
gameType = Sandbox;
minPlayers = 1;
maxPlayers = 100;
};
respawn = "BASE";
respawnDelay = 600;
respawnDialog = 0;

onLoadMission= "Adam's Awesome Server";
OnLoadIntro = "Welcome to Epoch Mod";
loadScreen = "\x\addons\a3_epoch_assets\pictures\loadScreen_ca.paa";
OnLoadIntroTime = False;
OnLoadMissionTime = False;
onLoadName = "Epoch Mod";
disabledAI = true;
scriptedPlayer = 1;
disableChannels[]={};
enableItemsDropping = 0;
briefing = 0;
debriefing = 0;
enableDebugConsole = 0;
joinUnassigned = 0;
respawnOnStart = 0;
forceRotorLibSimulation = 1;

corpseManagerMode = 1;
corpseLimit = 10;
corpseRemovalMinTime = 1200;
corpseRemovalMaxTime = 3600;

wreckManagerMode = 1;
wreckLimit = 2;
wreckRemovalMinTime = 60;
wreckRemovalMaxTime = 360;

class CfgRemoteExecCommands {};

/////// scarCODE hpp files ///////
#include "scarCODE\global.hpp" // Needed if you use any menu from scarCODE
#include "scarCODE\SAR\main_SAR.hpp" // Remove line if you do not have SAR
//////////////////////////////////
class RscTitles {
    class actionMenuItemShow
    {
        idd = 777;
        duration = 99999;
        name = "actionMenuItemShow";
        onLoad = "with uiNameSpace do { actionMenuItemShow = _this select 0 }";
        fadeIn = 0.2;
    };
    #include "ZHB\ZHud.hpp"
};

class cfgFunctions
{
    /////// scarCODE functions ///////
    class scarCODE
    {
        tag = "SC";
        class SAR // Simple Ammo Repack
        {
            file = "scarCODE\SAR\functions_SAR";
            class sarPackMags {};
            class sarGetData {};
            class loadSAR {};
            class initSAR { postInit = 1; };
        };
        class SRW
        {
            file = "scarCODE\SRW";
            class giveRestartWarning {};
            class restartTimeCheck {};
            class showRestartError {};
            class initSRW { postInit = 1; };
        };
    };
    #include "ZHB\ZHB_Functions.hpp"
    #include "ASORGS\cfgfunctions.hpp"
};

class CfgSounds
{

sounds[] = {};
    
    
        
    
        class cmSalvage
        {
            name = "salvageing";
            sound[] = {"cmSalvage\Sounds\salvage.ogg",1,1};
            titles[] = {0,""};
        };

        class cmReload
        {
            name = "reloading";
            sound[] = {"cmSalvage\Sounds\reloading.ogg",1,1};
            titles[] = {0,""};
        };
        
        class Bam
        {
        // how the sound is referred to in the editor (e.g. trigger effects)
        name = "gunshot";
        // filename, volume, pitch
        sound[] = {"sounds\gunshot.ogg", 1, 1};
        titles[] = {};
        };
};

class CfgEpochClient
{
    buildingNearbyMilitary = 0; //1 to allow building nearby
    buildingNearbyMilitaryRange = 300; //Define radius of blocked area

    buildingRequireJammer = 0; // 1 = to allow building without a jammer
    buildingCountLimit = 200; // how many objects can be built within range of a jammer
    buildingJammerRange = 75; // jammer range in meters
    
    EPOCH_news[] = {"Word is that Sappers have a new boss.","Dogs will often lure them monsters away.","My dog was blown up. I miss him.."};
    
    class Altis
    {
        blockedArea[] = { //[POS],radius
                { { 16085, 16997, 0 }, 250 }, //South Telos
                { { 12844, 16714, 0 }, 120 }, //Soldner Base
                { { 3085, 13184, 0 }, 300 }, //Kavalar Carstel
                { { 13493, 12013, 0 }, 450 }, //Makrynisi (Island)
                { { 17439, 13165, 0 }, 165 }, //Pyrgorsk Military
                { { 20084, 6728, 0 }, 55 }, //West of Selakano
                { { 25303, 21807, 0 }, 100 } //Sofia    
        };
    };
    class Chernarus
    {
        blockedArea[] = {
                { { 10203, 1886, 0 }, 430 }, //South Electro
                { { 6822, 2498, 0 }, 600 }, //Cherno
                { { 4612, 9670, 0 }, 140 }, //NWAF south barack
                { { 4907, 10117, 0 }, 250 }, //NWAF NE hangas
                { { 4707, 10384, 0 }, 200 }, //NWAF north barack
                { { 4069, 10778, 0 }, 75 }, //NWAF west hangas
                { { 4553, 10722, 0 }, 150 }, //NWAF NW hangas
                { { 12279, 9505, 0 }, 350 }, //Berenzino Mid
                { { 12816, 9816, 0 }, 400 }, //Berenzino SE
                { { 12991, 10147, 0 }, 375 }, //Berenzino Docs
                { { 2693, 5138, 0 }, 200 }, //Zeleno
                { { 11467, 7508, 0 }, 150 }, //Polana Factory
                { { 13092, 7096, 0 }, 140 } //Solnichniy Factory
        };
    };
};

class CfgEpochSapper
{
    detonateDistMax = 8; //Random distance between 3m and this number at which sapper detonates. Min value = 4
    groanTrig = 16; //Percentage chance of a groan. Min value = 4
    sRange = 300; //Distance from target over which sapper will dispose. Range within which sapper code will be aware of targets. Distance up to which sapper will attempt to find a spot to hide in. Min Value = 150.
    smellDist = 24; //Distance up to which sapper can smell. Used to decide if sapper can see target when deciding to charge and influences target selection. Is influenced by wind direction. Min Value = 8.
};

class CfgEpochUAV
{
    UAVMinDist = 48; //Minimum distance to choose next position when roaming. Min Value = 8.
    UAVMaxDist = 180; //Maximum distance to choose next position when roaming. Min Value = 42 / Max Value = 400.
    UAVHeight = 100; //Set height when roaming, slight randomness is applied to this value. UAV will choose own height when locked onto target. Min Value = 42 / Max Value = 280. UAV can still spot targets from height !
};

class CfgEpochAirDrop
{
    AirDropFreq = 1200; //AirDropChance, to decide if Air drop occurs, will only be checked once per AirDropFreq time period, for each player. Min value = 120.
    AirDropChance = 6; //Percentage chance of air drop, for current player. Checked every AirDropFreq and upon antagonists spawn trigger. -1 To disable.
};
#include "ZHB\ZHudBuilder.hpp"
#include "ASORGS\menu.hpp"
#include "trader\tradedialog.hpp"
#include "trader\HSPricing.hpp"
#include "addons\halv_spawn\spawndialog.hpp"
#include "addons\paintshop\paintshop.hpp"
#include "scripts\group\groupManagement.hpp"

EDIT: Managed to fix it by putting #include "ZHB\ZHudBuilder.hpp",and #include "ASORGS\menu.hpp" above class RscTitles {

Link to comment
Share on other sites

  • 2 weeks later...

Zupa - I want to put the ZHB folder under an addons folder in the root of the mission.

 

I have edited the description.ext to reflect the new path with the addons path first

and I also changed the path in the fn_initVariables.sqf this:

Z_HUD_imageFolder = "ZHB\gui\"; 

with the addons path first

 

i couldn't find any reference to paths that i may edit in all the files,  however when I start the server I get an infinite loop like that :

Script ZHB\fn_loopHud.sqf not found
22:22:48 Mission epoch.panthera3 read from bank.
22:22:48 Roles assigned.
22:22:48 Reading mission ...
22:22:49 Script ZHB\fn_loopHud.sqf not found
22:22:49 Mission epoch.panthera3 read from bank.
22:22:49 Roles assigned.
22:22:49 Reading mission ...
22:22:49 Script ZHB\fn_loopHud.sqf not found
22:22:49 Mission epoch.panthera3 read from bank.
22:22:49 Roles assigned.
22:22:50 Reading mission ...
22:22:50 Script ZHB\fn_loopHud.sqf not found
22:22:50 Mission epoch.panthera3 read from bank.
22:22:50 Roles assigned.

So the questions are, is there a way to put that folder under another and still work?

Or MUST it be in the root of the mpmission to work?

Link to comment
Share on other sites

Zupa - I want to put the ZHB folder under an addons folder in the root of the mission.

 

I have edited the description.ext to reflect the new path with the addons path first

and I also changed the path in the fn_initVariables.sqf this:

Z_HUD_imageFolder = "ZHB\gui\"; 

with the addons path first

 

i couldn't find any reference to paths that i may edit in all the files,  however when I start the server I get an infinite loop like that :

Script ZHB\fn_loopHud.sqf not found
22:22:48 Mission epoch.panthera3 read from bank.
22:22:48 Roles assigned.
22:22:48 Reading mission ...
22:22:49 Script ZHB\fn_loopHud.sqf not found
22:22:49 Mission epoch.panthera3 read from bank.
22:22:49 Roles assigned.
22:22:49 Reading mission ...
22:22:49 Script ZHB\fn_loopHud.sqf not found
22:22:49 Mission epoch.panthera3 read from bank.
22:22:49 Roles assigned.
22:22:50 Reading mission ...
22:22:50 Script ZHB\fn_loopHud.sqf not found
22:22:50 Mission epoch.panthera3 read from bank.
22:22:50 Roles assigned.

So the questions are, is there a way to put that folder under another and still work?

Or MUST it be in the root of the mpmission to work?

 

https://github.com/DevZupa/ZHB-A3/blob/master/ZHB/ZHB_Functions.hpp

 

In the file i linked you can change where the code is placed.

class functions
	{
		file = "ZHB";
		class loopHud {};
		class initVariables {};
		class activateSettings {};
		class comboBoxes {};
		class disableHud {};
		class handleKey {};
		class openHudBuilder {};
		class toggleHud {};
		class toggleTextHud {};
		class bindKey {};
		class init {postInit = 1;};
	};

This code defines the functions ( as most people would do the following) 

fnc_loopHut = call compile "ZHB/functions/fnc_loopHut.sqf";

The game knows where to look for the files by the file="ZHB"

 

So change that to your folder

class functions
	{
		file = "zupa/subfolder/inthisfolder";
		class loopHud {};
		class initVariables {};
		class activateSettings {};
		class comboBoxes {};
		class disableHud {};
		class handleKey {};
		class openHudBuilder {};
		class toggleHud {};
		class toggleTextHud {};
		class bindKey {};
		class init {postInit = 1;};
	};
Link to comment
Share on other sites

  • 3 weeks later...

Hey zupa, i have igiload installed and that works. As soon as i add this amazing hud, igiload stops working. I don't understand cause i always had both running. u have any idea what could make this happen now?

 

Thanks in advanced...

 

Edit: I just went a different direction wich does work and look exactly as i want!!! So need for this anymore for me

Edited by NuFaN
Link to comment
Share on other sites

  • 4 weeks later...

Try about 20 times but i cant get it how to change from white to green. 

Can you share with green please?

How to change it?

class ZHUD_STRTEXT {
  idc = -1; 
  type = 13;  // defined constant
  style = 0x00;            // defined constant
  colorBackground[] = { 0, 0, 0, 0}; 
  x = 0.1; 
  y = 0.1; 
  w = 0.3; 
  h = 0.1; 
  size = 0.03;
  text = "";
  
};

Not in this place. Color change you must do in ZHud.hpp and not in ZHudBuilder.hpp. Try like that:

Color change for each text placed over icons in bottom placement, you must find all idc from 3300 to 3307 and add color definition like that:

            class ZZHUD_ICONTEXT1000: ZHUD_STRTEXT
            {
                idc = 3300;
                x = 0.2525 * safezoneW + safezoneX;
                y = 0.915 * safezoneH + safezoneY;
                w = 0.0515625 * safezoneW;
                h = 0.055 * safezoneH;
                 class Attributes {
                align = "center";
                valign = "bottom";
                    color = "#ff0000";
              };                
            };

I changed for example to red only three idc's and it works.

2015-09-03_00001.thumb.jpg.a465d01cf1719

Edited by Kenobi
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year 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
×
×
  • Create New...