Page 1 of 1

FromFile functions

Posted: Wed Apr 29, 2015 10:52 am
by enric
I can't find any info in the wiki about these functions
FromFileOpen(filename)
FromFileGetValue(fileID, chunk, tag)
etc.

Am I missing the place or is not in the wiki all features list?

Re: FromFile functions

Posted: Wed Apr 29, 2015 3:37 pm
by pipfromslitherine
I don't think they are documented in the wiki, just in the autodocs. I assume because I didn't have much else to say. They are general functions for reading in data from a parser-format file (such as used by the UI system).

Cheers

Pip

Re: FromFile functions

Posted: Sat May 02, 2015 9:21 am
by enric
I see all fromFile functions are for open and getting data from a file, but, is there a way to write to a file from a script?

Re: FromFile functions

Posted: Tue May 05, 2015 3:25 pm
by pipfromslitherine
No. there are no writing functions.

Cheers

Pip

Re: FromFile functions

Posted: Tue May 05, 2015 4:35 pm
by enric
What about the posibility to add to BA a call to functions included in a compiled library, like a plugin, but not one made with the scripting BA system but with any compiled lenguage and so having acces to OS managers?.

Re: FromFile functions

Posted: Tue May 05, 2015 5:07 pm
by pipfromslitherine
I have considered that, but it has security implications, and it wouldn't work on iPad. What exactly are you trying to do?

Cheers

Pip

Re: FromFile functions

Posted: Tue May 05, 2015 5:29 pm
by enric
I try to dynamically, in a MP scenario begin side at random.
In fact I got it with scripting, but the End turn sometimes show the wrong side, also the arrow on top of unit sometimes is wrong, I need spending more time to test why.

If I were able to write a text file maybe I could put a SIDE.TXT file in the scenario and then, dynamically change that file.

Another thing
I also would like to suggest you to leave some (how to explain it...) parts free for mods in a way that they will no be overwritten by new BA versions.
For example:
in the squads.csv, why not define some ID numbers from (for example 700-799) for users scenarios, so they will never be used by BA core campaigns?
Recently I added a mod to know if a unit is in indoors to avoid mortar firing from here, I did it using an additional COVERVALUE4
Usually COVERVALUE4 did not exist but if in the near future you use it, my scenarios will have a problem, so why not define some indexes for user use.
I hope you understand my idea.

Re: FromFile functions

Posted: Wed May 06, 2015 4:55 pm
by pipfromslitherine
There is always the possibility of new updates breaking mods (especially ones which push the envelope!) but it is a good point and I will try and make it more tolerant.

I see what you are trying to do. Sadly not possible currently.

Cheers

Pip