Jump to content
  • 0

Specifying root mission path


tinboye

Question

I am trying to figure out if there is a way to specify the main path to scripts within mission pbo.

 

For example. 

 

I have the mpmissions\epoch.altis\

folder

 

In there is my description.ext

 

Since the latest epoch update they now have description.ext as:

 

// Epoch Survival Gamemode
#include "epoch_config\sandbox_config.hpp"
 
which the sandbox_config.hpp contains all the description.ext information
 
now I have my description.ext as:
 
// Epoch Survival Gamemode
#include "epoch_config\sandbox_config.hpp"


#include "infiSTAR_AdminMenu.hpp"
#include "addons\halv_spawn\spawndialog.hpp"
#include "addons\halv_spawn\Halv_defines.hpp"
#include "trader\tradedialog.hpp"
#include "CfgMusic.hpp"
#include "global.hpp"
#include "scarCODE\VGS\main_VGS.hpp"

class RscTitles
{

#include "VEMFr_client\gui\hpp_mainVEMFrClient.hpp"
//************************
    class radioChatterBar {
        idd = -1;
        onLoad = "uiNamespace setVariable ['radioChatterBar', _this select 0]";
        onUnload = "uiNamespace setVariable ['radoiChatterBar', objNull]";
        onDestroy = "uiNamespace setVariable ['radioChatterBar', objNull]";
        fadein = 0;
        fadeout = 10;
        duration = 10e10;
        movingEnable = 0;
        controlsBackground[] = {};
        objects[] = {};
        class controls {
            class statusBarText {
                idc = 1010;
                x = safezoneX;
                y = safezoneY; // upper left hand corner
                //x = safezoneX + safezoneW - 1.5;
                //y = safezoneY + safezoneH - 0.4; //H
                w = 1; 
                h = 0.3;  //hopefully makes it 10 lines tall
                shadow = 2;
                colorBackground[] = { 1, 0.3, 0, 0.0 };  // uncomment and increase 4th number to have a 	background
                font = "PuristaSemibold";
                size = 0.03;
                type = 13;// CT_TYPES = CT_STRUCTURED_TEXT
                style = 1;
                text="Loading server info...";
                class Attributes {
                    align="left";
                    color = "#FFFFFF"; //"#00FF09";BrightGreen   //#FF8700
                };
            };
        };
    };
//***********************************
};

class CfgSounds
{
	#include "HC\Zombies\infectedsounds.hpp"
	#include "Configs\CfgSounds.hpp"
};

//ESVP
class CfgNotifications 
{
	#include "SPKcode\ESVP\notifications.h"
};

when I try to load my mission i get the error:

ErrorMessage: Include file mpmissions\epoch.Altis\epoch_config\VEMFr_client\gui\hpp_mainVEMFrClient.hpp not found.

 

so what i want to do is have it so i can specify the location of the 

#include "VEMFr_client\gui\hpp_mainVEMFrClient.hpp"

 

I have tried 

#include "..\VEMFr_client\gui\hpp_mainVEMFrClient.hpp"

 

or

 

#include ".\VEMFr_client\gui\hpp_mainVEMFrClient.hpp"

 

to tell the script to look in previous folder for the VEMFr_client folder but it doesnt recognize any change.

 

So is there a variable to use like

#include "x\VEMFr_client\gui\hpp_mainVEMFrClient.hpp"

#include "q\VEMFr_client\gui\hpp_mainVEMFrClient.hpp"

#include "z\VEMFr_client\gui\hpp_mainVEMFrClient.hpp"

#include "m\VEMFr_client\gui\hpp_mainVEMFrClient.hpp"

 

in the path to make the script be recognized in the root of the mission folder.

 

thanks

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

But to reply to your question changing the file path is as easy as it looks

Server Root

call compile preprocessFileLineNumbers '\NameOfYourModFolderInTheRoot\init.sqf';

Server Pbo

Quote: the \z\addons.... structure Rocket used for DayZ is useful when packing models into an addon (ACE uses the same structure - they use \x\addons...). It means you can integrate and binarize new models/pack new data without having to repack and repath the whole mod. (If I understand it correctly).

call compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\setup_functions_med.sqf";    //Functions used by CLIENT for medical example from arma2 init.sqf calling from the server.pbo

And calling from the mission pbo inside a folder everyone already knows

call compile preprocessFileLineNumbers "foldername\filename.sqf";

execVM "foldername\foldername\filename.sqf";

mission.pbo root

call compile preprocessFileLineNumbers "filename.sqf";

execVM "filename.sqf";

Link to comment
Share on other sites

  • 0

This is my init.sqf file i made for my arma3 servers.

//init.sqf

//Load in compiled functions
call compile preProcessFileLineNumbers "cmEarplugs\config.sqf";
progressLoadingScreen 0.1;

progressLoadingScreen 0.2;

progressLoadingScreen 0.3;

progressLoadingScreen 0.4;

progressLoadingScreen 0.5;

progressLoadingScreen 0.6;

progressLoadingScreen 0.7;

progressLoadingScreen 0.8;

progressLoadingScreen 0.9;

progressLoadingScreen 1.0;

if (isDedicated) then {
    //run on dedicated server only
};

if (isServer) then {
    //run on dedicated server or player host
};

if (hasInterface) then {
    //run on all player clients incl. player host
    [] ExecVM "VEMFr_client\sqf\initClient.sqf"; // Client-side part of VEMFr
    [] ExecVM "Status_Bar\init_statusBar.sqf"; //Status Bar With Icons & Server FPS display v1.36    
};

if (!isDedicated) then {
    //run on all player clients incl. player host and headless clients
    [] ExecVM "briefing.sqf";
};

if (!isServer) then {
    //run on all player clients incl. headless clients but not player host
};

if (!hasInterface) then {
    //run on headless clients and dedicated server
};

if (!hasInterface && !isDedicated) then {
    //run on headless clients only
};

Link to comment
Share on other sites

  • 0

it has something to do with how epoch compiles the mission.

being that the actual description.ext data is now in sandbox_config.hpp which is within epoch_config folder.

So by having scripts within the root of the epoch.altis folder, and the description loading within epoch_config, no matter what you specify for the path of the script, if the scripts are not placed within epoch_config folder as well, then they will give the error.

So what I ended up having to do, is I moved sandbox_config.hpp and the Configs folder outside of epoch_config folder.

then the scripts loaded fine.

Link to comment
Share on other sites

  • 0

Oh i see what you mean now lol soz this is what i do and everything runs the way it should all default no files had to be moved

My

description.ext

// Epoch Survival Gamemode
#include "epoch_config\sandbox_config.hpp"
#include "infiSTAR_AdminMenu.hpp"
class RscTitles
{
    #include "VEMFr_client\gui\RscDisplayVEMFrClient.hpp"
    #include "Status_Bar\statusBar.hpp"
};

 

 

Link to comment
Share on other sites

  • 0

so what i want to do is have it so i can specify the location of the 

#include "VEMFr_client\gui\hpp_mainVEMFrClient.hpp"

if you wanted to call the file hpp_mainVEMFrClient.hpp  from mission root

#include "hpp_mainVEMFrClient.hpp"

if you wanted to call the file hpp_mainVEMFrClient.hpp  from mission root then say "custom" folder but still have the file inside the VEMFr_client folder the gui folder

#include "custom\VEMFr_client\gui\hpp_mainVEMFrClient.hpp"

 

Link to comment
Share on other sites

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
  • Advertisement
  • Discord

×
×
  • Create New...