Cache clearing guide v3: fix performance, crashes, lag, stuttering, and fix saves that don't update.

2

Comments

  • MyrmMyrm Sweden Join Date: 2015-08-16 Member: 207210Members
    0x6A7232 wrote: »
    Err.

    Take 2 (somehow I didn't remove the correct sentence when I copy-pasted, brb)

    Err.

    Reads better now.
  • Gourmet_GuyGourmet_Guy Ohio Join Date: 2016-06-16 Member: 218647Members
    edited December 2016
    Question about the IGP video. Is this just how you keep terrain from entering your base after update, or is this the way to fix lag, stuttering, and crashes?
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Question about the IGP video. Is this just how you keep terrain from entering your base after update, or is this the way to fix lag, stuttering, and crashes?

    It's how to fix lag, stuttering, and crashes by clearing cache. Unfortunately, terrain cache also stores what dirt has been cleared by bases. So you have to not clear those locations (or, alternatively, clear everything, spawn a terraformer, and re-clear the dirt).
  • SniperKirbySniperKirby Germany Join Date: 2016-12-26 Member: 225508Members
    Thanks for the guide. Clearing the caches helped allot but for now I only went back to my base. It really bothered me to be "stuck" in open water. Now it feels much better to be back in my base. Didn't have to clear much dirt after it, too, as I try to build my bases around terrain, not through it. And now the foundations I used to just expand my base clip into the terrain what looks much nicer in my opinion :smile: Maybe the devs could add the option to turn of terra forming while base building. I would certainly like that.

    I don't think I'm gonna play much more for now, as long as the problem isn't fixed by the devs as I don't want to exploit respawned recourses.
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Terraforming is actually (eventually) being completely removed. ;)
  • FrustratedFrustrated Join Date: 2016-11-04 Member: 223643Members
    edited December 2016
    Perfect :) 'Cache files' is repeated a bit too often perhaps, maybe: 'except the ones that contain modified terrain data.'

    I didn't do the control-click thing in the video, I had too many. Instead, I made 3 desktop folders (main, cells and optoctrees), and put the modified terrain files in these. Then, I just deleted all the cache files in the three 'live' savegame folders, and copied back the ones I wanted to keep from my desktop folders. This way, I always have the modified terrain files since those will never change. It makes it easy just to delete the games ones, and copy back in future.

    The only thing I have to do is if a modify any 'live' terrain, to update the files in my 3 desktop folders - much quicker than the video if you have a lot of changed terrain.

    PS, the last update fixed the terrain not loading.
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Frustrated wrote: »
    Perfect :) 'Cache files' is repeated a bit too often perhaps, maybe: 'except the ones that contain modified terrain data.'

    I didn't do the control-click thing in the video, I had too many. Instead, I made 3 desktop folders (main, cells and optoctrees), and put the modified terrain files in these. Then, I just deleted all the cache files in the three 'live' savegame folders, and copied back the ones I wanted to keep from my desktop folders. This way, I always have the modified terrain files since those will never change. It makes it easy just to delete the games ones, and copy back in future.

    The only thing I have to do is if a modify any 'live' terrain, to update the files in my 3 desktop folders - much quicker than the video if you have a lot of changed terrain.

    PS, the last update fixed the terrain not loading.

    Make a new folder in your saved game slot called bases, and stick them in there. (the main txt files, and the two folders, and name the folders exactly the same as the ones they cam from).

    Then you can use my batch file to automate the process.

    Alternatively, someone made a program with a GUI to do all of this easier as well (I put a link in the OP here as well as in my batch file post).
  • apaseallapaseall Join Date: 2016-12-19 Member: 225174Members
    Are we certain that the folder C:\Program Files (x86)\Steam\SteamApps\common\Subnautica\SNAppData\SavedGames\slot0000 contains ALL the data for a saved game ?
    I ask because I copied that folders contents and removed the game from my pc.
    I also manually deleted all the remaining folders.
    When I reinstalled experimental I seem to have gone back in time quite a while, as my third base was not present at all.
    Neither copying over the top of the few files related to my bases or the complete folder returned my third base to me.
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    apaseall wrote: »
    Are we certain that the folder C:\Program Files (x86)\Steam\SteamApps\common\Subnautica\SNAppData\SavedGames\slot0000 contains ALL the data for a saved game ?
    I ask because I copied that folders contents and removed the game from my pc.
    I also manually deleted all the remaining folders.
    When I reinstalled experimental I seem to have gone back in time quite a while, as my third base was not present at all.
    Neither copying over the top of the few files related to my bases or the complete folder returned my third base to me.

    Yes. However, you might be running into Steam syncing saved games (not sure if it does that or not).

    The four files that contain your personal inventory, base(s), lockers, vehicles, unlocks, etc are (in the top level of the slot00xx folder):
    0x6A7232 wrote: »
    • gameinfo.json
    • global-objects.bin
    • scene-objects.bin
    • screenshot.jpg (<- that's the little thumbnail showing you a preview of the save when you go to load)

    ZOMGWTFBBQ! In case I wasn't clear, I'll repeat: these four data files have your actual saved game progress, DO NOT UNDER ANY CIRCUMSTANCE DELETE THESE!! If this freaks you out, hey, take it easy, just back up these files or the entire saved game slot folder first. ;) Better safe then sorry, right?

    Everything else in the folder and sub-folders is for terrain, and things done to the terrain, to include resources that terrain has.
  • apaseallapaseall Join Date: 2016-12-19 Member: 225174Members
    Thanks for the reply. Yes I am using Steam, on windows. I will have to keep a closer eye on things. Looks like I will be using the console to rebuild the missing base. Guess it had to start at sometime. lol.
  • FrustratedFrustrated Join Date: 2016-11-04 Member: 223643Members
    Mine has always saved in slot0003. Have you checked your other saved folders?
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    edited December 2016
    Found this thread over on Steam, the very interesting part is the developer reply afterwards (by LumpN): {{The consensus of the whole thread was that some people had relief from crashing by deleting that one file, whereas others did not.}}

    https://steamcommunity.com/app/264710/discussions/0/154644787622360894/?ctp=2#c154644928866890353
    Originally posted by LumpN:
    Originally posted by BoredJedi:
    I painstakingly went through each files in the CellCache and CompiledOctreesCache by deleting, running the game and restoring the deleted files. Seems there is just one file that's in the center of this lag and crash issue. If you don't want to reset the terrain and resources, just delete this file....

    baked-batch-cells-14-18-15.bin In the CellsCache. In the SavedGames directory.

    Thanks for the tip, we'll investigate. By the way, even though we hardly ever reply, we do read the forums all the time and hints like this one are very helpful to us. Please keep in mind that it might take a very long time to find and fix the underlying issue though.

    In the meantime I can provide a little background information about these files.

    The CellsCache folder contains data about all the entities (plants, creatures, loot, etc.) in batches the player has seen. If a player never visits batch 14-18-15 then there won't be a file about it in that saved game.

    The CompiledOctreesCache contains terrain data only. Terrain data almost never causes issues unless one of the files gets corrupted while writing which may result in missing terrain.

    If a saved game runs slow at certain coordinates while a new game runs fine at the same coordinates then there is a fair chance that there is an issue with the CellsCache. The other potential culprits being the batch, global, or scene objects. You don't want to mess with the latter two though, because they contain all your built subs, bases, and items.

    By the way the warp command to go to that batch is "batch 14 18 15". Batch numbers are always positive. The dashes are added to the filename for readability only.

    So as I said, thanks, we'll add this to our long list of issues to investigate, which you can find on our Trello board. https://trello.com/b/eLEWpq3P/subnautica-playtesting

    EDIT: Asked LumpN what the batch-objects-xx-yy-zz.txt files in the main slot directory did, response:
    Well, they contain batch objects. We don't really use them anymore but they are kept for legacy data.
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Edited above post.
  • NachoboyNachoboy Join Date: 2016-12-30 Member: 225727Members
    seems like a possible side effect of clearing cache is everything stops spawning besides natural resources (like kelp and coral tubes). I cleared my cache and the game was blazing fast but the entire game was empty. No debris, no blueprints, no fish, no resources besides the nodes and natural things, certain items didnt spawn until i waited 25 seconds near them (mainly the deep shrooms).

    Clearing the cache again fixed everything. Not sure if it was because i didn't exit the game prior to clearing it or what, it might have also been because i used the "Freecam" to check some precursor stuff out. I used that command earlier before clearing cache as well, and it caused my game to corrupt in the lava zones. I wasn't able to save anywhere nearby and if i went 1/2 to the castle it would corrupt the entire map which included me not being able to save or exit the game. May be a bug with traveling too fast and the cells becoming corrupt by loading/unloading too fast.
    Thanks for the tutorial! Was definitely helpful and well worth it ;)
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Nachoboy wrote: »
    Not sure if it was because i didn't exit the game prior to clearing it or what

    Yes.
  • Gourmet_GuyGourmet_Guy Ohio Join Date: 2016-06-16 Member: 218647Members
    Just to make this simpler for myself... All I need to do is delete the numbered batch files in each folder EXCEPT for the ones where my base is located? Any other steps??
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Correct. There's actually a tool linked in the OP (the one by foxxyfox) that lets you do this using a graphical interface instead of manually sorting through the files.

    Or, you can delete ALL the cache files, and use a terraformer to clear out the dirt after you do. (Then your base cache files get cleaned as well).
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Just be sure not to touch the four main files:
    Make sure you do not delete the following four files:
    • gameinfo.json
    • global-objects.bin
    • scene-objects.bin
    • screenshot.jpg (<- that's the little thumbnail showing you a preview of the save when you go to load)

    ZOMGWTFBBQ! In case I wasn't clear, I'll repeat: these four data files have your actual saved game progress, DO NOT UNDER ANY CIRCUMSTANCE DELETE THESE!! If this freaks you out, hey, take it easy, just back up these files or the entire saved game slot folder first. ;) Better safe then sorry, right?
  • Gourmet_GuyGourmet_Guy Ohio Join Date: 2016-06-16 Member: 218647Members
    So I deleted the files. do i just re enter the game, or do i verify me cache first?
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Just re-enter the game, there are two things being referred to as 'cache' here:

    1) Subnautica's terrain cache, which you just cleared, and which will be automatically regenerated on game load if not present.

    2) Steam also refers to a game's installation files as 'game cache' for some reason... whatever, it's actually the program files the game uses to run, so I think that's sort of inaccurate. If a game is having recurring issues, verifying this cache (basically re-installing only pieces of the game that aren't in spec) will sometimes fix them. Note, however, that any 3rd party mods not installed by Steam will probably be reverted to default behavior (just re-apply the mod).
  • RebonsRebons Join Date: 2017-01-07 Member: 226265Members
    I did the cache clearing yesterday and makes the game perfectly fine. As I open the game today, the save file has a tag "Damaged Save File" and when I go into it, the terrains are missing and it seems like my condition is reverted back to the beginning of the game, but without fabricator and radio in Livepod 5
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Rebons wrote: »
    I did the cache clearing yesterday and makes the game perfectly fine. As I open the game today, the save file has a tag "Damaged Save File" and when I go into it, the terrains are missing and it seems like my condition is reverted back to the beginning of the game, but without fabricator and radio in Livepod 5

    Your essentials (bases, inventory, position, etc) are not saved in the cache files. You could try clearing the cache again, but if any 3 of the important files are damage, I'm not sure what you can do.
    0x6A7232 wrote: »

    Make sure you do not delete the following four files sitting directly in the slot00xx folder:
    • gameinfo.json
    • global-objects.bin
    • scene-objects.bin
    • screenshot.jpg (<- that's the little thumbnail showing you a preview of the save when you go to load)

    ZOMGWTFBBQ! In case I wasn't clear, I'll repeat: these four data files have your actual saved game progress, DO NOT UNDER ANY CIRCUMSTANCE DELETE THESE!! If this freaks you out, hey, take it easy, just back up these files or the entire saved game slot folder first. ;) Better safe then sorry, right?



    Are you on experimental, or stable (42313 Dec '16)?
  • RebonsRebons Join Date: 2017-01-07 Member: 226265Members
    I've checked all 4 files and they are all still in there. The game is stable I believe, it has that code 42313 December 2016 at the home screen
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    You could see if changing to experimental will let you continue; if not, you may have a corrupted save (which is stored in 3 of those 4 files).

    You could also try running chkdsk on the drive holding Subnautica (see my signature below if you're not sure how to do that).
  • LeafCloakLeafCloak Virginia Join Date: 2017-02-07 Member: 227714Members
    To anyone who can help:
    I've tried everything I can to get my game to stop lagging, I'm getting consistently 3 frames now while I use to average around 80.

    Already tried:
    •Restarting Subnautica
    •Restarting Computer
    •Deleting ALL Caches
    •Loaded up a new game, still 3 frames!

    Specs are as follows: c10bf2385b.png

  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    You did delete the caches in \SavedGames, right? Not the ones in \Build18?

    If so, I'd say, move your saved game folder from SNAppData to the Desktop. Uninstall Subnautica. Re-install. Move SavedGames folder back to SNAppData

    Let me know how this works.
  • LeafCloakLeafCloak Virginia Join Date: 2017-02-07 Member: 227714Members
    edited February 2017
    Sadly, absolutely no change after reinstalling and putting my savedgames back in :/
    I'm very confused as to why this is happening, my computer is up to the task i'm sure of it.

    EDIT: Aha perhaps I spoke too soon! It's now going up and down spastically, seemingly from 3 -> 80 -> 63 -> 9 -> 3 then it loops
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    edited February 2017
    LeafCloak wrote: »
    Sadly, absolutely no change after reinstalling and putting my savedgames back in :/
    I'm very confused as to why this is happening, my computer is up to the task i'm sure of it.

    Alright. Take the following four files out of your slot00xx folder:
    • gameinfo.json
    • global-objects.bin
    • scene-objects.bin
    • screenshot.jpg

    Put them somewhere safe. If you have more than one save, do it for each one, putting them in different folders, like backupsave1, backupsave2 etc

    Now, delete all of the slot00?? folders in \SavedGames (if you have screenshots you want to keep, then copy the \screenshots subfolder as well)

    Next, make new folders, starting with

    slot0001

    And copy the four files back into each slot00?? folder

    You should end up with all of the slot00?? folders having only those four files and nothing else in them.

    Does anything change with this?
  • LeafCloakLeafCloak Virginia Join Date: 2017-02-07 Member: 227714Members
    Averaging about 25 frames now with no fluctuation.
    So improvement!
    Still unsure why it's not higher but I guess this is better than nothing!
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    @LeafCloak Quick question, when you cleared the cache, what exactly did you clear? Just all files in the CellsCache and CompiledOctreesCache folders? Did you leave some files for your base? Trying to pin down what was causing the issue that got wiped out just now.
Sign In or Register to comment.