1. Home
  2. Linux

How to use OpenXRay to play S.T.A.L.K.E.R. Call of Pripyat on Linux

S.T.A.L.K.E.R. Call of Pripyat is an excellent open world game that takes place in Ukraine, around Chernobyl. It’s the third entry in the S.T.A.L.K.E.R. series and is a cult classic for gamers that love post-apocalyptic adventures. Upon release, Call of Pripyat only ran on Windows. However, thanks to the new OpenXRay tool, Linux users can enjoy this game as well!

Getting Call of Pripyat working requires a legal copy of the game. There are a few ways to purchase it. For best results, grab the GOG.com release of the game, as it doesn’t come wrapped up in DRM, and will give you full access to the files.

Once you’ve bought the game, download it to your Linux PC and follow along to learn how to get it working!

Before we begin

Before we talk about how to get the game working on Linux with the OpenXRay engine, it’s important to point out that this code is in its early days and under heavy development. You may run into issues getting the game to run with this tool, due to the complexity of supporting different Linux distributions, and unpatched bugs.

If you run into any problems with the code during this guide, feel free to check out the issue page and tell the developers so they may help mitigate the issues.

Install Call of Pripyat

The game needs to be installed on your Linux PC before the OpenXRay binaries, source code or anything else is fiddled with. To install the Windows version of Call of Pripyat, you must install Wine.

Installing Wine is a pretty easy process that we’ve covered pretty extensively on Addictivetips in the past. For best results with Call of Pripyat on Linux, we highly recommend going with Wine 4, as it has great updates that aid gamers on Linux.

Once you’ve gotten Wine up and running, download the GOG release of S.T.A.L.K.E.R. Call of Pripyat to your Linux PC. Then, open up a terminal window. Having access to the command-line is critical during this process so that we can detect any errors with Wine during the installation. It’s also much easier to run EXEs this way.

Using the terminal window, CD into the ~/Downloads folder where the Pripyat game EXE file is.

cd ~/Downloads

In the Downloads folder, run the ls command, so that you can reveal the exact file name of the installer.

ls

Then, take note of the installer’s name and plug it into the wine command, to start up the installer. In the command below, replace stalker-call-of-pripyat.exe with the actual name of the EXE file in your download directory.

wine stalker-call-of-pripyat.exe

Running the wine command will instantly bring up the GOG Gui installer. Follow the instructions and learn how to get everything installed on your Linux PC.

When the GOG installer is done, there’s one last thing to do. We need to rename the default folder name that GOG gives CoP and change it to a more command-line friendly name. To do this, CD into the ‘GoG’ folder.

cd ~/.wine/drive_c/GOG\ \Games

Rename the directory from S.T.A.L.K.E.R. Call of Pripyat to Stalker-CoP with the mv command.

mv 'S.T.A.L.K.E.R. Call of Pripyat' Stalker-CoP

Dependencies for OpenXray

The OpenXray engine requires several build dependencies to compile the code successfully. To install these build dependencies, open up a terminal and follow the instructions that correspond to the Linux OS you use.

Ubuntu

sudo apt install git cmake libglew-dev libfreeimage-dev libfreeimageplus-dev liblockfile-dev libopenal-dev libtbb-dev libcrypto++-dev libogg-dev libtheora-dev libvorbis-dev libsdl2-dev liblzo2-dev libjpeg-dev libreadline-dev

Debian

sudo apt-get install git cmake libglew-dev libfreeimage-dev libfreeimageplus-dev liblockfile-dev libopenal-dev libtbb-dev libcrypto++-dev libogg-dev libtheora-dev libvorbis-dev libsdl2-dev liblzo2-dev libjpeg-dev libreadline-dev

Fedora

sudo dnf install git cmake glew-devel freeimage-devel freeimage-plus-devel liblockfile-devel openal-devel tbb-devel cryptopp-devel libogg-devel libtheora-devel libvorbis-devel SDL2-devel lzo-devel libjpeg-turbo-devel readline-devel

Getting OpenXray working

The OpenXRay game engine is on GitHub. To get it, you’ll need to download everything using the git clone command. In the terminal, use Git to clone the latest source code.

git clone https://github.com/OpenXRay/xray-16.git --recursive

After grabbing the source code, make a new build directory with mkdir.

cd xray-16

mkdir bin

Move into the build directory with CD and call cmake and make to compile the code.

cd bin

cmake ..

make -j$(nproc)

Finally, finish up the installation process by creating a new Linux bin directory in the Game’s folder and use make to install the built code into your copy of Stalker CoP.

mkdir -p ~/.wine/drive_c/GOG\ \Games/Stalker-CoP
make -j$(nproc) DESTDIR=~/.wine/drive_c/GOG\ \Games/Stalker-CoP install

Running the game on Linux

The binaries are built for Linux, but to run Stalker CoP on your PC, we need to modify a file. To start, CD into the game directory and delete the existing “fsgame.ltx” file.

cd ~/.wine/drive_c/GOG\ \Games/Stalker-CoP
rm fsgame.ltx

Next, copy the newly created fsgame.ltx file into the Stalker CoP directory.

cp -r ~/xray-16/res/* ~/.wine/drive_c/GOG\ \Games/Stalker-CoP

With the files in place, you can run the game with:

cd ~/.wine/drive_c/GOG\ \Games/Stalker-CoP/bin-linux

./xr_3da.sh -fsltx ../fsgame.ltx

Other ways to play S.T.A.L.K.E.R. Call of Pripyat on Linux

OpenXRay is an interesting project and it’s helping more and more Linux users enjoy Call of Pripyat, but it’s not the only way to play this game on the platform.

If you’ve tried out OpenXRay and found it lacking, or ran into some issues, you’ll be happy to know that it’s possible to run the GoG version of the game you installed with Wine directly. It also works well with Steam Play.

Leave a comment