FromFile functions

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

FromFile functions

Post 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?
pipfromslitherine
Site Admin
Site Admin
Posts: 9923
Joined: Wed Mar 23, 2005 10:35 pm

Re: FromFile functions

Post 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
follow me on Twitter here
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

Re: FromFile functions

Post 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?
pipfromslitherine
Site Admin
Site Admin
Posts: 9923
Joined: Wed Mar 23, 2005 10:35 pm

Re: FromFile functions

Post by pipfromslitherine »

No. there are no writing functions.

Cheers

Pip
follow me on Twitter here
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

Re: FromFile functions

Post 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?.
pipfromslitherine
Site Admin
Site Admin
Posts: 9923
Joined: Wed Mar 23, 2005 10:35 pm

Re: FromFile functions

Post 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
follow me on Twitter here
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

Re: FromFile functions

Post 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.
pipfromslitherine
Site Admin
Site Admin
Posts: 9923
Joined: Wed Mar 23, 2005 10:35 pm

Re: FromFile functions

Post 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
follow me on Twitter here
Post Reply

Return to “Battle Academy 2: Modders Corner”