Skip to content

Instantly share code, notes, and snippets.

@eshrh
Last active October 2, 2023 20:00
Show Gist options
  • Star 21 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save eshrh/5bbf4deab58fefdab9eacf77b450efc0 to your computer and use it in GitHub Desktop.
Save eshrh/5bbf4deab58fefdab9eacf77b450efc0 to your computer and use it in GitHub Desktop.
Personal guide to visual novels on linux

Concise visual novel setup on linux

also see this guide which has better compatibility. This guide is forked from it. written by kamui-7

This guide is very close to exactly how I run vn's on my setup. I can't guarantee it'll work for everyone (in fact, i can probably guarantee it's broken for someone/some game)

Packages i use

sudo pacman -S wine-staging giflib lib32-giflib libpng lib32-libpng libldap lib32-libldap gnutls lib32-gnutls mpg123 lib32-mpg123 openal lib32-openal v4l-utils lib32-v4l-utils libpulse lib32-libpulse libgpg-error lib32-libgpg-error alsa-plugins lib32-alsa-plugins alsa-lib lib32-alsa-lib libjpeg-turbo lib32-libjpeg-turbo sqlite lib32-sqlite libxcomposite lib32-libxcomposite libxinerama lib32-libgcrypt libgcrypt lib32-libxinerama ncurses lib32-ncurses libxslt lib32-libxslt libva lib32-libva gtk3 lib32-gtk3 gst-plugins-base-libs lib32-gst-plugins-base-libs lib32-gst-plugins-good vulkan-icd-loader lib32-vulkan-icd-loader -y

Note that the vulkan packages are optional.

winetricks

These are the winetricks dependencies i use:

winetricks d3dx9 dirac dotnet35 dotnet40 dxvk lavfilters vcrun2003 vcrun2005 vcrun2008 wmp9

Being extremely comprehensive in your vcruns isn't necessary since most game installers will have a function to auto-install the right vcrun version.

Select the default wineprefix, and navigate to the font window. You can either choose exactly which fonts you want, or go ahead and select cjkfonts if you're lazy like me. If fonts still don't work, follow the instructions here

Remove all wine DLL overrides with winetricks alldlls=default

winecfg

Typ winecfg and a window should pop up. Set the windows version to 7 or 10.

On the audio tab, make sure you choose the right audio devices to output from, and verify that it's pulseaudio if you use it. If you plan to run a lot of 64bit games, I'd suggest going to graphics and ticking "emulate a virtual desktop." This is also something good to try for general window bugs

Unpacking VNs

Untranslated VNs are commonly distributed in ISOs. Getting the game out of them is fairly straightforward.

mkdir ~/mnt
sudo mount game.iso ~/mnt
mkdir ./game-files
cp ~/mnt/* ./game-files -r

Make a directory called mount, mount the iso, and copy all the files to another folder.

If you encounter a bin/cue file, you can convert them to a standard .iso using a program like bchunk. MDF/MDS files also work the same way, but you might be able to directly mount the .mdf -- if it doesn't work, then use a program like mdf2iso.

From here it should be smooth sailing. Run the installer with

LC_ALL="ja_JP.UTF-8" TZ="Asia/Tokyo" wine setup.exe

and you should good.

Once the game's finished installing, you can run the game exe the same way. If you run into errors with the disk not being inserted, you'll probably have to use cdemu, the guide linked at the top of the page explains how to do it.

Text hooking

Head over to the textractor download site and download the English-only zip file. Save it somewhere safe, and you should be able to run the x86/Textractor.exe file with just the wine command.

Mining effectively

You can follow any windows guide to find out how to use textractor along with yomichan like this one. Your end goal is to be able to have a texthooker page open and have VN text automatically appear on it. You'll then be able to use yomichan to mine anki cards.

You might also want to include a voice clip and a screenshot of your visual novel along with your anki card. This can be done using ames. You should already have anki and ankiconnect installed, so install the following dependencies on your system (arch assumed):

sudo pacman -S pulseaudio pactl ffmpeg maim xdotool libnotify

  1. Then, download the ames.sh script somewhere safe
  2. Edit the script and change the first two lines to match the names of your Anki model image and audio fields.
  3. Bind the following commands to any key in your DE, WM, sxhkd, xbindkeysrc, etc.
    • sh ~/path/to/ames.sh -r: press once to start recording, and again to stop and export the audio clip to your latest-created Anki card.
    • sh ~/path/to/ames.sh -s: prompt for an interactive screenshot selection
    • sh ~/path/to/ames.sh -a: repeat the previous screenshot selection. If there is no previous selection, default to -s.
    • sh ~/path/to/ames.sh -w: screenshot the currently active window (requires xdotool)

Now, when you press a hotkey, ames should collect the screenshot or recording you selected, and export it to your last added card in Anki automatically, which should be a card you mined using Yomichan from the visual novel.

@Nutjob
Copy link

Nutjob commented Aug 4, 2021

@eshrh

Thank you for explaining and linking the fonts !

@bayazidbh
Copy link

@eshrh were you the one that wrote the guide on the learnjapanese site btw?

I just want to add a note regarding Yuzusoft games (since they're pretty popular) that some of the codecs installed seems to conflict with Yuzusoft's, and I found that while you can run their games pretty smoothly with the new versions of wine it won't play the movies either.

After looking at protondb and my own experiment, it seems that to play their game smoothly and play the movies, it's best to use wine 4.x (tried Proton 4.11 and Lutris 4.21) with only winetricks (or protontricks) wmp11.

Not sure what is up with the newer wine versions, and I've tried the ffdshow and lavfilter prefixes with wine. It's not really a problem if you don't care about the movies, though.

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