By following these instructions, I was able to frankenstein together the Loki Software Linux Railroad Tycoon 2 binaries with the data from a Windows Railroad Tycoon 2 Platinum disc.
WARNING: The installation produced by this will be missing the music and video cutscenes.
- Music (It doesn’t even seem to be trying to load it, so I have no idea where to start diagnosing.)
- Video cutscenes (I didn’t care enough to spend the effort. See this blog post for instructions on converting Smacker video to the type of MPEG Loki games expect and read further for how to identify what filenames it’s looking for.)
unshield or Wine to unpack the Windows installer
unzip to bypass the “Please insert ‘Railroad Tycoon 2 Loki disc'” message in the Linux installer
- Perl and the
/usr/bin/rename symlink to Perl’s
Instructions (all approaches):
rt.2_1.54c-multilingual_x86.mojo.run into your target directory
- Insert the Railroad Tycoon 2 CD into your CD drive
- Type or copy-paste the following commands, adjusting paths as appropriate:
# Unpack the Linux binaries
tar xvf patch-1.54c.tar
# Unpack the data files from the CD into the expected layout
mv Root_Files/* .
# Fix issues caused by Windows being case-insensitive and Linux
# being case-sensitive
mv Data data
(cd data; rename 'y/A-Z/a-z/' *)
(cd maps; rename 's/.MP2/.mp2/' *; rename 's/.MAP/.map/' *; rename 'y/A-Z/a-z/' \#*)
That will get the statically-built binary (./rt2) playable but you won’t get any sound because the static linking prevents PulseAudio from faking ALSA’s API. (It may play audio if run via pasuspender but I don’t like how pasuspender mucks with things, so I didn’t test it.)
Additional Instructions for working audio:
The simplest way to get working audio is to use the dynamic version. For that, you need some old library dependencies and a wrapper script capable of providing a 32-bit version of padsp’s functionality on 64-bit Linux:
tar xvaf loki_compat_libs-1.3.tar.bz2 --wildcards 'Loki_Compat/libsmjpeg-0.2.*' 'Loki_Compat/libSDL-1.*'
cat > run-dynamic.sh << EOF
if [ "$1" = '--strace' ]; then
strace ./rt2.dynamic 2>&1 | egrep -v '/(var|etc|lib)/|.loki/rt2|[./]pulse|Loki_Compat' | grep -i 'No such file'
chmod +x run-dynamic.sh
Now, you can use
run-dynamic.sh to launch it and your sound effects will work too.
Additional Instructions if you want to try to get videos or music working:
First, the most important trick I used to figure out which files to rename and how was running the game via this command:
strace ./rt2 2>&1 | grep -v '.loki/rt2' | grep -i 'No such file'
I’ve incorporated a more polished version into run-dynamic.sh which can be triggered by running it as
(Don’t worry about the
LD_PRELOAD errors. That’s just
strace complaining that it can’t use the 32-bit PulseAudio library that we’re requesting for the game itself.)
Second, be aware that, if you break the audio on the dynamic version, don’t click the Quit button. It’ll freeze the game without releasing your pointer. Instead, if audio isn’t working, hit Alt+F4 to ungrab the mouse and keyboard and switch to windowed mode, then use
xkill to kill the window.
In case you forget, I also advise running these so you can recover from a freeze while fullscreened by using Ctrl+Alt+F1 to switch to a console, logging in, running
./rt2_release_gui.sh, and then using Ctrl+Alt+F7 to return to your desktop.
echo "DISPLAY=:0.0 xkill -id $(DISPLAY=:0.0 wmctrl -l | grep Railroad | cut -d' ' -f1)" > ~/rt2_release_gui.sh
chmod +x ~/rt2_release_gui.sh