I've been trying to include fairly large volumes of external files into my project's exe that are loaded at runtime via expressions, like generating backdrops or loading tilesets from PNG files, or level INIs and data. After testing the binary data extensively and looking up all the guides and threads, it really doesn't look like it works properly. I made sure I had proper syntax extracting files, loading them from the temp file address, releasing them on app close, etc- and no matter what permutation of where the build path was or data path was really worked, the compiled .exe would still care what folder it was in compared to the absolute path of the files that didn't exist, which is a big no-go. A lot of attempts came up with similar results as other people have reported in other threads, it didn't work at all.
But the "include external files" option seems to work just as expected. Any files in the same path as the MFA/EXE build folder can be compiled into the exe and will extract as temp files and reference them just fine in the code on other machines regardless of exe location, looks great. Except one huge limitation- this feature is limited to only static file paths and doesn't work with interpreted strings. I can for example have a line that says
>Load image "C:/Dev/Images/Sword_01.png"
but I cannot have a line that says;
>Load image "C:/Dev/Images/" + image_name + ".png"
I understand the compiler may be flagging static paths to included files and aliasing them for those included in the .exe build, but my question is: Could a feature be added to allow a check at runtime whether an expression matches an included file, and if so, use that instead of looking for an external file? This might require some iterating string comparison and be less optimal, so it could be an optional checkbox. But would it be technically possible? I mean something like taking the string after its resolved and compare it to the original external file path (not temp path) of included files, and if it matches one, load from the temp path of that file instead.
Its possible to include large numbers of external files without a direct reference in an application's main code by just slapping some deactive dummy code into a spare frame or level that tells an active picture object to load 500 different images or whatever, that's a simple enough solution to make them included without any interface for including external files like data elements allow. But without expressions, the only way to load them in via static paths would be.... creating an absurdly long switch statement kind of code that loads each direct asset based on an input index, like;
>* On loop "load image"
>>* If image_name = "Sword_01"
>>= Load image "C:/Dev/Images/Sword_01.png"
>>* If image_name = "Sword_02"
>>= Load image "C:/Dev/Images/Sword_02.png"
>>* If image_name = "Sword_03"
>>= Load image "C:/Dev/Images/Sword_03.png"
performance aside, that's a bit problematic when I already have 358 external files of various types and will probably wind up 700+