From d8570a47cd63fa0288f79cf3cdad75960b852689 Mon Sep 17 00:00:00 2001 From: Witchybun <96719127+Witchybun@users.noreply.github.com> Date: Wed, 19 Jul 2023 16:39:57 -0500 Subject: [PATCH] Undertale: Change Save Data Folder Location (#1966) Co-authored-by: Witchybun --- UndertaleClient.py | 6 ++++++ worlds/undertale/docs/undertale_en.md | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/UndertaleClient.py b/UndertaleClient.py index fd95c697256..94ed15d695f 100644 --- a/UndertaleClient.py +++ b/UndertaleClient.py @@ -32,6 +32,12 @@ def _cmd_patch(self): self.ctx.patch_game() self.output("Patched.") + def _cmd_savepath(self, directory: str): + """Redirect to proper save data folder. (Use before connecting!)""" + if isinstance(self.ctx, UndertaleContext): + UndertaleContext.save_game_folder = directory + self.output("Changed to the following directory: " + directory) + @mark_raw def _cmd_auto_patch(self, steaminstall: typing.Optional[str] = None): """Patch the game automatically.""" diff --git a/worlds/undertale/docs/undertale_en.md b/worlds/undertale/docs/undertale_en.md index 32420a3e7e3..ea10ab22065 100644 --- a/worlds/undertale/docs/undertale_en.md +++ b/worlds/undertale/docs/undertale_en.md @@ -13,6 +13,12 @@ by opening the Undertale directory through Steam), it will then make an Undertal Archipelago install location. That contains the version of Undertale you will use for Archipelago. (You will need to redo this step when updating Archipelago.) +**Linux Users**: This guide is mostly similar; however, when Undertale is installed on Steam, it defaults to a Linux +supported variant; this randomizer only supports the Windows version. To fix this, right-click the game in Steam, go to +Properties -> Compatibility, and check "Force the use of a specific Steam Play compatibility tool". This +downloads the Windows version instead. If the play button is greyed out in Steam, be sure to go to +Settings -> Compatibility and toggle "Enable Steam Play for all other titles". + ### Connect to the MultiServer Make sure both Undertale and its client are running. (Undertale will ask for a saveslot, it can be 1 through 99, none @@ -23,6 +29,20 @@ In the top text box of the client, type the The client will then ask for the slot name, input that in the text box at the bottom of the client. +**Linux Users**: When you start the client, it is likely that the save data path is incorrect, and how the game +is played depends on where the save data folder is located. + +*On Steam (via Proton)*: This assumes the game is in a Steam Library folder. Right-click Undertale, go to Manage -> +Browse Local Files. Move back to the steamapps folder, open compatdata/391540 (391540 is the "magic number" for +Undertale in Steam and can be confirmed by visiting its store page and looking at the URL). Save data from here is at +/pfx/drive_c/users/steamuser/AppData/Local/UNDERTALE. + +*Through WINE directly*: This depends on the prefix used. If it is default, then the save data is located at +/home/USERNAME/.wine/drive_c/users/USERNAME/AppData/Local/UNDERTALE. + +Once the save data folder is located, run the /savepath command to redirect the client to the correct save data folder +before connecting. + ### Play the game When the console tells you that you have joined the room, you're all set. Congratulations on successfully joining a