Hello!
Does anyone know if the .js DataStore persistant storage API works on XBOX for
.js apps as well?
I’ve written a UI utility addon <Digital Transformation Consulting - Sonicviz
manager>/ that uses DataStore for a couple of features on PC (it’s great!) and
I’m trying to assess whether this will also work on XBOX as is, or it will hit
hurdles when/if it gets to testing.
Can’t find any documentation on this (though I see some is coming on the UI
side in SU12), and I don’t wish to assume anything. Related on the UI front,
does anybody know if there is much usage of KBM on the XBOX?
I know MSFS officially supports KBM, I’m just wondering how much of the XBOX
player base use them as well as controllers.
Thanks! #UI #DataStore
Anyone have any experience with javascript on XBox?
@sonicviz, The JS Datastore writes to the savegame which is cloud synced. I
don’t believe there are restrictions to it on Xbox. One piece of advice:
Writing too much data into one key:value pair can corrupt the savegame. I
don’t know the exact limit but I would try to stay under 200 characters per
value to be safe
Thanks for the details. >>One piece of advice: Writing too much data into one
key:value pair can corrupt the savegame. I don’t know the exact limit but I
would try to stay under 200 characters per value to be safe Is that an
Asobo or Microsoft unknown? Do you mean corrupt savgame on both XBox and PC,
or just XBOX? I assume you mean both as it’s using the same cloudsave
mechanism I guess, but I don’t like to assume anything anymore! Is it possible
to get more clarity on the character limit? Always nice to know the exact
limits and constraints, but I can stay under that.
By savegame do you mean everything or only the key that was being saved?
Hello @sonicviz I ran some tests with keys and values exceeding 256 characters
and didn’t notice any problem so I’d say there’s no known limitation. Let us
know if you encounter any issue. Regards, Sylvain
@FlyingRaccoon Thanks for testing! I did run stress tests of about 300 keys
with 1000 character values (just random data gen) and did not encounter any
issues, but that’s not to say I won’t once it’s in the wild. Users do
unanticipated things. I thought 300 was enough, but then one test user popped
up with ~488 aircraft in his collection. Maybe I’ll bump it up a little from
the 200 ch you initally advised then, but not too much. Thanks again.
Before building our products I tested it up to 1Mb without issues. That being
said, putting a reasonable cap on it would make sense to prevent abuse.
Interesting. Maybe it is not an issue anymore. It was about two years ago we
had this happen to us, so maybe something changed in the meantime.
@runshotgun Sounds logical, and good risk management. Edit: fixed issue with
dataStorage initialisation in flight mode issue I was having with toolbar
extension for https://sonicviz.com/2023/01/30/location-manager-for-msfs/ ,
so deleted that long winded explanation I made on it. It seems in flight mode
it takes a little longer for onStorageReady and I had to change the order of
data initialisation for my UI. Onwards and upwards!
@FlyingRaccoon The referenced link below says all three Simvars are settable
in ft (link below), but from my testing it appears PLANE ALTITUDE is working
in metres, not feet. I’m also not sure if the two AGL ones work properly.
Could you please confirm if this is so? Thanks!
- PLANE ALTITUDE
- PLANE ALT ABOVE GROUND
- PLANE ALT ABOVE GROUND MINUS CG
ref:
https://docs.flightsimulator.com/html/Programming_Tools/SimVars/Aircraft_SimVars/Aircraft_Misc_Variables.htm
Hello @sonicviz Please post in a dedicated question as this has nothing to do
with JS DataStore on Xbox. Tag me and I’ll answer you there. Regards, Sylvain