Automated Cache cleaning batch file v2 -- read before using

0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
edited February 2017 in Subnautica Bug Reporting
Now that base terrain deformation is removed, you shouldn't have to skip clearing the batches around your base, so I've removed that part of the batch file. You can find the original version in the spoiler section below, but keep in mind, even if you have an old base that clips through terrain and clearing the cache dumps terrain back inside of it, you can just use the Debug Console command
item 514
and spawn in a terraformer, and shift-right-click the terrain out of your base. This way, the caches your base are in stay nice and stutter / crash free (clearing CellsCache) as well as being updated if there's any new terrain changes from Subnautica updates (CompiledOctreesCache).

To use these files, simply:
1) Place a copy of them in the SavedGames\slot00[i]xx[/i] folder (where [i]xx[/i] is the number of the saved game slot you want cleared) and then 
2) Run the file:
    a) Windows: double-click 
    b) Mac / Linux, in the terminal: 
	i) do chmod +x CacheClean_Mac_Linuxv2.sh
	ii) do ./CacheClean_Mac_Linuxv2.sh

Windows version:

Download here
del /q *.txt
del /q CellsCache\*.bin
del /q CompiledOctreesCache\*.optoctrees

Mac & Linux version:

Download here
# To run this file, do chmod +x CacheClean_Mac_Linuxv2.sh then do ./CacheClean_Mac_Linuxv2.sh
rm -f *.txt
rm -f CellsCache/*.bin
rm -f CompiledOctreesCache/*.optoctrees

Link to a tool by @foxxyfox make this process a bit more user-friendly (it has a graphical interface) here (source code available).
Alright, only use this if you're comfortable with the current cache cleaning process and know what you're doing.

Basically, the batch file cleans your cache for you and then restores your batch files for your bases, given the condition that you've backed them up, in their respective directories, to \slot000x\bases, so your base batch files should be copied to:
  • \bases\*.txt
  • \bases\CellsCache\*.bin
  • \bases\CompiledOctreesCache\*.optoctrees

Place this batch file in the top level of your \slot000x directory and double-click to run it.

Download:
Windows | Mac & Linux (read the comment in the first line)

Here's the contents of the Windows file, followed by the Mac & Linux file, which you can edit (say your bases are in a different folder or something) if you wish by right-clicking and choosing edit:

Windows:
del /q *.txt
copy bases\*.txt
del /q CellsCache\*.bin
copy bases\CellsCache\*.bin CellsCache\
del /q CompiledOctreesCache\*.optoctrees
copy bases\CompiledOctreesCache\*.optoctrees CompiledOctreesCache\

Mac & Linux:
# To run this file, do chmod +x CacheClean_Mac_Linux.sh then do ./CacheClean_Mac_Linux.sh
rm -f *.txt
cp bases/*.txt
rm -f CellsCache/*.bin
cp bases/CellsCache/*.bin CellsCache/
rm -f CompiledOctreesCache/*.optoctrees
cp bases/CompiledOctreesCache/*.optoctrees CompiledOctreesCache/


EDIT: Link to a tool to make this process a bit easier (you still have to find which batches your base is in) here (Tool to clean cache by @foxxyfox - source code available ).

Comments

  • EvilSmooEvilSmoo Join Date: 2008-02-16 Member: 63662Members
    It deleted my system32 and I cannot remove the Saguaro from my urethra, please advise.
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    EvilSmoo wrote: »
    It deleted my system32 and I cannot remove the Saguaro from my urethra, please advise.
    0x6A7232 wrote: »
    Alright, only use this if you're comfortable with the current cache cleaning process and know what you're doing.


    Place this batch file in the top level of your \slot000x directory and double-click to run it.

    ... Are you saying I need to add more emphasis, a larger font, or both?

    Or I could actually put a little more effort into making sure that it's actually running in the Subnautica directory, at the risk of removing functionality for those who installed Subnautica to \my silly pony\my little spaghetti games\


    I can do either or both. Thoughts?
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    Also, I've taken to cleaning my cache every time there's an update larger than 5-7 MB as I've a hunch they're optimizing resources that are causing lag spikes. That's just my hunch, given Subnautica seems to be running smoother and smoother.
  • SidchickenSidchicken Plumbing the subnautican depths Join Date: 2016-02-16 Member: 213125Members
    0x6A7232 wrote: »
    ... Are you saying I need to add more emphasis, a larger font, or both?

    I'm gonna go out on a limb here and guess the answer is neither of those things.

    Anyways, thanks for taking the time to write that up. I'll give it a stab the next time my game starts getting slow.
  • EvilSmooEvilSmoo Join Date: 2008-02-16 Member: 63662Members
    0x6A7232 wrote: »
    EvilSmoo wrote: »
    It deleted my system32 and I cannot remove the Saguaro from my urethra, please advise.
    0x6A7232 wrote: »
    Alright, only use this if you're comfortable with the current cache cleaning process and know what you're doing.


    Place this batch file in the top level of your \slot000x directory and double-click to run it.

    ... Are you saying I need to add more emphasis, a larger font, or both?

    Or I could actually put a little more effort into making sure that it's actually running in the Subnautica directory, at the risk of removing functionality for those who installed Subnautica to \my silly pony\my little spaghetti games\


    I can do either or both. Thoughts?

    Please redo the entire batch file, using Comic Sans. Thanks. That always works much better.
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    edited November 2016
    EvilSmoo wrote: »
    0x6A7232 wrote: »
    EvilSmoo wrote: »
    It deleted my system32 and I cannot remove the Saguaro from my urethra, please advise.
    0x6A7232 wrote: »
    Alright, only use this if you're comfortable with the current cache cleaning process and know what you're doing.


    Place this batch file in the top level of your \slot000x directory and double-click to run it.

    ... Are you saying I need to add more emphasis, a larger font, or both?

    Or I could actually put a little more effort into making sure that it's actually running in the Subnautica directory, at the risk of removing functionality for those who installed Subnautica to \my silly pony\my little spaghetti games\


    I can do either or both. Thoughts?

    Please redo the entire batch file, using Comic Sans. Thanks. That always works much better.

    Ah, please see this guide.

    That's a joke, but it will in fact work. ;)
  • SuPerTeDSuPerTeD Austraila Join Date: 2016-11-22 Member: 224134Members

    Basically, the batch file cleans your cache for you and then restores your batch files for your bases, given the condition that you've backed them up, in their respective directories, to \slot000x\bases, so your base files should be copied to:

    Hi thanks for this. Just have a question. My save folder does not have a bases folder. I don't have a terrain issue with my base only one foundation. So, using your batch file will cleaar the cache but leave my base in tact?

    The reason for doing this is not all of the last update is loading down in the depths and I am getting some glitches.

    Check the video if you wish Bugs Ahoy
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    SuPerTeD wrote: »
    Basically, the batch file cleans your cache for you and then restores your batch files for your bases, given the condition that you've backed them up, in their respective directories, to \slot000x\bases, so your base files should be copied to:

    Hi thanks for this. Just have a question. My save folder does not have a bases folder. I don't have a terrain issue with my base only one foundation. So, using your batch file will cleaar the cache but leave my base in tact?

    The reason for doing this is not all of the last update is loading down in the depths and I am getting some glitches.

    Check the video if you wish Bugs Ahoy

    I should work, it will spit some error messages about there being no such directory as \bases, but the deletion will work, which will cause all your cache files to be rebuilt, so yes, it will work.
  • SuPerTeDSuPerTeD Austraila Join Date: 2016-11-22 Member: 224134Members
    0x6A7232 wrote: »
    SuPerTeD wrote: »
    Basically, the batch file cleans your cache for you and then restores your batch files for your bases, given the condition that you've backed them up, in their respective directories, to \slot000x\bases, so your base files should be copied to:

    Hi thanks for this. Just have a question. My save folder does not have a bases folder. I don't have a terrain issue with my base only one foundation. So, using your batch file will cleaar the cache but leave my base in tact?

    The reason for doing this is not all of the last update is loading down in the depths and I am getting some glitches.

    Check the video if you wish Bugs Ahoy

    I should work, it will spit some error messages about there being no such directory as \bases, but the deletion will work, which will cause all your cache files to be rebuilt, so yes, it will work.

    Cool I will let you know how it all goes. Thanks again
  • SuPerTeDSuPerTeD Austraila Join Date: 2016-11-22 Member: 224134Members
    Hey mate. It worked great. Still a little glitchy but got to see what I wanted and more, so all good thanks for the help.
  • patrickg1964patrickg1964 USA Join Date: 2016-12-30 Member: 225725Members
    this game said it runs on 64 bit and it shows in there file 32 bit. i cant even move without it telling me game not responding. i don't think the developers give a rats ass. I clan my cash all the time and it does nothing to help. also i can see a bug or to but to make the game unplayable. Is down right ripping people off.
  • 0x6A72320x6A7232 US Join Date: 2016-10-06 Member: 222906Members
    this game said it runs on 64 bit and it shows in there file 32 bit. i cant even move without it telling me game not responding. i don't think the developers give a rats ass. I clan my cash all the time and it does nothing to help. also i can see a bug or to but to make the game unplayable. Is down right ripping people off.

    Right-o, @patrickg1964 could you kindly post your system specs? Use Speccy, and press File > Save As... and save the report as a text file, then attach it here.
Sign In or Register to comment.