Jump to content
Sign in to follow this  
kremator

Can Arma3 read the contents of a folder?

Recommended Posts

Hey guys and girls,

I'm interested in seeing if Arma3 can read the contents of a folder. The folder itself would contain .sqf files.

Possible ?

Cheers

Kremator

Share this post


Link to post
Share on other sites

I am interested in this too. Something like this would be nice:

call compile preprocessfilelinenumbers "functions\*.sqf";

Share this post


Link to post
Share on other sites

Not as far as I know.

You can still provide it with an external file-list though. That works just fine.

Share this post


Link to post
Share on other sites

You could make an extension that returns all files listed in directory and then call compile them in forEach.

Share this post


Link to post
Share on other sites

If only I was talented enough to do something like this! I wouldn't even know how to start. I do believe that it would be massively useful however.

Share this post


Link to post
Share on other sites

Indeed, this would be a very useful function to add into CBA.

But considering missions and addons are packed it will be hard or impossible to find and unpack required folder (maybe that's why it hasn't been done yet).

Although you could search for it in Arma's memory, so yes it is possible.

Again but, that would require work and recompile for every new version of Arma, would be better if BIS implemented it into Arma them self =/

I think extensions can only be part of an addons. If they could be inside missions it would make your system vulnerable to anyone you download mission from (every server).

Edited by aeroson

Share this post


Link to post
Share on other sites
Hey guys and girls,

I'm interested in seeing if Arma3 can read the contents of a folder. The folder itself would contain .sqf files.

Possible ?

Cheers

Kremator

What exactly are you trying to do? Do you want to execute an .sqf from a specific folder? If so where is this folder located? Or do you want to list all available .sqf files in a folder without loading them into memory???

Share this post


Link to post
Share on other sites

OK this is what I have in mind. I am using VTS by L'etranger exclusively, but would like to add other functionality in the form of scripts. As it stands presently, every time a new version comes out I have to open the code and add the scripts that I want. So here is the idea. I get a new version, drag the scripts I want into a folder in the mission folder, and (working with L'etranger) have it that an extension queries the files within that folder and has then to be called.

They don't have to be loaded into memory at that point.

I'm prolly talking bollocks but it would be cool if it worked.

Share this post


Link to post
Share on other sites

you can just have a config.sqf file redistributed with new scripts that will contain paths to new scripts if you want drag and drop system. the path to config.sqf is permanent then config.sqf can contain all other configs you need to run new scripts.

Share this post


Link to post
Share on other sites

You have to remember that I'm not a coder and my brain went to mush after a few too many configs there ! Could you give me an example Kid please? What happens therefore if there is a link to a script that doesn't exist in the folder?

Share this post


Link to post
Share on other sites

In the init file of your mission have:

call compile preprocessFileLineNumbers "vtsConfig\customVTSconfig.sqf"

I'm assuming you have bunch of sqf's with custom configs for Live Multiplayer Coop mission editor and you don't want them to spam the root of your mission folder so you have them in a custom folder.

If there is a link to non existent file... Well I think it just says "file *.sqf not found"

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  

×