User:Fulmir

From BTAWiki
Jump to navigation Jump to search

This guide assumes you are running the native linux version BattleTech. If you installed the windows version and got it running through wine, parts of this guide may still be helpful, but it won't work exactly step by step.

1. Preparation.

All of these steps are necessary. Seriously, don't skip them - you'll get weird errors later on even if installing the mod seems to succeed at first.

1.1. Install Wine and winetricks

You'll need to install Wine in order to run the installer. On debian-based systems (such as Ubuntu), you can install it with

$ sudo apt-get install wine winetricks

Other distributions will have their own commands along similar lines.

1.2. Install dotnet 4.7.2

Installing BTA also requires dotnet 4.7.2. If you fail to install dotnet, you won't notice issues until you try to actually run the game. Do not skip this step.

$ winetricks dotnet472

1.3. Raising the open files limit

Most distributions default to a limit of 1024 open files at once, but you'll need to raise this for your user by editing /etc/security/limits.conf

$ sudo nano /etc/security/limits.conf

Insert these lines at the bottom of the file:

*               hard    nofile          32768
*               soft    nofile          32768

You'll need to log out and log back in, or restart your computer for this change to take effect.

2. Install BTA

2.1. Locate your BattleTech install and create the Mods directory

For Steam on Debian-based distributions, BattleTech is installed at ~/.steam/debian-installation/steamapps/common/BATTLETECH.

For GOG installs, the path will be something like `~/GOG Games/BATTLETECH/game`.

You want the folder containing the BattleTech binary and a folder for BattleTech_Data. For example, on my system:

$ ls -l ~/Games/BATTLETECH/game
total 27788
-rwxrwxr-x   1 <owner> <group_owner> 27147344 <modified_date> BattleTech
drwx------   8 <owner> <group_owner>    20480 <modified_date> BattleTech_Data
...more stuff...

In this directory, you'll need to create a Mods folder.

$ mkdir ~/Games/BATTLETECH/game/Mods

2.2. Setup an installer directory and download the installer.

You will need a directory to host the installer and cache outside the game directory. For purposes of this guide, we'll use BTAInstaller in your home directory, but feel free to use any other location outside of the game directory (and outside of .steam).

This location will need at least 40gb of free space. The cache is big.

$ mkdir ~/BTAInstaller
$ cd ~/BTAInstaller

Download the installer into this directory and unzip it, either using [this link](https://www.bta3062.com/files/BTAdvancedLauncher.php) or by running:

$ wget https://www.bta3062.com/files/BTAdvancedLauncher.php -O BTAdvancedLauncher.zip
$ unzip BTAdvancedLauncher.zip

You should end up with BTAdvancedLauncher.exe in your install folder.

$ ls -l ~/BTAInstaller
-rw-rw-rw- 1 bluewinds bluewinds 42516095 Jan  6 17:14 BTAdvancedLauncher.exe
-rw-rw-r-- 1 bluewinds bluewinds 42295941 Feb  3 13:57 BTAdvancedLauncher.zip

2.3 Configure the installer

Run the BTAInstaller:

$ wine ~/BTAInstaller/BTAdvancedLauncher.exe

At the bottom left of the installer, click "Advanced Mode".

You can then edit the "Install Target". Hit "Browse", and navigate to the location of the Mods folder you created in step 2.1. Also edit the "Checkout Workspace". Hit "Browse", and navigate to the installer directory you created in step 2.2.

2.4 Install!

You can now click "Update/Install BTA" to start the process.

When prompted to configure your game, be sure to select "Old Fire / Linux" at the bottom. Select *only* the addons for DLC you own - enabling addons for DLC you haven't installed will lock up the game when you try to play. Multithreading and Corgi's Perfix can improve performance.

When it asks for the location of the BattleTech Binary ("Unable to locate BattleTech.exe"), navigate to your BattleTech install (see step 2.1) and select the "BattleTech" file.

2.5 Enable ModTek 3.x

Steam on Linux

   Note These instructions are based on the Steam Guide for BepInEx.

Instead of running the run.sh script directly, you need to ask Steam to run it for you.

Right mouse click on the game in the Steam library -> Properties... -> SET LAUNCH OPTIONS.

Launch options for Linux:

   ./run.sh %command%

GOG on Linux

Modify the start.sh script from GOG to execute the run.sh script from ModTek/UnityDoorstop instead of BattleTech.

   #chmod +x "BattleTech"
   #./"BattleTech"
   ./run.sh

Proton/Wine on Linux

Using Proton or Wine is also supported, make sure the winhttp.dll from UnityDoorstop is loaded by setting the override to native, builtin.

Troubleshooting

Issue: The BTA Launcher will not run at step 2.1 and you get error message "MESA-INTEL:warning: processor code name Vulkan Support is incomplete"

Likely cause: Older hardware that OpenGL struggles with.

Solution: Run the following command in terminal before running the BTA Launcher with wine:

$ export MESA_GL_VERSION_OVERRIDE=4.5

Issue: The Launcher gives you the error message "non-folder object in selection" when trying to point the Install Target to the correct folder through the Launcher's "browse" button

Likely cause: Unknown

Solution: Edit the BTALauncherSettings.xml to apply the correct path, then restart the launcher to load up the correct path.

Issue: The game loads but the main menu doesn’t say “BattleTech ADVANCED - 3062” and the ModTek version doesn’t show up under the game version next to the CREDITs button

Likely cause: ModTek isn’t patched into the game correctly.

This can happen if dotnet is incorrectly installed or was not installed before the BTA installer was run.

Solution: Install dotnet472 with winetricks and (re)run the installer.

$ winetricks dotnet472

Run the installer, and "Update/Install BTA" again.

Issue: BattleTech refuses to launch/crashes to desktop immediately

Likely cause: Libc library conflict. The system libc is likely newer than, and incompatible with, the libc included in BattleTech’s native Linux distribution.

Solution: Remove libc.so.6 from the BattleTech game directory. This forces BattleTech to use the system libc.

$ mkdir -p "${BTA_ROOT}/../BattleTech_Data/Plugins/x86_64/"
$ mv "${BT_ROOT}/BattleTech_Data/Plugins/x86_64/libc.so.6" "${BTA_ROOT}/../BattleTech_Data/Plugins/x86_64/"

Issue: My Battletech directory is hidden, and I can't select it in the installer

Likely cause: Wine is not configured to show hidden paths, such as those beginning with a dot.

Solution: Run winecfg and select the Drives tab. Check "Show dot files" at the bottom. Now hidden folders (such as ~/.steam) will be visible in the installer.

Issue: The game wont run, or briefly runs and quits.

Open a terminal in the BattleTech dir where your binary for the game is located, you should see the run.sh there. Run this command to convert the line endings from windows to unix

   sed -i -e 's/\r$//' run.sh

and mark the script as executable, and finally run the game.

Issue: Not listed here

There are a few Linux users on the BTA Discord channel, you can ask for help in General Chat, message Indigo#8200 directly or open a support ticket with #ticketbot to get help resolving issues with BTA. For general issues with BattleTech on Linux, there are several forums available by searching your favorite search engine.