Saves
| Saves | |
|---|---|
| Type | Mechanic |
Stardew Valley writes a save once a day, at the moment the day ends, and never in between. Going to bed does it, and so does collapsing from exhaustion or still being on the farm at two in the morning. Everything else is held in memory, which means quitting partway through a day throws that day away. Each save lives in its own folder named after the farm and a long number, holding two files that are both needed, and the game keeps yesterday's pair alongside today's so a single bad day can be undone. The files are plain text, stored away from the game itself, which is why they survive a reinstall and can be carried between a computer and a phone.
Overview
In multiplayer the write waits for everyone. The save happens after all the players have clicked through the end-of-day screens and woken up in the morning, and the file only ever exists on the host's machine, so a farmhand has nothing of their own to back up.
Every save carries a tag naming the version of the game that last wrote it. An older copy of the game refuses to open a newer save, while a newer copy opens an older one happily and re-tags it the first time it saves. That rule is what governs moving a farm between devices: a save can go anywhere as long as the receiving device's game is not older than the tag on the file. A farm carried from a phone to a computer is almost always fine, and the same farm carried back to a phone that has not been updated is not.
The files themselves are XML. They sit in the system's own application data rather than inside the game folder, so updating or reinstalling leaves them untouched, and on a computer they are shared between different copies of the game, which means a farm bought twice from two stores still has one set of saves. Inside each folder are a file named after the farm and a second called SaveGameInfo, and the save will not load without both.
Finding them depends on the platform. On Windows the folder sits under the roaming application data directory, reached quickest by pasting the path into the Run box, since the folder is hidden from ordinary browsing. On Linux and Mac it sits under the configuration directory, with different places again for the Steam flatpak and the Heroic launcher. On Android it is inside the game's own files directory, and on iOS it is in the Files app under a Stardew Valley folder, with older devices needing a computer and a file-sharing panel to reach it at all. Console saves are sealed away and need custom firmware before any of this applies.
Moving a farm is mostly a matter of copying the right folder. Zipping the whole farm folder is the safe way to back it up or hand it to another computer. Android adds a wrinkle, because its files carry an extra extension that has to be stripped when moving to a computer and added again when moving back, and a save pushed onto a phone by command line needs its permissions set or the game crashes at bedtime. Anything modded has to have its custom content stripped before it goes to a phone, since the mobile game cannot make sense of items it has never heard of.
Rolling back to the previous save is the most useful thing to know about the system. The game keeps the previous day's pair of files with a suffix marking them as old, so deleting the current pair and removing that suffix from the older pair rolls the farm back one day. It only reaches back one day, so it fixes a mistake noticed the next morning rather than one noticed a week later. The iOS version uses a different suffix for the same purpose, and has an extra file for its emergency save that needs clearing out at the same time.
Most save problems come from one of a handful of causes. Files left with a temporary suffix after an interrupted write can be renamed back. A folder whose name no longer matches the file inside it will not load, which is the usual result of renaming things by hand. Cloud synchronisation is the sneakiest culprit, because it can quietly replace a newer local save with the copy it had stored, and the fix is to launch the game, swap the folder back while it is still running, and let the sync service treat that as the new version. Backup folders kept inside the saves directory cause trouble of their own, since the game tries to load them as if they were farms, so they belong somewhere else.
Notes
Anyone running the modding framework gets a safety net for free. Its bundled backup mod keeps a rolling set of daily archives of every save, so even a farm that has been deleted outright can usually be pulled back out of them.
Editing a save by hand fixes things no menu can, such as an irreversible choice or a broken flag, and it breaks farms just as easily. A backup first is not optional, and the automatic save-editing tools are worse than a text editor, because they tend to rewrite parts of the file they do not understand.
The once-a-day write has one practical consequence worth building a habit around. A long, productive day is worth nothing until the farmer is in bed, so a session that has to end early is better ended by sleeping than by quitting, even if the clock still says four in the afternoon.
All Mechanics
Every entry in this group, with its key details.