How do I find how to use Steam Cloud with Construct 3 Local Storage?

0 favourites
  • 14 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Hi. I'm using Local Storage to save information about players' playthroughs and I'm planning on releasing my game on Steam. The saving/loading works perfectly, however, I can't find any information on where to look for the save file on the local hard drive?

    The C3 documentation just says "The Local Storage plugin can store data locally on the user's device" but it doesn't say where it does on PC, for example.

    construct.net/en/make-games/manuals/construct-3/plugin-reference/local-storage

    I've found a similar discussion here, but it looks like the developers could not find the solution:

    construct.net/en/forum/construct-3/how-do-i-8/work-steam-cloud-local-storage-156203

    Here people discussed a bit further on how to link Steam Cloud with a save file, but still - no data on where the save file may be located:

    construct.net/en/forum/construct-3/how-do-i-8/work-steam-cloud-local-storage-168613

    Please help, thanks!

    Tagged:

  • So here is what you can try. You can, using NW.JS object - create a save file in BinaryData and then use a BinaryData file as a save. It is difficult to use, but I think is possible. And exported project have to be in NW.JS, which takes a lot of additional space.

  • So here is what you can try. You can, using NW.JS object - create a save file in BinaryData and then use a BinaryData file as a save. It is difficult to use, but I think is possible. And exported project have to be in NW.JS, which takes a lot of additional space.

    That would require me to remake ALL of my saving system (and I save like hundreds of different values). It took me several weeks to make it right. If that's what it takes - I'm better off without Steam Cloud saves whatsoever.

    But doesn't ANYBODY knows where Local Storage saves are located? It would be much simpler, I think, to just tell Steam Cloud the location of the file. Or am I missing something?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I could be mistaken, but: w3schools.com/html/html5_webstorage.asp

    https://blog.logrocket.com/localstorage-javascript-complete-guide/

    Thanks, but I'm not really sure how that helps, maybe there is miscommunication between us. I'm saving my game via Local Storage(!) object and building my game via NW.js (PC build). I need to know where the Local Storage object saves the files with a player savegame. I'm not(!) releasing my game by HTML build.

  • But NW.JS is technically A browser

  • But NW.JS is technically A browser

    UPDATE. A friend of mine helped me to determine some of the path, but I can't determine which one is the exact NW.js save file. The path on my PC is:

    C:\Users\Andrew\AppData\Local\LawsOfNadragia\User Data

    However, there are a lot of files there. I think I've found the save file I made when I was using Google Chrome while I was testing Local Saving through the browser. The path is to the 000003.log file which certainly has the values I've been saving (if you open it by notepad). But it's Chrome, can't find NW.js yet...

  • Check the files of NW.JS folder, could be

  • Check the files of NW.JS folder, could be

    UPDATE-2: it seems that, despite the folder having a "chrome-extension_ccnecb..." name, the 000003.log IS ACTUALLY the save file (when I try to Delete it - the error pops up, saying that NW.js is using this file; and everytime I save my game in the NW.js build - the date of the file is changing). So it seems that NW.js is somewhy using chrome saving system. Maybe because I have this browser as a default?

    ...But that means that I not only have to figure out the user's name but also somehow know what browser is he using. That's terrifying... I'm not sure how to do that or if that even can work. I guess I'll have to give up on Cloud saving =(

    UPDATE-3: So a friend of mine told me that NW.js may actually be using chromium (thus the extension in the file name). I'll try using this existing path and see if it works

  • NW.JS is chromium based, not exactly chrome. And any way for every user path would be unique

  • NW.JS is chromium based, not exactly chrome. And any way for every user path would be unique

    Because of the user name, yes. But Steam knows that and he skips that right to the "\AppData\Local\" part, which would be the same for all users. So it should be fine

  • Oh, I'm thrilled to have stumbled upon this topic; I'm facing a similar issue with Steam cloud save. I'm curious, have you managed to resolve your problem, did you find location of the save file? Any advice would be greatly appreciated."

  • Yes, I did. Saves made during testing your project online in Construct 3 ("Play") are saved based on your browser. For chrome: C:\Users\USERNAME\AppData\Local\PROJECTNAME\User Data\Default\Local Storage\leveldb

    For nw.js export the path is always the same, since nw.js uses Chromium (chrome browser sub-engine). It can be located here: C:\Users\USERNAME\AppData\Local\PROJECTNAME\User Data\Default\IndexedDB\chrome-extension_ccnecbdlmggdebaobiodilckckknoohl_0.indexeddb.leveldb

    The last part with some unrecognisable pattern of letters, seems to be generated based on your project (name, possibly). To easily get to Appdata simply write %appdata% in your windows explorer (since appdata is usually hidden for users on most pc's).

    The main file that is being save is called "00003.log", all the data you're trying to save via Local Storage is being saved there. One problem is - each time you save - this 00003 file will get a bit bigger. That's because Local Storage does not seem to rewrite saved data - it is adding new lines in the document and Construct 3 uses the last "save" (hence - the file is getting new information and is getting bigger each time the save is done; in my example - about 60 kilobytes of data is added each time).

    Another important thing is: after "00003.log" get's to around 1Mb, it creates "00004.log" in the same folder and starts to write there instead (same with 00005, 00006, etc.). Each file contains a a lot of saves though (about 70 in my example) so I would not worry too much about the size of the file, unless your game saves like every 1 minute.

    So instead of saving just 00003.log, I recommend to save the whole folder containing it (and other 0000X+.log files) in Steam Cloud by using the "*" instead of the exact file name to save. Worked for me.

    PS: Oh, yeah. And this save location is the same for your demo-version, so it's best to sync demo-version and full-game saves in Steam if you want the players that tried out the demo version to continue playing from the saved spot in the full game.

  • This is brilliant. No idea why there isn't a tutorial about this?

    Anyone know where the save files are saved on the Steam Deck?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)