PLAY RPG MAKER XP GAMES IN LINUX

Play RPG Maker XP games in Linux

  • Irog
  • 08/18/2023 04:34 PM
  • 5105 views
Play RPG Maker XP games in Linux


Running classic games in Linux becomes easier everyday thanks to Wine. This tutorial will teach you how to play RPG Maker XP games in Linux !

1) Install Wine

1.1) from a software manager

Most Linux distributions come with a software manager that let you install apps from the corresponding Linux repository. Such repository usually contains a stable but often dated version of Wine. This is the easiest way to install Wine and works great if you don't need to play native midi music.

1.2) or use the terminal

Detailed install instructions for your Linux distribution

Ubuntu summary:

Start a terminal with "Ctrl + Alt + T"
Type the following command followed by "Enter" and type your administrator password
sudo dpkg --add-architecture i386


Enter the commands
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key


Choose the next command that correseponds to your Ubuntu version:
For Ubuntu 18.04:
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/winehq-bionic.sources

For Ubuntu 20.04:
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources

For Ubuntu 22.04:
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources


Update the package information and finally install Wine stable branch
sudo apt update
sudo apt install --install-recommends winehq-stable


2) Install the Arial font

Your Wine install may or may not include the Arial font used by RPG Maker XP as default font. RPG Maker XP will look for fonts in this folder:
/home/UserName/.wine/drive_c/windows/Fonts

Copy the file "arial.ttf" from this tutorial .zip file in that folder. If the game you want to play uses a custom font, put a copy of that font in this Fonts folder too.

3) Decompress the game

If the game comes as single .exe file, it's a self-extracting windows executable. It is recommended to decompress it with an archive manager like 7zip. You can rename the file to change its extension from ".exe" to ".zip" or decompress the .exe file directly.

Install 7zip
sudo apt-get install p7zip-full p7zip-rar


Extract files from the archive with their full path
7z x TheGame.exe


4) Deal with midi music

If the game doesn't have any .mid music file in the Audio/BGM folder, go to step 5).

4.1) Covert midi music to ogg

RPG Maker XP running in Wine plays .ogg music like a charm and only look for file base names regardless of their extensions. So you can convert all the .mid files into .ogg files using online convention tools or install Timidity and run a script.

To install Timidity, enter the command:
sudo apt-get install timidity


In the Audio/BGM folder, create an empty file "convert .sh" and use a text editor to write this script in it (or get the script for the .zip file of this tutorial):
#! /bin/bash
ls -1 *.mid | while read file
do
nbChar=${#file}
file=${file:0:($nbChar-4)}
timidity "$file.mid" -Ow -o "$file.ogg"
done


Give yourself permission to execute this script
chmod +x convert.sh

and run it
./convert.sh


Remove all .mid files from Audio/BGM: move them somewhere else for backup or delete them.

4.2) or configure Wine to play midi music from RPG Maker XP

Wine can't natively play midi music from RPG Maker XP because RPG Maker XP uses DirectMusic to play midi and because this bug still need to be fixed. But there is a workaround !

Use winetricks to add DirectMusic to Wine
winetricks directmusic dsound


Enter wine configuration
winecfg


Go to the Libraries tab and make sure your "Existing overrides" list has the following DLL set to (native):
*dmband (native)
*dmime (native)
*dmsynth (native)
*dmusic (native)
*dsound (native)

5) Play !

Execute this command from the game folder
wine Game.exe

or this one from any location
wine ThePathToTheGame/Game.exe


Once started, you can configure RPG Maker XP by pressing F1.