Author Topic: Running RPG Maker games under Wine  (Read 72909 times)

Unnamed

  • Shroom-Trainer (Level 7)
  • *
  • Posts: 590
  • Hello?
    • View Profile
Running RPG Maker games under Wine
« on: October 03, 2013, 04:56:10 PM »
This is supposed to be my tutorial on how to install & run RPG Maker games on Linux with Wine. Wine is a Windows emulator, it aims to create a Windows-like environment on Linux, BSD, Solaris and Mac OS X, to run native Windows applications. As much as I've seen of Wine so far, it's doing fairly good: I was able to get a wide variety of games working on it, including heavy resource-intensive games like Portal 2.



Things to know

For simplicity, instead of giving click-here-and-there instructions, I'd just tell how you do stuff on the command-line. It's just easier and smoother, myself prefers to work on the command-line anyway. Look for an application like "Terminal" or "XTerm" to open a BASH shell.

Some parts of the tutorial might be Ubuntu-specific, especially the ones related to installing packages. (Different Linux distributions have different package managers, e.g. apt-get is only valid in Debian-based distros, Ubuntu is one of them.) The reason for this is that Ubuntu is widely used, while I don't have time and resources to look up how to do stuff on all the other various distros.


Getting familiar with the command-line

By default, your prompt looks like this:

Code: [Select]
username@hostname:~$
Where ~ denotes your home directory and $ means you are in a non-root shell. To get a root shell, type "sudo -i", or if that doesn't work, "sudo su -". You'll be asked for your Unix password, then if you supply it correctly, you'll get a root shell, which looks like this:

Code: [Select]
root@hostname:~#
Where # means you're in a root shell (if the "root" username doesn't give it away anyway :P).

Why I told this is that these are things you need to pay attention to while following my tutorial. The "~" part will change according to which is your current working directory, thus where your commands get executed. The "$" and "#" signs are important because I'll prefix my commands with these, denoting whether you should execute those commands under your user account or as root. You may run commands as root by either switching to the root user with "sudo -i" or prefixing the command with "sudo" (e.g. "sudo apt-get install wine"). If you use the first method, be careful to leave the root shell before performing a command that is supposed to run under your user account. You can leave the root shell by typing "exit" or pressing CTRL-D, thus you should get your $ prompt back.

You can change directories with the cd command and list the contents of the actual directory with the ls -l command.



Set up Wine for RPG Maker games


Install Wine

To install Wine on a Debian-based distro:

Code: [Select]
# apt-get install wine winetricks
With this, we also install winetricks that is a very powerful tool for installing various packages needed by various Windows applications to run under Wine.


Create a distinct wineprefix for your RGSS games

A wineprefix is basically a custom directory where Wine builds up a distinct environment with custom settings and virtual Windows filesystem. Your default wineprefix is ~/.wine; but I don't recommend littering it with RGSS-specific settings. Creating a wineprefix is as simple as creating a new directory and then telling Wine to use that.

In this tutorial, we use ~/wine-rgss as Wine prefix.

Code: [Select]
$ mkdir ~/wine-rgss
$ WINEPREFIX=~/wine-rgss winecfg

Wine will automatically create a new configuration within that folder (it might take a few seconds), then a Windows-like settings panel will open.

The WINEPREFIX=~/wine-rgss part sets an environmental variable that is only valid for the command coming after it. Obviously, the WINEPREFIX variable tells Wine which directory to use as Wine prefix. Either run every wine command (winecfg, winetricks) prefixed with "WINEPREFIX=~/wine-rgss" or do an "export WINEPREFIX=~/wine-rgss" once, but keep in mind that it'll only be valid in your current shell! (Anyway, never to run Wine under root - you don't even need it!)

Now, on the Windows-like settings panel that is opened, go to the Libraries tab. Add overrides for "winegstreamer.dll" and "winepulse.drv" to the list. Select each item on the list and click "Edit...", then select "Disable". Then your "Existing overrides" list should look like this:

Code: [Select]
winegstreamer (disabled)
winepulse.drv (disabled)

Click OK, the settings panel will close and you should get back your prompt.

Then, you need to install the Microsoft DirectMusic API through winetricks.

Code: [Select]
$ WINEPREFIX=~/wine-rgss winetricks directmusic
Whatever installation procedure will commence and then - theoretically - you've set up your Wine prefix for running RPG Maker games. :) Congratulations! Though, specific games might require further actions...



Further instructions for specific games

This section assumes you already completed the instructions under "Set up Wine for RPG Maker games".


To the Moon

The reason why I list it first is that probably this is the easiest case. For me, To the Moon (Steam edition) started right away after having the above settings. Note, to run the Steam edition, you need to first start Steam under Wine, under the Wine prefix we created. Running Steam under Wine is not covered by this tutorial.

While the game should work as it is, if it doesn't, a guy named sulix on the Freebird Games forum suggested to extract the game data files. He wrote a C program for this purpose. Only do this if you really find it necessary.

Navigate to the directory where you installed To the Moon then issue the following commands:

Code: [Select]
$ wget http://sulix.ucc.asn.au/stuff/ttm_unpack.c
$ cc -o ttm_unpack ttm_unpack.c
$ chmod +x ttm_unpack
$ ./ttm_unpack
$ mv "To the Moon.rgssad" "To the Moon.rgssad.bak"

If you don't see error messages, try to start the game. If "cc" gave you an error, try the same with "gcc". If still no success, install gcc with this command and try again:

Code: [Select]
# apt-get install gcc
Remember you have a backup of the original packed game data file as "To the Moon.rgssad.bak"!


Melolune

Melolune is probably the trickiest case. So you installed it and started it, everything seems fine at the first glance, and then it crashes... wonder why... You're lucky that you're reading this because I'll save you hours of headache by spoiling the solution: the trick with this game is that it has a heckload of MIDI files those are supposed to play at certain points, while Wine is not prepared for MIDI playback out-of-the-box. The first point where you get a MIDI file played is at the prologue of the game when you put a piece of Melolune on one of the 3 pedestals. It takes like a minute to get there so it's a good point for testing. So if you try to put the orb on the pedestal, two things may happen: either the game will crash or the game will continue but the melody will just not play. Since the melody that is supposed to play (and all the forecoming MIDI melodies) add a lot to the gameplay experience, you should not continue playing without working around the problem!

Basically, there are supposed to be two solutions: configure Wine to handle MIDI playback or just convert the MIDI files to a more suitable format. I confess I chose the 2nd option, which is rather a workaround since it is not a remedy for the root cause. Its advantage is that it's easy to perform, the disadvantage is that you still won't be able to play MIDI under Wine, and this problem may come up with other games. While it must be possible somehow to configure Wine for MIDI playback, I didn't really get into it, 'cause honestly I'm not really interested: let's confess, MIDI is kind of aged and Melolune is like the only game I got this problem with.

Well, the good news is that it takes like 1 single command to convert all the .mid files of the game. I choose Ogg Vorbis as the target format, which is - being open-source and all - widely supported by Linux distributions, and such Wine should have no problem with playing Ogg Vorbis files.

And why it works? Turns out, the RPG Maker engine has a quite pleasant feature: it doesn't use full, hard-coded file names. Instead, the game scripts only refer to the base names of files without extensions. The engine then looks for the file with the given base name with various extensions, such as .mid, .mp3, .ogg, .wav, etc.. This is what we play at our advantage, this is why we are able to just replace the .mid files with .ogg files without the game noticing it.

So let's start, first download & install Melolune:

Code: [Select]
$ wget http://www.freshpulp.com/shigi/Melolune.exe
$ WINEPREFIX=~/wine-rgss wine Melolune.exe

A Windows dialog will appear which asks you where to extract the game. One thing to note here, since Unix has an entirely different directory structure where the DOS-like concept of "drives" (such as C:, D:, etc.) doesn't exist, Wine presents a virtual Windows directory structure for the applications, where (by default) it maps $WINEPREFIX/drive_c/ to drive C (in our example, it's like /home/username/wine-rgss/drive_c/) and the Unix root directory to drive Z. By default, the extractor extracts the game to the Melolune subdirectory of your current work directory - so if you are in your home directory, the extractor will offer "Z:\home\username" in the editbox. Now it is up to you where you extract the game - on the one hand it's hell convenient to have it right in your home, on the other hand it would be logical to browse to "C:\" or "C:\Games\" thus install the game under your Wine prefix. Whatever you choose, remember where you have the game installed and before continuing with the next step, cd to the Melolune directory.

Time to convert the MIDI files to OGGs. You need a tool called TiMidity for the conversion. To install it on Ubuntu:

Code: [Select]
# apt-get install timidity
Then, standing in Melolune's directory (where Game.exe is located), issue the following command and sit back, watch the wonder:

Code: [Select]
$ timidity -Ov Audio/*/*.mid
After a lenghty procedure, you'll have the .ogg files in their places, but while you still have the .mid files there too, the game will still try to play them and ignore our .ogg files. So you need to delete the MIDI files. Optionally, you can make a backup of them, though since you still have the entire package which you can extract any times you want, it is not necessary. Still, if you wonder, this is how you make a compressed backup:

Code: [Select]
$ tar cvf melolune_midi.tar Audio/*/*.mid
$ bzip2 --best melolune_midi.tar &

(With the & sign you send the command into the background since you don't give a shit when the compression will complete - you can just go on with deleting the .mid files, they are already in the .tar which is currently being compressed. If you ever need to restore the files: bunzip2 melolune_midi.tar.bz2 && tar xvf melolune_midi.tar.)

Now delete the .mid files:

Code: [Select]
$ rm Audio/*/*.mid
Then finally start the game:

Code: [Select]
$ WINEPREFIX=~/wine-rgss wine Game.exe
Go put some Melolune onto the pedestals to check whether you hear the melodies. After all this work, you really deserve to hear them!


Reincarnation

Reincarnation works out-of-the-box with our pre-configured Wine prefix, little additional setup is needed. As it is properly documented by the developers, it only requires to install an additional font - while clear instructions are given for Windows users on how to do so, Linux users are left without clue. Luckily, installing fonts is very easy under Linux.

Download & install Reincarnation:

Code: [Select]
$ wget "http://archeia.leafo.net/downloads/Reincarnation%20-RSW%20Release-%20v1.0c.rar"
$ unrar x "Reincarnation -RSW Release- v1.0c.rar"

(Note: if you don't have unrar installed, install it with "apt-get install unrar".)

Now you have the game extracted in the "Reincarnation -RSW Release- v1.0c" subdirectory. Go on with downloading and extracting the font:

Code: [Select]
$ wget -O VLGothic-20121230.zip "http://en.sourceforge.jp/frs/redir.php?m=jaist&f=%2Fvlgothic%2F57732%2FVLGothic-20121230.zip"
$ unzip VLGothic-20121230.zip

(Note: if the first command throws an error, you should try to download the file with a web browser from this page.)

If everything goes well, the contents of the ZIP are extracted into the VLGothic subdirectory.

To install the font, you only need to copy the TTF files into your ~/.fonts directory. Possible that the directory doesn't exist - in that case, just create it. After we copied the files, we delete the now unnecessary VLGothic directory.

Code: [Select]
$ mkdir ~/.fonts
$ cp -pi VLGothic/*.ttf ~/.fonts/
$ rm -r VLGothic

Everything should be fine now, let's start the game:

Code: [Select]
$ cd "Reincarnation -RSW Release- v1.0c"
$ WINEPREFIX=~/wine-rgss wine Game.exe


Fleuret Blanc

For a long time I believed it's completely hopeless to get this game working under Wine, but it turned out Fleuret Blanc is a similar case to Reincarnation - except it doesn't require one font, it requires hell lots of fonts to install.

Download and extract the game:

Code: [Select]
$ wget http://dl.dropbox.com/u/13694360/Fleuret%20Blanc.exe
$ WINEPREFIX=~/wine-rgss wine "Fleuret Blanc.exe"

The installer and the install process is the exact same that of Melolune's, so please scroll up to the Melolune instructions to see how to extract the game.

Now download and install the required fonts. We attempt to create the ~/.fonts directory in case it doesn't exist.

Code: [Select]
$ mkdir ~/.fonts
$ cd ~/.fonts
$ wget http://dl.dropboxusercontent.com/u/13694360/Fonts%20for%20Social%20Caterpillar.rar
$ unrar x "Fonts for Social Caterpillar.rar"
$ rm "Fonts for Social Caterpillar.rar"

Now cd to the Fleuret Blanc directory and start the game - exactly how you start all the other RPG Maker games discussed here.

Code: [Select]
$ WINEPREFIX=~/wine-rgss wine Game.exe

Social Caterpillar

Since the game is in closed beta state, you need to obtain the super-secret URL and a super-secret password from Merlandese to play it. In case you have the super-secret URL and the super-secret password, installation follows like this. Of course, substitute "supersecret" stuff with actual URLs, file names and passwords.

Code: [Select]
$ wget http://supersecret.tld/supersecret.rar
$ unrar x supersecret.rar

Note here, unrar will ask for the super-secret password on the terminal.

Because we love to play with matryoshka dolls, after we extracted the package, we get the actual installer package right there.

Code: [Select]
$ WINEPREFIX=~/wine-rgss wine supersecret.exe

Installation is the same as with Fleuret Blanc and Melolune. Download and install the same fonts the same way those Fleuret Blanc require (see above). Start the game the usual way (don't forget specifying the Wine prefix).



Creating a desktop launcher for your installed game

Realizing that most people don't like to meddle on the command-line as much as I do, I tell you a way to create a convenient desktop launcher on your desktop which you just need to double-click to start the RPG Maker game you already installed.

First, go into the directory where you installed the game and create a shell script with your favourite plaintext editor. (GEdit or nano are recommended.)

The contents of the text file will be something like this (obviously you need to replace paths with your actual paths). Example is provided for Melolune.

Code: [Select]
#!/bin/sh
cd ~/Melolune
WINEPREFIX=~/wine-rgss wine Game.exe > stdout.txt 2>&1 &

(As a bonus, we send Wine's debugging messages into stdout.txt which you may inspect in case you encounter problems. E.g. on Wine support forums you'll be asked for that output so it's something useful to have.)

Save this file as start_melolune.sh or something more appropriate and give it executable permission (chmod +x, or change the file's properties through your GUI)!

Now that you have the start script, create a text file on your desktop and name it like Melolune.desktop - the .desktop extension is important! Copy the following lines into that text file and change them according to the actual game:

Code: [Select]
[Desktop Entry]
Name=Melolune
Comment=Melolune IGF 2010 demo
Exec=/home/username/Melolune/start_melolune.sh
Terminal=false
Type=Application
Categories=Game;

The Comment and Categories fields are optional.

Now save the text file and make it executable! Look, now you have a launcher!

Test your launcher - if if doesn't work, double-check the start script and the .desktop file and ensure both files are executable! Be aware that if I remember correctly, resolution of "~" doesn't work in .desktop files, so you need to supply the absolute Unix path to the launcher file and (optionally) the icon.


Adding icon to your desktop launcher

Now you have a launcher but it's quite ugly for it has a generic application icon. If you want eye candies, you could add the game's icon to the launcher. If an .ico file is included with the game, you are lucky. If not, you need to extract it from the game's exe file with wrestool, which is included in the icoutils package on Ubuntu (if you do have an icon, however, skip this step):

Code: [Select]
$ wrestool -x -t 14 Game.exe > melolune.ico
Unfortunately, your desktop doesn't handle .ico files well, so you'll need to convert it to a more suitable format with icotool:

Code: [Select]
$ icotool -x -o melolune_icon.png --palette-size=0 --width=48 melolune.ico
You'll have a melolune_icon.png file in the directory. If not, probably the .ico file doesn't contain a 48x48 sized icon. In this case, try this:

Code: [Select]
$ icotool -x --palette-size=0 melolune.ico
Multiple PNG files should turn up in the directory, with different sizes and color depths. Pick the one with the best quality.

Edit your .desktop file and add a line like this:

Code: [Select]
Icon=/home/username/Melolune/melolune_icon.png
Save the file and now your launcher should show up with a nifty icon! :)
« Last Edit: October 06, 2013, 10:35:56 PM by Unnamed »

Merlandese

  • Coffee Leeble
  • *
  • Posts: 723
    • View Profile
Re: Running RPG Maker games under Wine
« Reply #1 on: October 03, 2013, 06:29:20 PM »
Wow, this is super useful! I bet a lot of people could benefit from this information.


small

  • Swifthand
  • *
  • Posts: 1871
    • View Profile
    • A Quiver of Crows
Re: Running RPG Maker games under Wine
« Reply #2 on: October 03, 2013, 06:45:48 PM »
Wow! Thanks for all the detailed information here (and going into each specific game).

I'm no longer using Kubuntu - we have moved onto the Mac (dual-booting with Windows). This'll be helpful if I go back to Linux.  :)
Developer and composer for A Quiver of Crows.

Unnamed

  • Shroom-Trainer (Level 7)
  • *
  • Posts: 590
  • Hello?
    • View Profile
Re: Running RPG Maker games under Wine
« Reply #3 on: October 04, 2013, 09:57:37 PM »
I told you that winetricks is a powerful tool and today I looked into it - turns out it's quite easy to extend it with new "verbs" to install games. (A great list of games is already installable through Winetricks - including Plants vs. Zombies.)

Now I wrote a Winetricks verb that installs Melolune with a single command. It's quite unattended, it doesn't even require to click through the extractor.

Here it is:

Code: [Select]
w_metadata melolune_demo games \
    title="Melolune IGF demo" \
    publisher="Laura Shigihara" \
    year="2009" \
    media="download" \
    file1="Melolune.exe" \
    installed_exe1="C:\\Games\\Melolune\\Game.exe"

load_melolune_demo()
{
    if test ! -x "`which timidity 2>/dev/null`"
    then
        w_die "You need TiMidity to properly install this game.  Please install it (e.g. 'sudo apt-get install timidity' or 'sudo yum install timidity')."
    fi

    w_override_dlls disabled winegstreamer winepulse.drv
    echo This game requires the Microsoft DirectMusic API...
    w_call directmusic
    w_download http://www.freshpulp.com/shigi/Melolune.exe 00cd1a34c4b9ed001f8b2b3523d2eeaa7bf68cd2
    mkdir -p "$W_DRIVE_C/Games/Melolune"
    cd "$W_DRIVE_C/Games/Melolune"
    w_try_cabextract "$W_CACHE/$W_PACKAGE/Melolune.exe"
    w_try timidity -Ov Audio/*/*.mid
    rm Audio/*/*.mid

    w_declare_exe "$W_DRIVE_C\\Games\\Melolune" "Game.exe"
}

It's not really complete, but after all it does everything that I elaborated above. It would be nice if it would create a desktop icon or something for those who find launching stuff from the command-line troublesome.

To use it:
  • Download winetricks.
  • Save the above code into a file named "melolune_demo.verb".
  • Install TiMidity.
  • Install Melolune with "winetricks melolune_demo.verb".

Since unfortunately you won't have any shell script or launcher icon to actually start the installed game, you need to do that with the following commands:

Code: [Select]
$ cd ~/.local/share/wineprefixes/melolune_demo/drive_c/Games/Melolune/
$ WINEPREFIX=~/.local/share/wineprefixes/melolune_demo/ wine Game.exe

I'll try to get this verb included in the official winetricks release - it would be hell awesome if it would get there.

Anyway, not sure if you're aware, but Wine is also available for Mac, and so is Winetricks. It's possible that my solution would work on Mac too! It worths a try! Since it's especially easy to try with the above winetricks verb, I would be grateful if someone would try to install Melolune on Mac!

Unnamed

  • Shroom-Trainer (Level 7)
  • *
  • Posts: 590
  • Hello?
    • View Profile
Re: Running RPG Maker games under Wine
« Reply #4 on: October 05, 2013, 09:50:07 PM »
I refined the Winetricks verb and so now it creates a desktop launcher! \o/

Here's the new script:

Code: [Select]
w_metadata melolune_demo games \
    title="Melolune IGF demo" \
    publisher="Laura Shigihara" \
    homepage="http://leebleforest.wordpress.com/demo/" \
    year="2009" \
    media="download" \
    file1="Melolune.exe" \
    installed_exe1="C:\\Games\\Melolune\\Game.exe"

load_melolune_demo()
{
    if test ! -x "`which timidity 2>/dev/null`"
    then
        w_die "You need TiMidity to properly install this game.  Please install it (e.g. 'sudo apt-get install timidity' or 'sudo yum install timidity')."
    fi

    w_override_dlls disabled winegstreamer winepulse.drv
    w_call directmusic
    w_download http://www.freshpulp.com/shigi/Melolune.exe 00cd1a34c4b9ed001f8b2b3523d2eeaa7bf68cd2
    INSTALLDIR="$W_DRIVE_C/Games/Melolune"
    mkdir -p "$INSTALLDIR"
    cd "$INSTALLDIR"
    w_try_cabextract "$W_CACHE/$W_PACKAGE/Melolune.exe"
    w_info Converting MIDI files... this may take a long time ranging from minutes to half an hour, depending on your CPU speed.
    w_try timidity -Ov Audio/*/*.mid
    rm Audio/*/*.mid

    STARTSNAME=start_melolune.sh
    echo \#\!/bin/sh > $STARTSNAME
    echo cd $W_DRIVE_C/Games/Melolune >> $STARTSNAME
    echo WINEPREFIX=$WINEPREFIX wine Game.exe \> stdout.txt 2\>\&1 \& >> $STARTSNAME
    chmod +x $STARTSNAME

    # If possible, create desktop launcher
    if test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
    then
        . ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
        LAUNCHERNAME=${XDG_DESKTOP_DIR:-$HOME/Desktop}/Melolune.desktop
        echo Creating desktop launcher: $LAUNCHERNAME
        echo \[Desktop Entry\] > $LAUNCHERNAME
        echo Name=Melolune >> $LAUNCHERNAME
        echo Comment=Melolune IGF 2010 demo >> $LAUNCHERNAME
        echo Exec=$INSTALLDIR/$STARTSNAME >> $LAUNCHERNAME
        if test -x "`which wrestool 2>/dev/null`" -a -x "`which icotool 2>/dev/null`"
        then
            ICONNAME=melolune.ico
            echo Trying to extract icon from executable: $ICONNAME
            wrestool -x -t 14 Game.exe > $ICONNAME
            icotool -x -o melolune_icon.png --palette-size=0 --width=48 $ICONNAME
            echo Icon=$INSTALLDIR/melolune_icon.png >> $LAUNCHERNAME
        else
            echo Could not extract game icon.
        fi
        echo Terminal=false >> $LAUNCHERNAME
        echo Type=Application >> $LAUNCHERNAME
        echo Categories=Game\; >> $LAUNCHERNAME
        chmod +x $LAUNCHERNAME
    else
        echo Could not create desktop launcher.
    fi

    w_declare_exe "$W_DRIVE_C\\Games\\Melolune" "Game.exe"
}

This is how the desktop launcher looks like:


Additional effort was needed to extract the icon resource from the .exe file - such a pity that Melolune is using the generic RPG Maker icon. :D Really, at least it should have a leeble icon or something! :P

So with the above script even a donkey could install Melolune with a single command! ;) Everything gets totally automatically downloaded, installed, converted and extracted.

The only problem remaining - and it is something I didn't mention in the above tutorial - is that some builds of Wine doesn't have MP3 support due to patent issues and such. There should be a way to detect it, and the absolute ideal solution would be to automatically install an MP3 codec if necessary.

Shotoku

  • Guest
Re: Running RPG Maker games under Wine
« Reply #5 on: October 06, 2013, 05:00:13 PM »
Yes, works on Mint too :) Thanks

Unnamed

  • Shroom-Trainer (Level 7)
  • *
  • Posts: 590
  • Hello?
    • View Profile
Re: Running RPG Maker games under Wine
« Reply #6 on: October 06, 2013, 10:54:10 PM »
Yes, works on Mint too :) Thanks

Great! :) Thanks for trying! Did you follow my step-by-step instructions or did you try my Winetricks verb?

Meanwhile, I extended the tutorial with a "Creating a desktop launcher for your installed game" section.

Note to admins: I've been going through Hell to tailor my message to fit in the 20000 characters message size limit, which would be nice if you increased to at least 50000. I'm aware that I can't post infinite-sized messages, so I should have broken it into multiple posts... but it would look stupid if they weren't at the start of the thread... I should have left some placeholder posts, but I didn't... I'm thinking on what to do about it... But for now, please just increase the limit to 50000, maybe my tutorial won't go past that size.

I bet I'm the first one who ever reached the 20000 characters limit on this forum - do I deserve an achievement for that? :P

Shotoku

  • Guest
Re: Running RPG Maker games under Wine
« Reply #7 on: October 07, 2013, 08:38:59 AM »
I did this one http://www.supershigi.com/forums/index.php?topic=888.msg19713#msg19713

I actually meant to do the desktop icon one, but wasn't paying attention and just did the first winetricks verb / script thing, where it downloads itself and all that fun stuff. I had a little trouble, but not much, finding the game's executable afterwards because I didn't use the desktop icon one. The only real problem I have found is that I can't use my xbox controller as I could on windows (I'm guessing this is a problem with Wine and not your code though  :) )

Unnamed

  • Shroom-Trainer (Level 7)
  • *
  • Posts: 590
  • Hello?
    • View Profile
Re: Running RPG Maker games under Wine
« Reply #8 on: October 07, 2013, 10:12:29 AM »
You can still create a launcher manually by following the guide above I added this morning. Expect your Melolune installation to be located in ~/.local/share/wineprefixes/melolune_demo/drive_c/Games/Melolune/.

As for controller support, I'm not sure if it's a Wine issue, to be honest I'm not sure if Melolune supports controllers at all.

I've never played any games with controller yet, but now that you mention, this is going to change as I just ordered a gamepad last week. Hope it'll arrive soon, I'm curious how it feels like. :)

Unnamed

  • Shroom-Trainer (Level 7)
  • *
  • Posts: 590
  • Hello?
    • View Profile
Re: Running RPG Maker games under Wine
« Reply #9 on: October 07, 2013, 09:40:08 PM »
Melolune's WineHQ AppDB page has been approved. \o/
http://appdb.winehq.org/objectManager.php?sClass=version&iId=29161

Shotoku, please record your results. :) Did you get far in the game?

Shotoku

  • Guest
Re: Running RPG Maker games under Wine
« Reply #10 on: October 08, 2013, 12:42:32 PM »
I didn't play much the first time, but last night I started over, meaning deleting everything Melolune currently installed, and ran the new script. With one commanand the whole thing downloaded and installed without a hitch. The desktop icon was created with the appropriate image and I was able to play about 30 minutes in the game without any problems whatsoever.  :D I just checked and I am able to load my game from last night too. I'll keep informed if anything wrong happens during the rest of the game.

And Melolune (or at least RPG Maker games) does support controllers. At the very least they support the xbox 360 controllers (the current standard for games, and the only controller that ~75% of modern games will accept). This is all talking about Windows however, upon further review Wine does not seem to work with xbox360 controllers' standard xinput at the moment without some extra work...
http://steamcommunity.com/app/221410/discussions/0/828938354860178892/

but as I said, I'm going to come back and tell the results of everything when I've reached the end.

Unnamed

  • Shroom-Trainer (Level 7)
  • *
  • Posts: 590
  • Hello?
    • View Profile
Re: Running RPG Maker games under Wine
« Reply #11 on: October 08, 2013, 02:01:46 PM »
Please note, however, Shigi's in charge for actual in-game bugs; I only bother with issues those might arise from Wine-compatibility problems.
But man, that's great! Thanks for testing! I'm really glad that Melolune can now be played on other platforms too, even if it's through a workaround! :)

And now, this is for Fleuret Blanc:

Code: [Select]
w_metadata fleuretblanc games \
    title="Fleuret Blanc" \
    publisher="Twelve Tiles" \
    homepage="http://fleuretblanc.com/" \
    year="2012" \
    media="download" \
    file1="Fleuret Blanc.exe" \
    installed_exe1="C:\\Games\\Fleuret Blanc\\Game.exe"

load_fleuretblanc()
{
    w_override_dlls disabled winegstreamer winepulse.drv
    w_call directmusic
    w_call corefonts
    w_call cambria
    w_call constantia
    w_download http://www.twelvetiles.com/Fleuret%20Blanc.exe 09fbc116b1ac161cd4f45cac1951224848dd95f3 "Fleuret Blanc.exe"
    INSTALLDIR="$W_DRIVE_C/Games/Fleuret Blanc"
    mkdir -p "$INSTALLDIR"
    cd "$INSTALLDIR"
    w_try_cabextract "$W_CACHE/$W_PACKAGE/Fleuret Blanc.exe"

    STARTSNAME=start_fleuretblanc.sh
    cat > $STARTSNAME << _EOF_
#!/bin/sh
cd "$W_DRIVE_C/Games/Fleuret Blanc"
WINEPREFIX=$WINEPREFIX wine Game.exe > stdout.txt 2>&1 &
_EOF_
    chmod +x $STARTSNAME

    # If possible, create desktop launcher
    if test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
    then
        . ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
        LAUNCHERNAME="${XDG_DESKTOP_DIR:-$HOME/Desktop}/Fleuret Blanc.desktop"
        echo Creating desktop launcher: $LAUNCHERNAME
        cat > $LAUNCHERNAME << _EOF_
[Desktop Entry]
Name=Fleuret Blanc
Comment=Fleuret Blanc
Terminal=false
Type=Application
Categories=Game;
Exec="$INSTALLDIR/$STARTSNAME"
_EOF_

        if test -x "`which wrestool 2>/dev/null`" -a -x "`which icotool 2>/dev/null`"
        then
            ICONNAME=fb.ico
            echo Trying to extract icon from executable: $ICONNAME
            wrestool -x -t 14 Game.exe > $ICONNAME
            icotool -x -o fb_icon.png --palette-size=0 --width=48 $ICONNAME
            echo Icon=$INSTALLDIR/fb_icon.png >> $LAUNCHERNAME
        else
            echo Could not extract game icon.
        fi
        chmod +x "$LAUNCHERNAME"
    else
        echo Could not create desktop launcher.
    fi

    w_declare_exe "$W_DRIVE_C\\Games\\Fleuret Blanc" "Game.exe"
}


BUT! Since the verbs for installing the Cambria and Constantia fonts were just added today by the Winetricks developer, they aren't part of the actual stable Winetricks release yet; you need to use today's SVN snapshot:

Code: [Select]
$ wget [url]https://winetricks.googlecode.com/svn-history/r1070/trunk/src/winetricks[/url]
$ chmod +x winetricks
$ ./winetricks fleuretblanc.verb

Of course the above script must be saved into fleuretblanc.verb.

Omni

  • Shield Guard
  • *
  • Posts: 1125
    • View Profile
    • Omni's DeviantArt
Re: Running RPG Maker games under Wine
« Reply #12 on: December 30, 2013, 04:55:39 PM »
Hey, I just thought I'd mention that I just tried running To the Moon under Wine on Mac and got it to work. :)  I had to use a somewhat different method, but it turned out simpler , and I thought I'd share how I did it.

I'll note that I'm using OS X 10.8.5 and results may vary somewhat.

  • First, go to winebottler.kronenberg.org and download the latest stable version of WineBotter Combo.
  • Open the DMG file (if it doesn't on its own) and drag the files to wherever you'd like (usually the Applications folder).
  • Run the copy of Wine that you just installed.  The menu will appear near the right side of the menu bar with the icon of a wineglass.
  • In the menu, select "change prefix" (or something with the word "prefix" in it - it's been awhile since I've looked at a fresh install).
  • Click 'add.'
  • Call the prefix whatever you want, save it wherever you want.
  • Once it's made, select "Winetricks" from the Wine menu.
  • Select and install "directmusic" and "ddr=gdi".  (Feel free to use the search to help you find them.)
  • If you haven't already, download the To the Moon installer by going here and clicking "Try one hour (free)."
  • Install the program wherever you want.  (NOTE: If you want to install it under a normal Mac directory, click 'Browse...', select "My Computer > Z drive" and navigate to where you install it.  Make sure to install it under a directory where you have full access privileges or the installer will hang.  If you install it under the normal directory, you can still find it by selecting "File manager" under the wine menu, then locating the program though the Windows-like navigator - or by going to the location the prefix is saved in and selecting "drive_c" - and it can be found under "Program Files".
  • Run "To the Moon.exe" - if it asks how you want to run it, run it through the prefix.

...and ta-da! :)

I haven't noticed any major bugs that occur by running through Wine.  (Just a minor glitch with a short sound playing over and over that stopped around when I reach the house.  Other than that, it should work fine.)  If you want to play the game windowed, press "Command + Return/Enter" once the game starts.  (I hear there are ways to get it to start windowed, but I haven't managed to find one that works in this case.)

Optionally, you can make a standalone of To the Moon using WineBotter.  To do so, launch WineBottler, select "Advanced," and using the same basic options as in my step-by-step list.  It seems to work the best if you create a new prefix, use the installer, and bundle it with the Wine binaries.  (Other methods seemed to hang when I tried them out.)  However, if you do this - at least with the binaries bundled - you'll end up with a large app (over 600 MB in size in my case).  Personally, I prefer to install it in my Applications folder and run it from there.


I haven't tested this with other games yet.  However, it should generally work if you add any additional Winetricks that Unnamed mentioned in his guides.  (It might work best if you give each game its own prefix, though in general I think the added Winetricks won't hurt.)
« Last Edit: December 30, 2013, 05:51:53 PM by Omni »


Minecraft Server: Craft Pointe - Temporarily Down