Difference between revisions of "Sandbox"

From BTAWiki
Jump to navigation Jump to search
(Linux install guide draft)
Line 1: Line 1:
{{AutoInfoboxVariant|ABS-2L}}
+
== Installation Guide: ==
===Description===
+
=== 1. Prep work. ===
{{MechDetails|ABS-2L}}
+
 +
: '''1a.''' Set some vars we’ll need later to avoid typos
 +
 +
$ BTA_SOURCE="$HOME/src/BATTLETECH/BTA"
 +
$ BT_ROOT="$HOME/.steam/debian-installation/steamapps/common/BATTLETECH"
 +
: '''1b.''' Ensure dependencies are installed
  
 +
:: Package managers vary from distro to distro, so it’s assumed you know how to navigate the distro you’re using.
 +
:: I’m using Pop_OS!, which is of Debian lineage, so that’s what this how-to will use.
  
===Bonuses===
+
$ sudo apt install wine unzip jq
'''Mech Quirk:''' Easy To Maintain
+
Wine -- to run the installer
 +
unzip -- to unzip the mod package
 +
jq -- to allow the pathfinder.sh mod path fixer to parse mod JSON files
 +
 +
: '''1c.''' Prepare a Wine prefix for the BTA installer.
 +
 +
$ mkdir -p “${BTA_SOURCE}"
 +
$ cd “${BTA_SOURCE}"
 +
$ wget https://dl.winehq.org/wine/wine-mono/6.1.0/wine-mono-6.1.0-x86.msi
 +
$ WINEPREFIX=“${BTA_SOURCE}/wine64" WINEARCH=win64 wine msiexec /i wine-mono-6.1.0-x86.msi
 +
: '''1d.''' Download the BTA Installer and Extract the .zip into ${BTA_SOURCE}
 +
 +
:: You’ll have to manually download the installer from NexusMods; then:
 +
 +
$ unzip “BattleTech Advanced 3062 Installer-452-v8-5-2-1613256258.zip"
 +
: '''1e.''' Prepare the Mods directory
  
Fast refits
+
:: If you try to run BTA alongside other mods, you are likely to have a bad time. 
 +
:: If the Mods directory already exists, delete it.  Then (re)create it.
  
 +
$ rm -rf “${BT_ROOT}/Mods"
 +
$ mkdir -p “${BT_ROOT}/Mods"
  
'''Pilot Affinity:''' Agile
+
=== 2. Run the installer ===
 +
 +
$ WINEPREFIX=$HOME/src/BATTLETECH/BTA/wine64 WINEARCH=win64 wine BTAdvancedLauncher.exe
 +
=== 3. Configure the installer ===
 +
: '''3a.''' Click the “Advanced Mode" button.
 +
: '''3b.''' Collect the installer paths
  
Gains 1 bonus evasion on movement
+
:: The installer needs to know where to install to. It cannot seem to browse into “hidden" paths (such as $HOME/.steam). Instead, you must copy and paste paths into the installer’s file/directory chooser after clicking the “Browse" button.
 +
:: To add further complication, the installer seems unable to parse forward-slash-delimited paths. You must convert to back-slash-delimited paths. You also must include the Windows drive letter “Z:".
 +
:: And so, let’s
 +
 +
: '''3c.''' Get those Windows paths:
 +
 +
:: Install Target path
 +
$ echo "Z:${BT_ROOT}/Mods" | sed -e 's#/#\\#g'
 +
:: The output should look like:
 +
Z:\home\indigo\.steam\debian-installation\steamapps\common\BATTLETECH\Mods
 +
:: Checkout Workspace path
 +
$ echo "Z:${BTA_SOURCE}" | sed -e 's#/#\\#g'
 +
:: BattleTech.exe Binary path
 +
$ echo "Z:${BT_ROOT}/BattleTech" | sed -e 's#/#\\#g'
 +
 +
: '''3e.''' Input the Install Target path
 +
:: Click the “Browse" button next to Install Target and copypasta the output into the “Filename" field of the file picker.
 +
 +
: '''3f.''' Input the Checkout Workspace path
 +
:: Click on the “Browse" button next to Checkout Workspace and do like you did in 3e.
 +
 +
=== 4. Install BTA ===
 +
Click the "Install and Update BTA" button. Pay attention to any popups or instructions.
 +
 +
: '''4a.''' Wait for it.
 +
:: At some point the installer will complain that it cannot find BattleTech.exe and ask you for help. Remember that “BattleTech.exe Binary path" we generated earlier?  Give it that.
 +
 +
=== 5. Ensure all the paths and symlinks are correct ===
 +
At this point the installation for Windows is complete.  However, HBS was kind enough to provide us with a native binary, so we have to change the Windows mod paths to POSIX VFS semantics.
  
 +
Thankfully some magical creature named “b2cc" has already written a script to do this for us.  The script is called “pathfinder.sh".  Let’s download an run pathfinder.sh now.
 +
 +
$ cd $HOME/.steam/debian-installation/steamapps/common/BATTLETECH
 +
$ wget https://gist.githubusercontent.com/b2cc/c312bec251aaecbfedd07e4d4bda512e/raw/f7fdaa5bc458372b421a6a207e93c4d9ea257901/pathfinder.sh
 +
$ bash pathfinder.sh -c
 +
You should see a lot of console spam and green happy words.
 +
 +
=== 6. Okay, that’s it. ===
 +
All done.  Go stomp.
 +
Get your dakka dakka pew pew on.
  
===Factions===
+
== Troubleshooting ==
{{MechFactions|ABS-2L}}
 
  
 +
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.
 +
 +
Cause #1: ModTek isn’t patched into the game correctly.
 +
 +
This can happen if mono is incorrectly installed or was not installed before the BTA installer was run the first time.
 +
 +
Solution: (re)run the ModTek Injector.  It should look like this if it worked correctly:
 +
 +
$ cd $HOME/.steam/debian-installation/steamapps/common/BATTLETECH/Mods/ModTek
 +
$ WINEPREFIX=$HOME/src/BATTLETECH/BTA/wine64 WINEARCH=win64 wine ModTekInjector.exe
 +
ModTek Injector
 +
---------------
 +
 +
Assembly-CSharp.dll backed up to Assembly-CSharp.dll.orig
 +
Injecting Assembly-CSharp.dll with ModTek.Injection.LoadModTek at BattleTech.Main.Start
 +
Writing back to Assembly-CSharp.dll...
 +
Injection complete!
 +
 +
If you have any issues, feel free to ping me on Discord.
  
 
{{LoadoutImageTest|image=ABS-2L.png}}
 
  
 
= Gear Index =
 
= Gear Index =

Revision as of 09:16, 29 March 2021

Installation Guide:

1. Prep work.

1a. Set some vars we’ll need later to avoid typos
$ BTA_SOURCE="$HOME/src/BATTLETECH/BTA"
$ BT_ROOT="$HOME/.steam/debian-installation/steamapps/common/BATTLETECH"
1b. Ensure dependencies are installed
Package managers vary from distro to distro, so it’s assumed you know how to navigate the distro you’re using.
I’m using Pop_OS!, which is of Debian lineage, so that’s what this how-to will use.
$ sudo apt install wine unzip jq

Wine -- to run the installer unzip -- to unzip the mod package jq -- to allow the pathfinder.sh mod path fixer to parse mod JSON files

1c. Prepare a Wine prefix for the BTA installer.
$ mkdir -p “${BTA_SOURCE}"
$ cd “${BTA_SOURCE}"
$ wget https://dl.winehq.org/wine/wine-mono/6.1.0/wine-mono-6.1.0-x86.msi
$ WINEPREFIX=“${BTA_SOURCE}/wine64" WINEARCH=win64 wine msiexec /i wine-mono-6.1.0-x86.msi
1d. Download the BTA Installer and Extract the .zip into ${BTA_SOURCE}
You’ll have to manually download the installer from NexusMods; then:
$ unzip “BattleTech Advanced 3062 Installer-452-v8-5-2-1613256258.zip"
1e. Prepare the Mods directory
If you try to run BTA alongside other mods, you are likely to have a bad time.
If the Mods directory already exists, delete it. Then (re)create it.
$ rm -rf “${BT_ROOT}/Mods"
$ mkdir -p “${BT_ROOT}/Mods"

2. Run the installer

$ WINEPREFIX=$HOME/src/BATTLETECH/BTA/wine64 WINEARCH=win64 wine BTAdvancedLauncher.exe

3. Configure the installer

3a. Click the “Advanced Mode" button.
3b. Collect the installer paths
The installer needs to know where to install to. It cannot seem to browse into “hidden" paths (such as $HOME/.steam). Instead, you must copy and paste paths into the installer’s file/directory chooser after clicking the “Browse" button.
To add further complication, the installer seems unable to parse forward-slash-delimited paths. You must convert to back-slash-delimited paths. You also must include the Windows drive letter “Z:".
And so, let’s
3c. Get those Windows paths:
Install Target path
$ echo "Z:${BT_ROOT}/Mods" | sed -e 's#/#\\#g'
The output should look like:
Z:\home\indigo\.steam\debian-installation\steamapps\common\BATTLETECH\Mods
Checkout Workspace path
$ echo "Z:${BTA_SOURCE}" | sed -e 's#/#\\#g'
BattleTech.exe Binary path
$ echo "Z:${BT_ROOT}/BattleTech" | sed -e 's#/#\\#g'

3e. Input the Install Target path
Click the “Browse" button next to Install Target and copypasta the output into the “Filename" field of the file picker.
3f. Input the Checkout Workspace path
Click on the “Browse" button next to Checkout Workspace and do like you did in 3e.

4. Install BTA

Click the "Install and Update BTA" button. Pay attention to any popups or instructions.

4a. Wait for it.
At some point the installer will complain that it cannot find BattleTech.exe and ask you for help. Remember that “BattleTech.exe Binary path" we generated earlier? Give it that.

5. Ensure all the paths and symlinks are correct

At this point the installation for Windows is complete. However, HBS was kind enough to provide us with a native binary, so we have to change the Windows mod paths to POSIX VFS semantics.

Thankfully some magical creature named “b2cc" has already written a script to do this for us. The script is called “pathfinder.sh". Let’s download an run pathfinder.sh now.

$ cd $HOME/.steam/debian-installation/steamapps/common/BATTLETECH
$ wget https://gist.githubusercontent.com/b2cc/c312bec251aaecbfedd07e4d4bda512e/raw/f7fdaa5bc458372b421a6a207e93c4d9ea257901/pathfinder.sh
$ bash pathfinder.sh -c

You should see a lot of console spam and green happy words.

6. Okay, that’s it.

All done. Go stomp. Get your dakka dakka pew pew on.

Troubleshooting

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.

Cause #1: ModTek isn’t patched into the game correctly.

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

Solution: (re)run the ModTek Injector. It should look like this if it worked correctly:

$ cd $HOME/.steam/debian-installation/steamapps/common/BATTLETECH/Mods/ModTek
$ WINEPREFIX=$HOME/src/BATTLETECH/BTA/wine64 WINEARCH=win64 wine ModTekInjector.exe 
ModTek Injector
---------------

Assembly-CSharp.dll backed up to Assembly-CSharp.dll.orig
Injecting Assembly-CSharp.dll with ModTek.Injection.LoadModTek at BattleTech.Main.Start
Writing back to Assembly-CSharp.dll...
Injection complete!

If you have any issues, feel free to ping me on Discord.


Gear Index

Gauss Rifle

EWAR

ECM (Guardian ECM, cGuardian ECM, Angel ECM, EWS (Electronic Warfare Suite), Experimental EWS, Proto EWS)

Active Probes (BAP, cAP, cLight AP, Boosted BAP, Bloodhound AP)

C3 (C3 Slave, C3 Master, C3i)

TTS

Apollo

Artemis IV

FCS Adv TC

TTS Called Shot

TTS MultiTrac

TTS Ballistic (Ballistic, Ballistic+, Ballistic Evasion+, Ballistic Evasion++)

TTS Energy (Energy, Energy+, Energy Evasion+, Energy Evasion++)

TTS Indirect (Indirect, Indirect+, Indirect++)

TTS Missile (Missile, Missile+, Missile Evasion+, Missile Evasion++)

Cockpit Slot

DNI Cockpit

Primitive Cockpit

Armored Cowl (Armored Cowl, Armored Cowl+, Armored Cowl++)

Command Console


Bottom Sensor Slot

Comms Suite (Comms Suite, Comms Suite+, Comms Suite++, Comms Suite+++) (Occupies bottom sensor slot)


Top Sensor Slot

Rangefinder (Rangefinder, Rangefinder+, Rangefinder++, Rangefinder+++) (Occupies bottom sensor slot)

Actuators

Foot Actuators

Leg Actuators

Hip Actuators

Hand Actuators

Lower Arm Actuators

Upper Arm Actuators

Shoulder Actuators