StarDrive

StarDrive

Not enough ratings
BlackBox + Combined Arms mod running in Linux
By Ragnaman
How to get BB + CA working in Linux, using wine and winetricks.
   
Award
Favorite
Favorited
Unfavorite
Tools that you need
1. wine - https://wiki.winehq.org/Main_Page
2. winetricks - https://wiki.winehq.org/Winetricks
3. StarDrive BlackBox moddbpage - https://www.moddb.com/mods/deveks-mod
File repository: https://bitbucket.org/codegremlins/stardrive-blackbox/downloads/
From Blackbox you need two files (at the time of writing this guide):
- BlackBox_Mars_1.40.14000.exe
- BlackBox_Mars_Patch_1.40.14027.exe

4. Combined Arms - https://www.moddb.com/mods/combined-arms
File repository: https://bitbucket.org/codegremlins/combined-arms/downloads/
From CA you need this file (at the time of writing this guide):
- CombinedArms7.6J_Blackbox_Mars_1.40_Alpha_ONLY.zip

Now, lets test if your wine and winetricks work.
You can do that by opening terminal and using commands
wine --version
winetricks --version

both should return some numbers, mine at the moment returns:
wine-5.0 (Ubuntu 5.0-3ubuntu1)
20220411-next - sha256sum: <some checksum number>



I trust you know some Linux basics so I dont go into too much detail here, if you are lost at this stage just write in comments and we'll improve this guide.
Installing the game
You downloaded Blackbox files.
At the moment of writing this guide it was two files:
BlackBox_Mars_1.40.14000.exe
BlackBox_Mars_Patch_1.40.14027.exe


1. Open terminal
2. Navigate to where you have downloaded the .exe files
3. Use wine to run the main file, write in terminal:
wine BlackBox_Mars_1.40.14000.exe

This part should be self explanatory, just install to where you keep your games.
I have mine at /mnt/S/games/stardrive-blackbox as example

4. Use wine to run the patch file, write in terminal:
wine BlackBox_Mars_Patch_1.40.14027.exe

Should be easy, installer is self explanatory.
Configuration with winetricks (the fun part)
Before we start, I must explain a few basics about wine.
Wine is first of all a gigabased tool written by living gods.
and secondly, never run wine or winetricks as admin/sudo there should be no need ever.

Wine works by creating a sort of a sandboxed windows environment that is absolute minimum to run what you want to run.
These environments are called WINEPREFIXes (i know, a bit of a weird name, but just think of them this way, it will be easier.

Now, wine has its default WINEPREFIX set as your ~/home/<user>/.wine
If you create a new prefix via the GUI, it will be created most likely here ~/home/usr/.local/share/wineprefixes/<your-chosen-name>
However, for the purpose of running StarDrive we will have to create a completely separate WINEPREFIX env instance to ensure we dont have conflicts.

1. Open terminal.
2. Here we will set a few env variables for the terminal session, write in terminal:
export WINEARCH=win32
write location where you want your own wineprefix
example: export WINEPREFIX=/mnt/S/wineprefix/32bit

3. Run winetricks
winetricks

4. From gui selection, create a new wineprefix, select 32bit, name your wineprefix as you want.
5. Close the gui via cancel buttons
6. Install dotnet
winetricks -q dotnet472
(might take a while)

7. After all that reboot wine
wineboot -u

8. Install XNA
winetricks xna40

9. Reboot wine
wineboot -u

10. Install directX stuff
winetricks xact

11. Reboot wine
wineboot -u


Congrats,
your environment should be all set up.
A few things, the exported environment variables will work only for the active terminal session.
If you want to permanently assign those env variables you will have to read about how to do that yourself.
Running the game
1. Navigate to where your game is
2. Write in terminal:
wine StarDrive.exe

If there is a crash at this stage, either you missed something, either there is some cache conflict or I missed something in the guide.
Applying the mod
Before doing this, its best to test if the game works.
I assume you downloaded the Combined Arms mod archive already.

1. Navigate to location where you installed StarDrive BlackBox
2. If there is no "Mods" directory in the game directory, then create one
3. extract the mod archive contents to the "Mods" directory (it will probably have an extra directory after extract, double check).
File structure should be like:
game-root-dir -> Mods -> Combined Arms -> Buildings, Diplomacy, DiplomacyDialogs...etc.

4. Enable the mod from inside the game

Enjoy.
Troubleshooting & Stuff
BlackBox and Combined Arms discord: https://discord.gg/kkR5sDyN

1. Remember, the env values we set with export are only active for the terminal session (unless you do your own thing and make them permanent). Always remember to:
export WINEARCH=win32
export WINEPREFIX=<your wineprefix location>
Before you do your:
wine StarDrive.exe

2. If you get a complaint about gstreamer when running StarDrive.exe,
try:
wine --gst-disable-segtrap --gst-disable-registry-fork StarDrive.exe
and after that
wine StarDrive.exe