taqillion
Greenhorn
This issue happened to me on the mobile version of the game. I tried to move the stable to a location that was invalid, then pressed the "X" button to cancel the move and the stable just disappeared. The horse was still around until I went to sleep and then it disappeared for good.
Luckily, I had an old save file that did have the stable, so I did some digging into the save file's data. I found the file that stores the Stable's information, and by inserting it back to the new save file it made the Stable appear again, so I thought I'd share the method below.
Save-file editing is unofficial. Back up first. Follow at your own risk.
What you need
Step 1 - Back it up
Copy the save file and rename the copy to something like `MyFarm_123456789.backup`. If anything breaks, delete the edited file and rename the backup to restore.
(Stardew keeps its own auto-backups — `_SVBAK`, `_old`, `_SVEMERG` — but make your own copy anyway.)
Step 2 - Confirm the Stable really is missing
Open the save in your text editor and search for `xsi:type="Stable"`. Zero results = it's gone.
Step 3 - Find the insertion point
Search for another building you know exists on your farm, e.g. xsi:type="GreenhouseBuilding". Find the </Building> tag that closes it. You'll paste the Stable block right after that closing tag.
Step 4 - Paste this Stable block
<Building xsi:type="Stable">
<id>REPLACE-WITH-NEW-GUID</id>
<skinId>
<string xsi:nil="true"/>
</skinId>
<nonInstancedIndoorsName>
<string xsi:nil="true" />
</nonInstancedIndoorsName>
<tileX>74</tileX>
<tileY>12</tileY>
<tilesWide>4</tilesWide>
<tilesHigh>2</tilesHigh>
<maxOccupants>20</maxOccupants>
<currentOccupants>0</currentOccupants>
<daysOfConstructionLeft>0</daysOfConstructionLeft>
<daysUntilUpgrade>0</daysUntilUpgrade>
<buildingType>Stable</buildingType>
<buildingPaintColor>
<ColorName>
<stringxsi:nil="true" />
</ColorName>
<Color1Default>
<boolean>true</boolean>
</Color1Default>
<Color1Hue>
<int>0</int>
</Color1Hue>
<Color1Saturation>
<int>0</int>
</Color1Saturation>
<Color1Lightness>
<int>0</int>
</Color1Lightness>
<Color2Default>
<boolean>true</boolean>
</Color2Default>
<Color2Hue>
<int>0</int>
</Color2Hue>
<Color2Saturation>
<int>0</int>
</Color2Saturation>
<Color2Lightness>
<int>0</int>
</Color2Lightness>
<Color3Default>
<boolean>true</boolean>
</Color3Default>
<Color3Hue>
<int>0</int>
</Color3Hue>
<Color3Saturation>
<int>0</int>
</Color3Saturation>
<Color3Lightness>
<int>0</int>
</Color3Lightness>
</buildingPaintColor>
<hayCapacity>0</hayCapacity>
<buildingChests/>
<humanDoor>
<X>-1</X>
<Y>-1</Y>
</humanDoor>
<animalDoor>
<X>-1</X>
<Y>-1</Y>
</animalDoor>
<animalDoorOpen>false</animalDoorOpen>
<animalDoorOpenAmount>0</animalDoorOpenAmount>
<magical>false</magical>
<fadeWhenPlayerIsBehind>true</fadeWhenPlayerIsBehind>
<owner>REPLACE-WITH-YOUR-PLAYER-ID</owner>
<isMoving>false</isMoving>
<HorseId>REPLACE-WITH-NEW-GUID</HorseId>
</Building>
If you find this block in your old save file, just copy it and paste it. If not, then you will have to replace some of the missing placeholder data before saving the file. Note that I did not try generating GUIDs, so I'm not sure if this part would work. Here are the placeholders you need to replace:
Paste the file contents into any online XML validator. This is just to make sure you didn't corrupt the file's structure.
Step 6 - Load the save
Launch the game, load the farm. The Stable should appear at your chosen tile.
What about the horse?
If the glitch also deleted your horse NPC, the game recreates a fresh horse tied to your new HorseId on load. You might need to re-name it and, if you had the horse flute charm, re-obtain it (it stays tied to the old horse's identity, unfortunately).
If it breaks
Close the game without saving, delete the edited file, rename your `.backup` copy back to the original name. Zero data lost.
Hope this helps someone. Fixed my farm in about ten minutes.
Luckily, I had an old save file that did have the stable, so I did some digging into the save file's data. I found the file that stores the Stable's information, and by inserting it back to the new save file it made the Stable appear again, so I thought I'd share the method below.
Save-file editing is unofficial. Back up first. Follow at your own risk.What you need
- A text editor that can handle multi-MB files (VS Code, Notepad++, Sublime, NOT Windows Notepad). If you're on mobile, consider moving the save file to a computer to do the modifications.
- Windows: %APPDATA%\StardewValley\Saves\<FarmName_ID>\
- Mac: ~/.config/StardewValley/Saves/<FarmName_ID>/
- Linux: ~/.config/StardewValley/Saves/<FarmName_ID>/
- iOS: On My iPhone/Stardew Valley
Step 1 - Back it up
Copy the save file and rename the copy to something like `MyFarm_123456789.backup`. If anything breaks, delete the edited file and rename the backup to restore.
(Stardew keeps its own auto-backups — `_SVBAK`, `_old`, `_SVEMERG` — but make your own copy anyway.)
Step 2 - Confirm the Stable really is missing
Open the save in your text editor and search for `xsi:type="Stable"`. Zero results = it's gone.
Step 3 - Find the insertion point
Search for another building you know exists on your farm, e.g. xsi:type="GreenhouseBuilding". Find the </Building> tag that closes it. You'll paste the Stable block right after that closing tag.
Step 4 - Paste this Stable block
<Building xsi:type="Stable">
<id>REPLACE-WITH-NEW-GUID</id>
<skinId>
<string xsi:nil="true"/>
</skinId>
<nonInstancedIndoorsName>
<string xsi:nil="true" />
</nonInstancedIndoorsName>
<tileX>74</tileX>
<tileY>12</tileY>
<tilesWide>4</tilesWide>
<tilesHigh>2</tilesHigh>
<maxOccupants>20</maxOccupants>
<currentOccupants>0</currentOccupants>
<daysOfConstructionLeft>0</daysOfConstructionLeft>
<daysUntilUpgrade>0</daysUntilUpgrade>
<buildingType>Stable</buildingType>
<buildingPaintColor>
<ColorName>
<stringxsi:nil="true" />
</ColorName>
<Color1Default>
<boolean>true</boolean>
</Color1Default>
<Color1Hue>
<int>0</int>
</Color1Hue>
<Color1Saturation>
<int>0</int>
</Color1Saturation>
<Color1Lightness>
<int>0</int>
</Color1Lightness>
<Color2Default>
<boolean>true</boolean>
</Color2Default>
<Color2Hue>
<int>0</int>
</Color2Hue>
<Color2Saturation>
<int>0</int>
</Color2Saturation>
<Color2Lightness>
<int>0</int>
</Color2Lightness>
<Color3Default>
<boolean>true</boolean>
</Color3Default>
<Color3Hue>
<int>0</int>
</Color3Hue>
<Color3Saturation>
<int>0</int>
</Color3Saturation>
<Color3Lightness>
<int>0</int>
</Color3Lightness>
</buildingPaintColor>
<hayCapacity>0</hayCapacity>
<buildingChests/>
<humanDoor>
<X>-1</X>
<Y>-1</Y>
</humanDoor>
<animalDoor>
<X>-1</X>
<Y>-1</Y>
</animalDoor>
<animalDoorOpen>false</animalDoorOpen>
<animalDoorOpenAmount>0</animalDoorOpenAmount>
<magical>false</magical>
<fadeWhenPlayerIsBehind>true</fadeWhenPlayerIsBehind>
<owner>REPLACE-WITH-YOUR-PLAYER-ID</owner>
<isMoving>false</isMoving>
<HorseId>REPLACE-WITH-NEW-GUID</HorseId>
</Building>
If you find this block in your old save file, just copy it and paste it. If not, then you will have to replace some of the missing placeholder data before saving the file. Note that I did not try generating GUIDs, so I'm not sure if this part would work. Here are the placeholders you need to replace:
- REPLACE-WITH-NEW-GUID (appears twice — use the same value in both places). Grab one from https://www.uuidgenerator.net/ . You should get something that looks like this format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Both <id> and <HorseId> need this exact same value.
- REPLACE-WITH-YOUR-PLAYER-ID — search your save for <uniqueMultiplayerID> and copy the number between the tags.
- tileX / tileY — `74, 12` puts it on a common spot on the standard farm (Next to the east exit). Change if you want it elsewhere, but make sure the 4-wide x 2-tall footprint at that position is completely clear (no other buildings, fences, crops, debris).
Paste the file contents into any online XML validator. This is just to make sure you didn't corrupt the file's structure.
Step 6 - Load the save
Launch the game, load the farm. The Stable should appear at your chosen tile.
What about the horse?
If the glitch also deleted your horse NPC, the game recreates a fresh horse tied to your new HorseId on load. You might need to re-name it and, if you had the horse flute charm, re-obtain it (it stays tied to the old horse's identity, unfortunately).
If it breaks
Close the game without saving, delete the edited file, rename your `.backup` copy back to the original name. Zero data lost.
Hope this helps someone. Fixed my farm in about ten minutes.