Skip to content

Instantly share code, notes, and snippets.

@RobertTheSable
Last active November 21, 2024 05:17
Show Gist options
  • Save RobertTheSable/6c4d705623b4de8d8cb3c954eac4814f to your computer and use it in GitHub Desktop.
Save RobertTheSable/6c4d705623b4de8d8cb3c954eac4814f to your computer and use it in GitHub Desktop.
How to play Touhou Puppet Dance Performance on the Steam Deck

What's in the Guide

This is a guide for how to get Touhou Puppet Dance Performance on the Steam Deck.

These instructions can also be adapted to play on any Linux PC.

This guide will walk through the process to run any of the following:

  • Touhou Puppet Dance Performance (Including the English Patch)
  • Touhou Puppet Dance Performance: Shard of Dreams (Including the English Patch)
  • The Touhou Puppet Dance Performance: Shard of Dreams Extended mod.

Other versions/mods may also be installable, but I can't vouch for them.

Prerequisites

You will need installers for any of the following that you want to install:

In addition, you will need some method for:

  • Getting files on to your Steam deck.
    • An SD Card or USB drive connected to a dock/hub will probably work. You could also just download the installers you need directly on the Steam deck via its own browser. I use another method I'll explain later.
  • Typing on the Steam Deck in desktop mode.
    • You can open Steam's virtual keyboard in desktop mode by pressing Steam + X.
    • Any USB keyboard connected to a dock/hub should work. Bluetooth keyboards probably also work. Again, I used another option which I'll explain later.

An option that provides both of these is KDE connect. This was designed for Linux, but it has clients for Windows and Mac, as well as mobile devices. The reason it's worth considering is that it provides the following features:

  • File transfer - allows paired devices to send files to each other if they're connected to the same network. Meaning you don't need to copy files to/from an SD Card/USB Drive and switch it between your PC and Deck.
  • Remote keyboard - allows one device to send key presses to another one it's paired to. This may be useful or necessary if you don't have a keyboard handy that you can use for your Steam Deck.

You will also need Protontricks. You can install this from the Discover app in desktop mode.

Additionally, you will need to have installed the Japanese locale on your Steam Deck/other Linux device. If you've already done this, skip to the installation section.

Doing this requires sudo/administrator permissions on the deck, so you will also need to have set a password in desktop mode. Setting a password won't affect your ability to turn on the device or change your Steam password. It's just for running sudo commands in desktop mode.

To set a sudo password:

  • Open a terminal window.
    • This can be done from the Application Launcher > System > Konsole
  • In the terminal, type "passwd" and hit enter. Follow the prompts to enter the password you want.

The best method I've found for enabling JP locale on the deck is here.

My recommendation is to download the script via the "Raw" link, and then run it via sudo in the terminal.

  • Open the script.
  • Click the "Raw" button on the Gist page.
  • Save the page. (i.e. via Ctrl-S)
    • If you didn't save it to the Steam Deck directly, copy it there.
  • Open the folder the script was saved in on the Steam Deck in the Dolphin file explorer.
  • Right-click in the folder and select the "Open Terminal Here" option.
  • In the terminal window, run sudo sh japanese_locale_enabler.sh. Enter your sudo password and follow the additional prompts.

At this point, you should have the Japanese locale ready to use. You can confirm this by running locale -a in a terminal window, and checking that "ja_JP.utf8" appears in the list.

Note that whenever you update the Steam Deck, you probably will have to re-do the steps to enable the Japanese locale. Hopefully Valve adds an easier way to add locales in the future, but for now, it is what it is.

With that done, it's time to install the darn game(s).

Installation

Installing Base TPDP

  • Put the Steam Deck in desktop mode.
  • Open your library from the Steam icon in the taskbar.
  • Click "Add a Game," then select "Add a non-Steam Game."
    • Click "Browse."
    • In the "Look in:" selector, choose "/home/deck" from the list of locations.
    • From there, navigate to where you put your installers.
      • I'm going to assume you put it in the "Downloads" folder of the Deck's home directory.
    • Navigate to the folder with the base TPDP installer.
      • If you can't see the installer, switch the "File Type" setting from "Applications" to "All Files."
    • Select the installer ("setup.exe") and click "OPEN."
    • Click "Add Selected Programs."
  • You should now see the installer in your library. Right click on the entry and click "Properties."
    • Set the shortcut name to something meaningful. Or don't. It's your choice. ¯\_(ツ)_/¯
    • Set "Launch Options" to the following: env LANG="ja_JP.utf8" %command%
    • In the left panel, switch to the "Compatibility" page.
      • Enable the "Force the use of a specific Steam Play compatibility tool" option.
      • From the list of proton versions, select "Proton 7.0-5." Others might work, but this is the version I've verified.
  • Now, "Play" the game to run the installer.
    • Follow the prompts as usual.
      • If the installer appears to get stuck after picking an install location, try clicking on the installer icon in the taskbar. Sometimes SteamOS doesn't focus on dialog windows that appear during installers. IDK why.
      • I recommend to uncheck any options to create menu or desktop shortcuts. They probably don't hurt, but we don't need them either.

If you don't want to use the expansion, mods, or an English patch: Skip to Post Installation Setup.

If you want to play Shard of Dreams, the Extended mod, etc, skip to Installing the Shard of Dreams Expansion. Do not install the base TDPD English patch.

Installing the Base TPDP English Patch

  • Re-open the "Properties" menu of your "game" in steam.
  • Click the "Browse" button for the "Target" setting and open the TPDP English patch installer.
  • Now, "Play" the game to run the installer.
    • Follow the prompts as usual.
    • If the installer doesn't launch, move the installer to a folder that doesn't have have any spaces or special characters in the name.

And now you're ready to play Touhou Puppet Dance Performance in English! Skip to Post Installation Setup.

Installing the Shard of Dreams Expansion

  • Re-open the "Properties" menu of your "game" in steam.
  • Click the "Browse" button for the "Target" setting and open the Shard of Dreams expansion installer.
  • Now, "Play" the game to run the installer.
    • Follow the prompts as usual.
      • The same caveats/recommendations as the base game installer apply here, too.
    • If the installer doesn't launch, move the installer to a folder that doesn't have have any spaces or special characters in the name.

Shard of Dreams Launch Error Workaround

If you try to play Shard of Dreams at this point, the game won't launch. If you try in Desktop mode, you should see an error window popup with a message in Japanese.

I assume this is a message saying it can't find the base game, because that's the issue. Due to a bug in Wine's handling of Japanese file paths, Shard of Dreams expects base game files to be located in a "notkey" folder inside the Shard of Dreams folder, regardless of where you actually put the base game.

Luckily, the workaround is fairly straightforward - we just need to create a symbolic link (basically a Linux shortcut) to the base game's folder so that Shard of Dreams can find what it's looking for.

To create the symbolic link:

  • Open the folder Shard of Dreams was installed to in the Dolphin file explorer.
    • By default, this should be /home/deck/.steam/steam/steamapps/compatdata/(game identifier)/pfx/drive_c/game/FocasLens/幻想人形演舞-ユメノカケラ-/.
  • Right click -> Create New -> Link to File or Directory.
  • In the window that appears, enter the path of the base game installation in the "URL location to link to" field.
    • You can paste it directly into the field.
    • Alternatively, you can pick the location using the "Open File Dialog" icon to the right of the path field, and then select "Directory."
      • Since this dialog doesn't follow symbolic links, your prefix will actually be found at /home/deck/.local/share/Steam/steamapps/compatdata/(game identifier)/pfx/drive_c/game/FocasLens/幻想人形演舞/.
      • You will probably need to right click and enable the option to show hidden files in order to see the .local or .steam folders.
  • Set the "Name for new link" field to "notkey" and click "OK."

Shard of Dreams should now launch without any errors. If you don't need and English patch and don't want to use any mods, skip to Post Installation Setup.

Installing the Shard of Dreams English Patch

  • Re-open the "Properties" menu of your "game" in Steam.
  • Click the "Browse" button for the "Target" setting and open the Shard of Dreams English patch installer.
  • Now, "Play" the game to run the installer.
    • Follow the prompts as usual.
  • If the installer doesn't launch, move the installer to a folder that doesn't have have any spaces or special characters in the name.

If you didn't already, follow the directions in the "Shard of Dreams Launch Error Workaround" section.

If you don't want to use any mods, skip to Post Installation Setup.

Installing the Extended Mod

  • Re-open the "Properties" menu of your "game" in steam.
  • Click the "Browse" button for the "Target" setting and open the Extended mod installer.
  • Now, "Play" the game to run the installer.
    • Follow the prompts as usual.
      • Once again I recommend to disable any options to create shortcuts, etc.
    • If the installer doesn't launch, move the installer to a folder that doesn't have have any spaces or special characters in the name.

If you didn't already, follow the directions in the Shard of Dreams Launch Error Workaround section.

Enabling the Custom DXGI DLL

The extended mod includes a "dxgi.dll" file in the Shard of Dreams installation folder. We need to add a DLL override to get Proton to load it. To add the override:

  • Launch Protontricks.
  • Select TPDP from the list of games. Wait a bit for the next window to open.
  • Choose the "Select the default wineprefix" option and click OK.
  • Select "Run winecfg" and click OK.
  • In the "Wine configuration" window, click the "Libraries" tab.
    • Enter "dxgi" in the "New override for library" field, then click the "Add" button.
    • Click "Apply" and then "OK" to exit configuration.
    • Click "Cancel" on each Winetricks window as it appears to exit.

Now SoD should load the custom DXGI file instead of the builtin one.

At this point you're done with installers and can work on launching the game.

Post Installation Setup

Finding The Executable

Now, we need to switch the entry for TPDP in Steam from the installer to the actual game.

The installed files are located inside what's called a "prefix." This is basically a "fake" Windows installation or C drive that's used to get Windows programs to run on Linux. Finding the prefix may seem confusing at first, but all you need to find it is the identifier Steam generated for your non-Steam game entry. The simplest way to find this is via protontricks.

  • Launch protontricks, and looks at the list of games.
  • You should see your installer listed as "Non Steam shortcut: (whatever you named it) (some long number)"
    • The number is your "game's" identifier.

Once you know the identifier, your prefix will be located in:

/home/deck/.steam/steam/steamapps/compatdata/(your identifier)/pfx/drive_c

Your game's executable will be located in the prefix at the relative path you chose in the installer.

  • For the base game, this will by default be: /home/deck/.steam/steam/steamapps/compatdata/(game identifier)/pfx/drive_c/game/FocasLens/幻想人形演舞/
  • For Shard of Dreams, this will by default be: /home/deck/.steam/steam/steamapps/compatdata/(game identifier)/pfx/drive_c/game/FocasLens/幻想人形演舞-ユメノカケラ-/
    • For the extended mod, remember to pick "SoD-Extended-EN.exe" or "SoD-Extended-JP.exe" instead of the default executable.

You should put the executeable in the "Target" field of the non-Steam game entry.

Be sure to enter the folder containing the executeable as the "Start In" path for the non-steam game entry.

At this point the game should be ready to launch. Have fun!

Weirdness When Closing the Game

Sometimes the Steam Deck doesn't correctly revert to its menu after exiting TPDP. Not sure why this is, but you can fix it by pressing the Steam button and selecting "Home."

Controller Setup

You shouldn't have to do anything special to get controls working, but there are some quirks that may be unintuitive at first.

  • By default, "B" is confirm and "A" is cancel in menus. You can change this to whatever you like either in-game or in Steam's controller options.
  • Base TPDP doesn't respond to DPad input, only the left analog stick. You can use the DPad by mapping it to the analog stick in Steam's controller options.
  • You might also consider mapping some buttons to Backspace and Enter. That way you can confirm/cancel text entry without having to re-open the virtual keyboard.
@PhantomBuggo
Copy link

Hi, I'm an idiot when it comes to knowing what things mean here; How far into the directory am I supposed to go at "(game identifier)..." ? I'm struggling with not knowing enough about code .-.
Arou asking about this step: In the window that appears, enter the path of the base game installation in the "URL location to link to" field. ?

I just made a revision there, check if that answers your question.

thank you very much for the prompt reply and fix! I greatly appreciate it. yes, that answers my question, thank you ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment