The Sims™ 4

The Sims™ 4

55 ratings
Auto-Delete Sims 4 Cache and Run it on Steam
By † ßâd•£üç]< Îñç™
Enjoy this automatic saved game cache cleaner and game launcher in an all new handy batch script... Just for Steam players of The Sims 4! (Includes fix for First-Person Camera Mode on Steam!)
9
   
Award
Favorite
Favorited
Unfavorite
Introduction
Since EA (Electronic Arts) finally released "The Sims 4" on Steam, it only made sense to grab the base game and write a cache cleaning script for it.

So, without further ado…



It is assumed that Sims 4 is being run from 64-bit version of Windows 7, 8/8.1 or 10. Works with the Steam version only.
Sims 4 Cache Clean & Launch Script
The nice thing about this script is that it requires zero editing. There is absolutely no need to edit the full file path and drive letter as seen in older Sims 3/4 cache cleaning script guides I have written. Even if storing saved game files on another drive, it will still work as intended. Simply run it as a stand-alone shortcut right from your desktop and that's it!

Step-by-Step Instructions
  1. Create a new text file and rename it. (I ended up renaming mine to SteamSims4CleanNLaunch.)

    IMPORTANT: It is strongly suggested to save it to the desktop or in some other convenient location as this file will be used for deleting saved game cache files prior to running the game through Steam. The cache cleaning process is essential for keeping Sims 4 running smoothly.
  2. Copy and paste the following into the text file:
    @echo off title Sims 4 Cache Cleaner and Game Launcher (Steam version only) :: FOR STEAM INSTALLS ONLY :: this section deletes Sims 4 saved game cache files to make the game run faster del "%USERPROFILE%\Documents\Electronic Arts\The Sims 4\localthumbscache.package" 2>NUL del /F /Q "%USERPROFILE%\Documents\Electronic Arts\The Sims 4\cache\*.cache" 2>NUL del /F /Q "%USERPROFILE%\Documents\Electronic Arts\The Sims 4\cache\*.dat" 2>NUL del /F /Q "%USERPROFILE%\Documents\Electronic Arts\The Sims 4\cache\*.jpg" 2>NUL del /F /Q "%USERPROFILE%\Documents\Electronic Arts\The Sims 4\cachestr\*" 2>NUL if exist "%USERPROFILE%\Documents\Electronic Arts\The Sims 4\onlinethumbnailcache" ( rd /S /Q "%USERPROFILE%\Documents\Electronic Arts\The Sims 4\onlinethumbnailcache" ) else ( echo onlinethumbnailcache folder does not exist. ) :: launches Sims 4 from Steam shortcut (no need to edit) and closes the script start "" "steam://rungameid/1222670" echo Now preparing to start "The Sims 4" on Steam! Goodbye. timeout /t 5 /NOBREAK > NUL exit
    Note:
    In the cache cleaning portion of this script, I am using the Windows %USERPROFILE% variable for the game saves Documents symlink. It will not be necessary to alter this as the install location is stored in the Steam client.
  3. Save and exit the text file.
  4. Change the file extension from .txt to .bat
Optional – To change your batch script shortcut icon to look like The Sims 4 one, do the following:
  1. Right click the batch file you just created and click on Properties.
    • In Windows 10 (or if the Shortcut tab is not appearing following Step 1), move your batch script off the desktop. The Documents folder should be a suitable location.
    • Right click the batch file and scroll down to Send to and select the Desktop (create shortcut) option.
    • Repeat Step 1.
  2. Under the Shortcut tab, click Change Icon button. (If you get a dialog box warning you the file contains no icons, just click OK.) Click on the Browse button and navigate to your Sims 4 game install location. Locate your Sims 4 executable file, or Sims4.ico (if listed) and select one of them, then click OK.
  3. In the Shortcut tab section, click the Apply button, then OK to close and the shortcut icon should be changed.
Important Note Regarding this Script
When copy and pasting the script into the text file you have prepared, it is strongly advised keeping the comments intact – especially for understanding how each part of the script works.
Testing the Script
After you have created the saved game cache cleaning and launcher shortcut for Sims 4 on Steam, you are ready to test your new script.

To run the script, simply double click it from the location you created and saved your shortcut. It does not matter if the Steam client is running or not when running the script. If the Steam client is not running, the script will load Steam first.

Do not be alarmed if you see the Steam overlay notification in the bottom right corner of the Sims 4 game as well as Origin's. The intention is for the Steam overlay to be hooked into the game itself following cleaning. To test that the overlay is working as intended, you can do this by pressing Shift + Tab to open the overlay, or press F12 to capture a screenshot in game.

Troubleshooting
Assuming Sims 4 has already been downloaded and run at least once prior to using this script, there should not be any reason for the game or the overlay to run incorrectly.

Bear in mind that Sims 4 still requires Origin to run and will automatically look for it and install prior to running Sims 4 on Steam. If you already have Origin and have it configured, there should not be any problems. However, if you have never used Origin, then it is possible--albeit unlikely that some tweaking may be required. If this is the case, please view my guide that explains how to Get the Steam Overlay Working with Games on Origin.
Fixing 1st Person Camera Mode
Although switching to the first person camera mode has nothing to do with maintaining computer health for the Sims 4 game, there are quite a few people having difficulty on getting the first person camera mode to work in the Steam version for Sims 4. Therefore it only makes sense to include instructions to fix it so players can enjoy the game!

Step-by-Step Instructions
The first person camera mode's hotkeys is in conflict with Steam's default hoykeys for opening the Overlay while in game. The fix is easily remedied by following the instructions below:
  1. Click Steam in the top left corner of your Steam client and go to Settings.
  2. In your Settings window, select In-Game.
  3. Under The Steam Overlay heading, locate the fieldbox labeled Overlay shortcut keys and change Shift+Tab (default) to a new key combo of your choice.

    Important note: Be sure your new hotkey settings does not conflict with your other games or with Steam itself.
  4. Click the OK button to save your new settings.


Optional – If you do not use the Steam overlay to play with a controller, communicate with your Steam friends or for other means, uncheck the box labeled Enable the Steam Overlay while in game.
Additional Notes
If launching Steam through the script, users with authenticators will have no problem as the game itself will run immediately after successful login.



It should be noted that when I began testing the script on Windows 10, I created a new tutorial game with a new randomized character in Steam just as I did with Sims 3. Since game saves are stored in the Documents folder – and I never uninstalled Sims 4 from Origin, I decided to test the saved game using the script I made for Origin to look for compatibility issues. Afterward, I ran the game again from Steam, and it appears that saved games work fine when played from Steam or Origin, regardless of which DRM client created the new game or which one is running it.



Be aware that expansions, game and stuff packs (especially if you previously bought them on disc or on Origin), as well as other custom content, you would need to re-download contents from Origin install into Steam. Otherwise, if you're on a metered data plan or have a lot of EPs, SPs and GPs, you may want to consider manually copy the applicable content folders over to your Steam's game install. Not doing so would result in an "incomplete" message error that could potentially corrupt your game. Unless you are computer savvy and understand how the process works, you may want to Google for instructions to do this without breaking your game.



Note:
Because Origin is integrated with Sims 4, it is not necessary to re-purchase content you already own from your Origin library on Steam (with the exception of customized 3rd party-created content).

House Cleaning
Now that Sims 4 has finally been released to Steam, I will be reorganizing and updating my guides for Sims 3 and 4 over the next week or two few months (sorry folks, my personal schedule has gotten hectic!). They will still include scripts for Origin users, as well as optimization. Stay tuned!


Rate this guide!
Please rate this guide with a thumbs up if you found it helpful; or a thumbs down if you didn't. Be sure to reserve questions, concerns, suggestions for improvement, or anything else regarding this guide in the comments section below. If you have trouble getting it working, you may also want to check the comments section in my other guides as a solution may already have been found.
Changelog
10/28/2022 – Added new guide link.
07/20/2020 – Added new Fixing 1st Person Camera Mode section; changed anticipated timetable for other Sims guide reorganization.
07/08/2020 – Initial version.
13 Comments
Dr_Balls Mar 4, 2021 @ 1:38am 
Thanks man!:steamthumbsup:
† ßâd•£üç]< Îñç™  [author] Mar 3, 2021 @ 9:03pm 
@CaptainSteel117: Just run it as its own shortcut from your desktop and it'll run the game for you after deleting unnecessary saved game cache files. (If you don't have the Steam client running, it will start it up first.)

Enjoy the script! :steamhappy:
Dr_Balls Mar 3, 2021 @ 7:52pm 
thanks for the help man I really appreciate it. Just to be clear, should I launch the game from the script from now on or from the standard steam location?
thanks
† ßâd•£üç]< Îñç™  [author] Jan 15, 2021 @ 2:04am 
@QueenGothDoll: Excuse me? Please don't waste your time, or mine, by commenting on my guides if your intent is to be insulting instead of offering alternative solutions for people coming here to address a specific need. Nobody is forcing anyone to use cleaning scripts for any Sims game whatsoever.

That said, A) I don't read "Modthesims," so I have no idea what your personal issue with them has to do with me or this guide; and B) you are partially right. While true, the purpose of having a cache is for faster loading times - keep in mind that older, slower computers may still struggle after the game has been running for several days... even hours. Thankfully, running a cache cleaning script for Sims 4 is not as frequently needed (unlike Sims 3!).
Wynter Jan 12, 2021 @ 5:40am 
Youve been listening to that weirdo from Modthesims too much. Glad I can tell the truth where he cant shut me down. Clearing cache has no effect on the game. That guy from modthesims is a notorious troll who's been fooling kids for 12 years that I know of. Cache is there to help something load faster why would you want to clear it?
† ßâd•£üç]< Îñç™  [author] Dec 4, 2020 @ 11:12am 
@Azure: Nope. You're good. I only put that information there for Sims 4 users who may have been hesitant to play it on Steam because the saved games share the same Document folder.
Abyss Dec 4, 2020 @ 10:39am 
Does the "Additional Notes" section apply to me if i had never played Sims 4 before the steam release, all DLC is owned on steam directly and have only downloaded households and lots from the in game gallery?
† ßâd•£üç]< Îñç™  [author] Dec 1, 2020 @ 9:16am 
@TigerEye6: I am happy to hear you found the script useful and that you're able to play the game as it was meant to be played.

Should you have need for further optimization, you may want to refer to the Moving Game Saves to Another Location section in my Move Game Saves to Another Location & Improve Performance guide.

Have fun and enjoy!
TigerEye6 Nov 30, 2020 @ 6:53pm 
I cannot even explain how grateful I am for this guide. After playing for about 30 minutes, my characters would stand there for LITERAL HOURS. Not in game hours, real hours. This is a very very handy fix, i can finally play the game.
† ßâd•£üç]< Îñç™  [author] Jul 21, 2020 @ 8:26am 
@lucio_05z: You're welcome. Enjoy!