Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functionality to symlink save data from another game's prefix, a few games would benefit from this #217

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

UsernamesAreNotMyThing
Copy link
Contributor

@UsernamesAreNotMyThing UsernamesAreNotMyThing commented Jan 25, 2025

Some games have functionality that is dependent on having save data for another game, which works fine on Windows, but needs workarounds on Proton due to how it handles stuff that is stored in the user folder rather than the game's own steamapps/common folder (usually under Documents or My Games). This leads to the game not detecting the save data for the other game despite it being there, because it's in a different prefix.

This pull request adds a new function for util that can be used to automate a symlinking workaround to accomplish this.

This will only work if you have the other game installed from Steam.

How this works

  1. Reads Steam's steamapps/libraryfolders.vdf file to find locations of known library folders.
  2. Iterates through each of the library folders to determine if it can find a compatdata/(APPID) folder in it.
  3. If it finds one, it will create a symlink in the current game's prefix to point to the location in the found prefix, at the location the game expects to find the save data folder for the other game.

Games impacted

  • Final Fantasy VII Rebirth: Has bonus content (or something, I don't know what) for players with save data from FF7 Remake Intergrade, which would be found in the documents folder.
  • Horizon Zero Dawn Remastered: Allows playing saves from the original Complete Edition, which are stored in the documents folder.
  • Metaphor ReFantazio: Allows continuing from saves made in its demo, which uses a different ID and thus a different prefix.

How to use the Function

def import_saves_folder(from_appid: int, relative_location: str)

Parameters:

  • from_appid: The Steam app id for the game whose save data is desired in the prefix for the game you're trying to play.
  • relative_location: The location in the drive_c/users/steamuser folder where the game expects the save data for the other game to be. You can find this by looking up the game on PC Gaming Wiki.
    This function will have to be used in the fix scripts for each of the games that need it.

@UsernamesAreNotMyThing UsernamesAreNotMyThing changed the title Add functionality to import save data from another game's prefix, a few games will benefit from this Add functionality to symlink save data from another game's prefix, a few games would benefit from this Jan 26, 2025
@UsernamesAreNotMyThing UsernamesAreNotMyThing marked this pull request as ready for review January 30, 2025 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant