Touhou Linux Guide


By Daichungus


Disclaimer

This guide focuses on using Lutris with vanilla Wine for a simple and consistent experience. It does not cover every setup or edge case.

The goal here is to get most users running their Touhou games quickly and cleanly.

If you're looking for more advanced or alternative methods, other resources may be better suited.


Preparing your Linux environment

Choosing a distro

Most major distros* should work well with this guide.

This guide has been personally tested with:

My only recommendation is to choose a well-known, widely-supported, and stable distro, which includes but is not limited to the following:

* This guide does NOT cover Arch Linux!

Installing required software

Before continuing, ensure you have the necessary graphics drivers and system firmware installed.

Consult your distro's documentation or online resources for a proper setup (e.g., RPM Fusion for Nvidia drivers on Fedora).

  1. Update your repository using your distro's included package manager.

    Debian/Ubuntu/Linux Mint:

    sudo apt update && sudo apt upgrade

    Fedora:

    sudo dnf update

  2. Install Wine and Lutris.

    Debian/Ubuntu/Linux Mint:

    sudo apt install wine lutris

    Fedora:

    sudo dnf install wine lutris


Installing THCRAP patches

Skip to this section if you do not want to play with THCRAP patches, or if you already have THCRAP patches installed and do not want to install more.

If your Touhou game folders each have their own thcrap folders and English exe, it is recommended to delete them and follow this section.

Please note the following:

Setting up Wine and Mono for THCRAP

  1. Create a new Wine prefix with the following command: *
    WINEPREFIX=$HOME/.wine-thcrap WINEARCH=win64 winecfg
  2. Download the latest version of Mono. Use this guide to find the version you need.
  3. Run the following command to install Mono to your newly-created prefix:
    WINEPREFIX=$HOME/.wine-thcrap wine /path/to/wine-mono-VERSION-x86.msi
    (substitute the actual version number for VERSION)

* winecfg is recommended as you may need to adjust some settings. Otherwise you can just close the GUI window.

The THCRAP configuration tool requires .NET, which Mono substitutes on Linux. Otherwise it will display an error saying that .NET is missing.

Directly installing Mono to the prefix avoids unforseen distro-related issues. If you have wine-mono installed system-wide, THCRAP will only display a pink screen before closing itself. This is usually because of broken packages in many distros (namely Fedora).

Setup of the THCRAP configuration tool

  1. Download the main THCRAP package from thpatch.net
  2. Unzip the package. There are two ways to do this:

Using Lutris

  1. Open Lutris, click "+" sign in the upper-left corner, then choose "Add locally installed game"
  2. In the Game Info tab:
    1. Set a name like "THCRAP configuration tool".
    2. Choose Wine as the Runner.
  3. In the Game options tab:
    1. Set the executable path to /your/path/to/thcrap/thcrap.exe *
    2. Set the working directory path to /your/path/to/thcrap/
    3. Set the Wine prefix path to $HOME/.wine-thcrap
  4. Use System wine for the Runner option.
  5. Press the save button and ensure the THCRAP configuration tool runs properly.

* thcrap.exe is the THCRAP configuration tool, which allows you to download new patches and locate the games. Meanwhile, thcrap_loader.exe is the actual program that applies patches to the Touhou games.

Using the command line

Use the Wine prefix you created for THCRAP earlier. Run:

WINEPREFIX=$HOME/.wine-thcrap wine /your/path/to/thcrap/thcrap.exe

Installing patches with the THCRAP configuration tool

  1. Run the THCRAP configuration tool via Lutris.
  2. On the welcome screen, click next. By default, THCRAP will ask you to choose a patch based on your system's default language.
  3. Click on the "All patches" tab* if you want to:
  4. THCRAP will then ask you for the location of your games after you click "next".
    1. Select the "Find games in a specific folder" option.
    2. Navigate to the folder containing your Touhou games.
    3. THCRAP will then load a list of detected Touhou games and their custom.exe programs.
    4. Select the games you want to apply the patch to. Click Next.
  5. Choose the most convenient location for the patch's shortcut to be created in.
  6. You can now run your Touhou game with the installed patch.

* It may take a few seconds for the patch list when you click on the "All patches" tab. This is normal behavior.

It is highly recommended that the thcrap folder be placed in the same directory as your Touhou games.

This shortcut is purely optional, as what actually matters is the config file created for that patch. You can delete the shortcut if desired.

Understanding and editing the config files

Config files tell thcrap_loader.exe which patches to load in order. These are located in the config folder of the thcrap folder ending with .js

Here are some examples of config files for various patches:

If you have already have installed a few patches, this can be very useful for patch stacking.

About games.js

games.js is a special config file. This file tells THCRAP all the known locations of your Touhou games.

An example with explanation comments is provided here.

If you have vpatch.exe in any of the games' folders (see "Running Touhou with Vsync patches"), you can refer to that exe instead of the regular game exe within games.js


Installing Vsync patches (vpatch)

Information about the vsync patches is located here

  1. Download the vpatch archive (old download)
  2. Unzip the vpatch archive. There are two ways to do this:
  3. In the extracted vpatch folder, locate the appropriate vpatch_thXX.dll file for your game.

    Provided below is a table for which vpatch folder to find your game's vpatch

                        
    Name thXX vpatch version .dll filename
    Embodiment of Scarlet Devil th06 vpatch_rev4 vpatch_th06.dll
    Perfect Cherry Blossom th07 vpatch_rev4 vpatch_th07.dll
    Imperishable Night th08 vpatch_rev4 vpatch_th08.dll
    Phantasmagoria of Flower View th09 vpatch_rev4 vpatch_th09.dll
    Shoot the Bullet th095 vpatch_rev7 vpatch_th095.dll
    Mountain of Faith th10 vpatch_rev7 vpatch_th10.dll
    Subterranean Animism th11 vpatch_rev7 vpatch_th11.dll
    Undefined Fantastic Object th12 vpatch_rev7 vpatch_th12.dll
    Double Spoiler th125 vpatch_rev7 vpatch_th125.dll
    Great Fairy Wars th128 vpatch_th12.8 vpatch_th128.dll
    Ten Desires th13 vpatch_th13 vpatch_th13.dll
    Double Dealing Character th14 vpatch_th14 vpatch_th14.dll
    Legacy of Lunatic Kingdom th15 vpatch_th15 vpatch_th15.dll
  4. Copy or move the appropriate vpatch_thXX.dll*, vpatch.exe, and vpatch.ini files into your Touhou game's folder.
  5. Rename the Touhou game's exe to thXX.exe.

* For EoSD, use vpatch_th06_unicode.dll instead if you want to play with THCRAP.

For EoSD, you must rename the exe to 東方紅魔郷.exe for vpatch to be applied.


Running the Touhou games

Please note the following:

Running with Lutris

Skip to this section if you don't want to use Lutris.

If you are running vanilla or vpatch EoSD:

  1. While adding it, go to the "Systems options" tab
  2. Scroll to "Locale"
  3. Set it to Japanese

Vanilla Touhou (no patches)

Follow this section if you want to play without THCRAP patches or vpatch.

  1. Open Lutris, then add "locally installed game".
  2. In the Game info tab:
    1. Set the name to be the Touhou game's name.
    2. Choose Wine as the Runner.
  3. In the Game options tab:
    1. Set the executable path to /your/path/to/Touhou/thXX/thXX.exe
    2. Set the working directory path to /your/path/to/Touhou/thXX/
    3. Set the Wine prefix path to $HOME/.wine
  4. In the Runner options tab, use System wine.
  5. Press the save button and ensure your game is running.*

Touhou with Vsync patch (vpatch)

  1. Install vpatch for your Touhou game.
  2. Repeat the same first few steps as running vanilla Touhou.
  3. Set the executable path to /your/path/to/Touhou/thXX/vpatch.exe
  4. Continue with the same steps as running vanilla Touhou.
  5. Press the save button and ensure your game is running with vpatch.*

Touhou with THCRAP patches

Follow this section if you have installed THCRAP patches.

  1. Repeat the first few steps as running vanilla Touhou, but for the executable path in "Game options", locate thcrap_loader.exe
  2. In the Arguments field, enter the .js file of your patch* and the game you want to run it with.

    Examples of arguments:

  3. Ensure the working directory is the folder that contains thcrap_loader.exe
  4. Press the save button and run your game for testing.

* You can find all of your installed patches in the config folder in the thcrap folder.

Game names are located in games.js within the config folder of the thcrap folder

Running from the Command Line

Vanilla Touhou (no patches) *

Replace thXX.exe with the executable for your specific game:

LANG=ja_JP.UTF-8 wine start /unix /your/path/to/Touhou/thXX/thXX.exe

Touhou with Vsync patches (vpatch) *

Same as above, but use vpatch.exe instead:

LANG=ja_JP.UTF-8 wine start /unix /your/path/to/Touhou/thXX/vpatch.exe

Touhou with THCRAP patches

Replace example.js with your patch config, and thXX with your game's ID:

wine /your/path/to/thcrap/thcrap_loader.exe example.js thXX

* Due to how EoSD (th06) handles encoding and locale, running it directly from the command line requires LANG=ja_JP.UTF-8 wine start /unix before the path to it.


Backing up your save data

Older Windows (th06 - th12)

All relevant files are located in the same folder as the game. *

* Or techically, wherever the game's .exe was last ran.

Newer Windows (th12.5 - )

Starting with DS (th125), all save data is stored in AppData/Roaming/ShanghaiAlice

  1. Locate the Wine prefix you used to run the game (usually located in your home folder as .wine)
  2. Navigate to drive_c/users/yourname/AppData/Roaming/ShanghaiAlice in your Wine prefix
  3. Open the thXX folder that corresponds with your Touhou game(s), then copy or move all relevant files to a safe place. *

* It is recommended to copy the files to the location of the actual game for organizational purposes.

Relevant files

Make sure to keep these files safe.

* scorethXX.dat starting with StB (th095)

It's normal for the cfg file of EoSD to appear as “Œ•ûg–‚‹½.cfg


Common Issues

For more information, refer to this guide.

EoSD displays error windows at startup

Refer to this guide for help

Fullscreen Issues

These two issues usually happen when running the Touhou games with regular/system Wine. A good alternative runner is GE-Proton, which should have little to no issues with the Lutris setup as outlined in this guide.

Not upscaling/in corner

This mainly affects desktop environments that use Wayland. Currently there are no solutions besides switching to an Xorg session in the login screen.

Stretched out

Typically happens when you enable DXVK in original Wine. Fixes the non-up-scaling issue but also causes stretched visuals with that runner.

Strange text

Missing text/tofu (⍰⍰⍰⍰)

Install cjkfonts using winetricks:

wine winetricks cjkfonts

Mojibake (“Œ•û)

  1. Verify that your system has a suitable Japanese locale
  2. 
                                
  3. Use the Japanese locale whenever you run Touhou games and installers through Wine via command line.

    Add this at the start of your command:

    LANG=ja_JP.UTF-8


Additional Resources and References


Special thanks to C0LDfinch, Yova, and the THCRAP community for their feedback and guidance!