Jump to content
Sign in to follow this  
boosterchen

how to use functions in the root of a campaign

Recommended Posts

Hi,

 

Actually i'm working on a campaign. Everthing works pretty well so far, but was thinking to change current structure as I want to move some functions out of the mission folder in order that these can be used by other missions as well without copying them to every mission again. ... that's were the problem started...  I tried several ways to achieve that but none of the methods i used seem to work...

 

I am using the standard 'ShowOSD' function. For this, i have created a configfile:

 

cfgFunktion.hpp in  'Campaigns\DM_BST\config' which contains the classes:

(cfgFunktion.hpp is included in the description.ext of the current mission: #include "\Campaigns\DM_BST\config\cfgFunktion.hpp"

 

 

class CfgFunctions

 

{

class DM{

 

 

    class intel 

    {

        class showOSD { file = "intel\fn_showOSD.sqf"; };

    };

};

};

 

 

the function fn_showOSD.sqf (which is the standard function of Jiri Wainar) i have it in a subfolder within the the mission folder ->  xHub01.Stratis\intel

 

from a customer script (within the missionfolder), the function then gets called  using    [] spawn DM_fnc_showOSD;

 

So far everthing works as it should!   :D   but....

 

 

when I try to put the function (fn_showOSD.sqf) outside of the missionfolder eg into:  Campaigns\DM_BST\functions\intel\

 

and adopt the path in the cfgFunktion.hpp for the function showOSD to the new location, eg:  class showOSD { file = "Campaigns\DM_BST\functions\intel\fn_showOSD.sqf"; };

 

when I launch the mission the showOSD function dosen't work. Also, what need to be considered when putting something outside of the current missionfolder within a campaign?

 

would really appreciate to get some help here....

 

Boosterchen

Share this post


Link to post
Share on other sites

Hey IndeedPete

 

No,  I don't think so...  could you let me know more about that? how to.... ?

 

btw: I really enjoyed you big campaign M.E.R.C.S !! :jump_clap:

Share this post


Link to post
Share on other sites

With one of the recent updates BI disabled automatic file patching. That means that only files inside proper addon PBOs will be read and processed by the game. What happens in your case is that you try to access script files in a loose folder, your WIP campaign folder. The game recognises your functions library (as #includes still seem to work) but fails to load the .sqf files due to file patching being disabled by default. Run your game with the -filePatching param and see if it helps. Also check the functions library in the editor. If you can find your functions' names there but not the function bodies, it's most likely that file patching issue.

  • Thanks 1

Share this post


Link to post
Share on other sites

Hey IP

 

You are the man !!!  That works !!

 

... i guess  there in no altenative solution to it?   either create PBO or start with ARMA3.exe - filePatching parameter?

 

 

 

Thanks a lot for your help and the prompt responses!! Looking forward to your next campaign :)  hopefully soon.

 

Boosterchen

Share this post


Link to post
Share on other sites

No, there's not. But on release, you hopefully have a packed PBO so players won't have to add that parameter.^^

 

Ah, thanks, next year probably. :D

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×