Reading and Writing Files on Xbox (possible with WASM?)

Hi, I have some coding experience but I haven’t used WASM or coded for Xbox
before. I’m interested in what’s possible with regards to reading and writing
to files on XBox. Am I right in thinking that you can only write values (e.g.
SimVars) collected at runtime to a file within the WASM sandbox and can’t read
from a preloaded database either? E.g. on PC I could write a DLL that reads
and writes from/to a DB that I ship with the product but I can’t do this on
Xbox, correct? Thanks for any clarification.

Hi @DedicatedDev, Be it on PC or Xbox, you cannot write to files distributed
within your package - however you can copy them to the “work” (sandbox) folder
upon first launch and then read/write to the copied file (many add-ons work
like this). As for using a DB, I suppose it all depends on what you want to
use: would it be some kind of custom DB you wrote yourself or are you planning
to use a more common kind of DB? If the latter, you must ensure that either
you have access to the source code and it compiles fine to WASM (by including
the appropriate files to your project), or that a static WASM lib is available
to be linked with your project. We haven’t tried it ourselves but I suspect
SQLite would be a good candidate for that kind of things. Please let us know
if you need more information on this topic. Best regards, Eric / Asobo