wine, sfall, ddraw, sluggish mouse, error loading cities
There have been dozens of queries from people trying to get the Fallout 2 Restoration Project installed and running properly in Wine under Linux. Some report that it possible, while others develop persistent, reproducable errors. Having just developed, worked through, and solved about all of the common errors people encounter when doing this, the cause of which some are hitherto undocumented, I shall now attempt to document the whole process.
First, let me thank killap and the original developers for all their hard work. I've played the game through twice, and this is one of those classics that it just about breaks your heart to see clearly not quite finished. Even with all its flaws, Fallout 2 remains one of the best games of all time. Killap's turned a sad epilogue into a triumph, so that these days, if we come across an old posting that reads "Help! I've lost the boot off my car!" we can just smile wryly and slide on by.
Now, Linux:
Install the latest version of wine. For Debian-based distributions like Ubuntu this can be effected with:
Code:
# apt-get update
# apt-get install wine
====Debian users only====
If, like I am, you're using Debian, the version in the standard repos may be too old to successfully run the RP installer. and you will need to use a later version from the backports repo.
Edit your sources file at /etc/apt/sources.list
Add the backports repo to the end of the file:
Code:
deb [url]http://www.backports.org/debian[/url] etch-backports main contrib non-free
Get the key to authenticate the backports repository:
Code:
# gpg --keyserver hkp://subkeys.pgp.net --recv-keys 16BA136C
Import the key to your keyring:
Code:
# gpg --export | apt-key add -
OK
And update your sources:
Finally, you can grab wine. You need to manually specify that you want to grab it from the backports repository, or the regular (old) package will be downloaded from stable:
Code:
# apt-get install wine -t etch-backports
the ALSA sound libraries were downloaded for me by default, but as I'm using the OSS drivers, I had to specify these too:
Code:
# apt-get install libwine-oss -t etch-backports
====End Debian section====
Insert your disk or mount the image (instructions for that are beyond the scope here. Google it if you don't know how.) and run the installer with wine from the command line, in your normal user account, NOT as root, or will be installed to root's home directory, instead of yours!
Code:
$ wine ~f2diskpath/SETUP.EXE
~f2diskpath will probably be something like /mnt/hdc1/ or /media/cdrom/ or /mnt/iso/ depending on your circumstances. Note also that CASE MATTERS in Linux, even though it doesn't in Windows. setup.exe and SETUP.EXE can exist in the same directory in linux (and accordingly, in wine's directory structure) even though it's impossible in Windows.
Next, copy the 1.02d patch to your fallout2 directory at /~user/home/.wine/drive_c/Program Files/BlackIsle/Fallout2/ and run it with wine.
Code:
$ wine /~user/home/.wine/drive_c/Program Files/BlackIsle/Fallout2/f2patch.exe
Finally, do the same for the RP after copying it to the fallout directory:
Code:
$ wine /~user/home/.wine/drive_c/Program Files/BlackIsle/Fallout2/F2_Restoration_Project_1.2.exe
If applicable, copy the hotfixes to the scripts directory too.
Now, check all of your fallout2 subdirectories. Anywhere you see duplicate files or directories where one is capitalised, and a subsequent one is lower case or has lower case letters, (~Fallout2/DATA/MAPS for example) you need to merge them. The easiest way is to cut the lower-cased sub-directory to another location, rename it with all capitals so it matches the original, and then copy it back to where you originally got it, selecting "Overwrite" when asked. This will replace older files with RP-patched ones. It is caused by inconsistent capitalisation between the old files (usually all-caps) and the new files, which are kind of all over the place. This doesn't matter in Windows, and does in Linux. Hopefully it will be fixed in a future release.
Next, you need to configure wine to run Fallout2 with workable settings.
1. In the Applications tab, click Add Application..., and browse to /~user/home/.wine/drive_c/Program Files/BlackIsle/Fallout2/fallout2.exe
2. Make sure the new fallout2.exe entry is selected, select "Windows XP from the drop-down box, and click apply.
3. making sure that fallout2.exe is still selected, click the Libraries tab. In the dropdown entry field type "ddraw" and click Add, then select "Native, then BuiltIn".
4. Under the Graphics tab, you might later need to toggle the "Allow DirectX apps to stop the mouse leaving their window" and "emulate virtual desktop" checkboxes if you encounter problems.
5. Check that Audio works under the audio tab. If it fails, but you know you otherwise have working sound, check that you have libwine-oss or libwine-alsa packages installed, depending on which one your sound is using.
Now you should be done, so click okay to close winecfg.
From here, plenty of people have had an issue where it was obvious that sfall wasn't loading properly, despite specifying that Fallout should use sfall's ddraw.dll in the fallout2 directory. After much anguish, it occurred to me to check the permissions, and therein lay the problem. ddraw.dll will get passed over it is not readable and executable. chmod the whole fallout2 directory and its subdirs to make it readable and executable:
Code:
# chmod -Rv a+rx ../Fallout2/
That is,
change
mode,
Recursively,
all (short for user,owner,group) add permissions
read and e
xecute to the fallout2 directory, assuming your cwd is the fallout2 directory. Modify the actual path as needed.)
You may also need to modify individual file permissions from here - I haven't confirmed this yet - I suspect ddraw.ini needs to be writable.
Some wine users experience mouselag over the play area, but not over menus, skilldex, etc, myself included. The cause is ddraw.dll. Wine's native ddraw and the built-in one in the ~/windows/system32/ directory both experience this pretty severely, and it is currently marked as a regression bug by WineHQ. I believe (but cannot confirm) that it is improved, but not fixed in the later versions of wine.
It is actually caused by some issue relating to a clash between the 24-bit colour mode your X11 session is likely configured to run at, and the 8-bit pallete that Fallout actually uses. Changing your X-session to 16 bit mode reduces the load significantly, and sfall's ddraw.dll does a better job than my version of wine's built-in one, sufficient for the game to playable. If that's not true for you, change X11 to 16 bit mode before you run fallout, or run it in a new instance of X. Instructions for this are beyond the scope here; Google is your friend.
The two most common problem areas of this might be fixable by the developer. Definitely the capitalisation issue can be (and, following best practices, ought to be), but I'm not sure about the permissions issue. The problem translating between the 8-bit and 24-bit colour is a wine issue, addressable to at least a working condition by the end user.
Edit:
Don't try to run the game as root either. It will produce weird results, sfall failing to load among them. (No points for guessing why I bother to mention this.) It's pretty dumb to give an application like wine that is *designed* to do weird stuff the kind of power that comes from running it as root anyway.