Page 1 of 1

[2.0.22] blueprint-storage-2.dat impossible to delete or replace on Steam version of Factorio

Posted: Wed Nov 27, 2024 4:11 am
by PyroGamer666
I usually play the DRM-free version of Factorio, but last night, I installed the game on Steam so I could play with some friends via Steam. To make this fresh install identical to my other install, I decided to copy config.ini and all three blueprint-storage files (blueprint-storage.dat, blueprint-storage-2.dat, blueprint-storage-version-1.1-backup.dat) to the Steam install's write directory.

While config.ini was read by the new install without issues, The new install did not detect my pasted blueprint-storage files. When opening a game on this install, the saved blueprints window was empty. When I tried creating a new blueprint and adding it to the saved blueprint collection, it worked. Upon saving the game, the install overwrote the blueprint-storage-2.dat file that I pasted into the folder.

After closing Steam Factorio, I deleted the blueprint-storage-2.dat that Steam Factorio generated, and deleted the other two blueprint-storage files that Steam Factorio left untouched. Opening Steam Factorio afterwards showed that the blueprints I saved were not deleted. After creating another blueprint, adding it to the collection, and closing the save file, blueprint-storage-2.dat existed once again, now at a bigger file size. No matter how many times I deleted blueprint-storage-2.dat, the blueprint collection did not reset.

Doing the same thing on my DRM-free install of Factorio yielded behavior that I expected would happen. Moving all blueprint-storage files to another folder to reset the install's blueprint collection worked as expected, and moving the same files back in place brought back my saved blueprints.

This behavior does not appear random. Deleting blueprint-storage.dat from DRM-free Factorio consistently works as expected, and doing the same thing on Steam Factorio consistently does not work as expected.

To replicate issue:

1. Install DRM-free install of Factorio alongside a Steam install. Disable Steam Cloud Save.
2. Open a new Freeplay game on both installs. Save a blueprint on both installs to generate blueprint-storage-2.dat. Close both games.
3. On DRM-free install, move blueprint-storage-2.dat to another folder, along with other blueprint-storage files. Reopen the DRM-free install, and check if the saved blueprint still exists in game.
4. On Steam install, delete blueprint-storage-2.dat, and open the game again. The blueprint you saved will still be there. Save an additional blueprint. Check if blueprint-storage-2.dat has returned at a larger size.
5. Delete blueprint-storage-2.dat from Steam install. Copy blueprint-storage-2.dat from DRM-free install to Steam install, and check if the Steam install's blueprint collection has changed.

Re: [2.0.22] blueprint-storage-2.dat impossible to delete or replace on Steam version of Factorio

Posted: Wed Nov 27, 2024 5:33 am
by IsaacOscar
Have you modified the file in C:\Program Files (x86)\Steam\userdata\######\427520\remote,
where ##### is your steam ID number (just search the userdata folder for 427520).

Re: [2.0.22] blueprint-storage-2.dat impossible to delete or replace on Steam version of Factorio

Posted: Wed Nov 27, 2024 6:36 am
by PyroGamer666
I was not aware that blueprints were backed up in a folder within Steam when Cloud Save is enabled. It doesn't look like that's documented on the Factorio Wiki, at least not when it comes to blueprint backups. Every post I could find on the topic said that Cloud Save does not save blueprints, but that is clearly false.
When using Steam on Windows, the config.ini, achievements.dat, modded-achievements.dat and player-data.json can also be found in

C:\Program Files (x86)\Steam\userdata\[user number]\427520\remote
https://wiki.factorio.com/Application_directory

I guess this is more an issue with Factorio's documentation than with Factorio itself. I was unable to find any detailed information on how to transfer blueprint collections between installs, and no information at all on transferring from a DRM-free install to a Steam install.

After deleting blueprint-storage-2 from steam/userdata/#####/427520/remote, and copying my blueprint-storage-2.dat to the install, the game threw an error saying that loading cloud blueprints failed, and it was falling back to local blueprints, but after all of that, I was finally able to load my DRM-free blueprints in my Steam install. I'm not the median user, but there has to be a more intuitive way of doing this. Factorio would benefit from an in-game method of deleting all saved blueprints, one that works equally well in the Steam and DRM-free versions.

Re: [2.0.22] blueprint-storage-2.dat impossible to delete or replace on Steam version of Factorio

Posted: Wed Nov 27, 2024 6:47 am
by IsaacOscar
PyroGamer666 wrote: Wed Nov 27, 2024 6:36 am I was not aware that blueprints were backed up in a folder within Steam when Cloud Save is enabled. It doesn't look like that's documented on the Factorio Wiki, at least not when it comes to blueprint backups. Every post I could find on the topic said that Cloud Save does not save blueprints, but that is clearly false.
When using Steam on Windows, the config.ini, achievements.dat, modded-achievements.dat and player-data.json can also be found in

C:\Program Files (x86)\Steam\userdata\[user number]\427520\remote
https://wiki.factorio.com/Application_directory

I guess this is more an issue with Factorio's documentation than with Factorio itself. I was unable to find any detailed information on how to transfer blueprint collections between installs, and no information at all on transferring from a DRM-free install to a Steam install.

After deleting blueprint-storage-2 from steam/userdata/#####/427520/remote, and copying my blueprint-storage-2.dat to the install, the game threw an error saying that loading cloud blueprints failed, and it was falling back to local blueprints, but after all of that, I was finally able to load my DRM-free blueprints in my Steam install. I'm not the median user, but there has to be a more intuitive way of doing this. Factorio would benefit from an in-game method of deleting all saved blueprints, one that works equally well in the Steam and DRM-free versions.
Yes, I also had similar problems when I wanted to clear all the tips and tricks for a fresh playthrough, or when editing them to fix a bug (as they are stored in player-data.json). Thankfully google/reddit helped me.

Re: [2.0.22] blueprint-storage-2.dat impossible to delete or replace on Steam version of Factorio

Posted: Wed Nov 27, 2024 6:50 am
by PyroGamer666
I've made some changes to the "Application directory" wiki page to say that blueprints are now backed up by Steam Cloud, while adding instructions on how to transfer blueprint collections between installs. Hopefully that will stop other people from struggling with this issue, as I have.