Skip to content

Running on Linux (Bottles)

SuperSonic16 edited this page Oct 17, 2024 · 3 revisions

The guide is written for the Steam Deck, this guide should still work on some other Linux OSes, if it does not, please ask in #219.

Tested Versions

  • SteamOS: 3.5.19
  • Bottles: 51.13
  • Bottles Runner: soda-9.0-1

Table of Contents

Introduction

Due to Hedge Mod Manager and it's mod loaders using advanced Windows libraries, installing and running on Linux can be quite difficult.

For this guide, Bottles will be used. Please be aware there is essentially two stages, the manager (Hedge Mod Manager) and the mod loader (e.g. HE2ML). Some manual work is may be needed for to get these working, especially for all the 64-bit games (Forces and newer).

This guide assumes you have some knowledge with using Linux and being able to work your way around any differences with common sense especially when not using a Steam Deck.

Installing Bottles

There are multiple ways to install Bottles. For ease, installing using the Discover GUI is used.

TODO: Add more information on installing Bottles.

Setting up permissions (Flatpak)

Setting up permissions is required to allow Bottles and it's applications such as Hedge Mod Manager to access the required files.

Hedge Mod Manager requires access to both your Steam directory and all of your Steam libraries. In this guide we will be giving Bottles access to your home (~) directory and any removable storage (/run/media).

This can be done in two ways, flatseal or through the command line interface (CLI)

Using Flatseal

After installing and running Flatseal. Select Bottles and change the following:

  • Filesystem
    • All user files: ON
    • Other files:
      • /run/media

image

Using the CLI

The following code will allow Bottles to access your home directory and any files in the "/run/media" directory like SD cards.

flatpak override --user --filesystem="home" com.usebottles.bottles
flatpak override --user --filesystem="/run/media" com.usebottles.bottles

Paste the code above into the terminal.

Setting up the bottle

Setting up the bottle (prefix) through the GUI is fairly straightforward. A configuration file is provided within the repository to make setting up eaiser.

TODO: Add more images.

Important

  • We strongly recommend against storing Hedge Mod Manager in any of the game folders.
  • Make sure both the bottle name and program name matches exactly HedgeModManager (Case sensitive)
  1. Download HedgeModManager.yml and HedgeModManager.exe and save them anywhere that Bottles can access. In this guide, it is saved in the home directory.
  2. Open the Bottles GUI, once the GUI has opened, click the + on the top left, or if you have no bottles, you can also click the big coloured button in the centre. image
  3. For Bottle Name, enter HedgeModManager.
  4. For Environment, make sure Custom is selected. image
  5. Scroll down to Custom and then for Configuration, make sure to select the HedgeModManager.yml file you've downloaded from the first step. image
  6. Press the Create button, and wait for all the dependencies to install, this can take a while. image
  7. After the bottle is created, select it, and press Add Shortcuts... image
  8. Select the HedgeModManager.exe file you downloaded from the first step.
  9. Make sure the name of the program matches exactly HedgeModManager
  10. Press the play icon to start Hedge Mod Manager

Troubleshooting

Bottle cannot be created

This can be caused by many things. Try updating your runner.

Game launchers to menu but the mod loader does not do anything

If set up correctly Hedge Mod Manager should autoconfigure the games to load the modloader. If this does not work, you can manually instruct Proton to do so by changing the game's launch arguments using Steam to WINEDLLOVERRIDES="dinput8.dll=n,b" %command% (change dinput8 to d3d11 for Sonic Forces and Sonic Colours Ultimate).

Before manually changing overrides, first you should check if the modloader is installed and loaded by checking if the button on the right in the "Settings" tab says "Uninstall Mod Loader" and not "Install Mod Loader". If its not installed, press the install button. If it is installed and still isn't loading any mods, enable the option "Enable debug console" then start the game, if you see a console window, the modloader is installed and loaded.

Game not starting

If set up correctly Hedge Mod Manager should autoconfigure the games to work with the modloaders, though this can sometimes not work for unknown reasons. The cause is likely due to the game prefix not having dotnet installed.

32-bit (Sonic Generations and Sonic Lost World)

Make sure the version of Proton contains Mono.

64-bit (Sonic Forces and newer)

At the time of writing, Mono is not compatible, because of this you will need to install .NET Framework. There are multiple ways of doing this.

  • Symbolic linking from HedgeModManager bottle

    • Locate the bottle prefix's C drive.
    • Locate the game's prefix. Usually located in ~/.local/share/Steam/steamapps/compatdata/<GAMEID>/pfx
    • You may use the Link Here option to create the symbolic links.
    • The following files that need to be linked:
      • windows/Microsoft.NET
      • windows/system32/mscoree.dll
      • windows/system32/ucrt*
      • windows/system32/vcrun*
  • Manually installing libraries from another system.

    • Download windows.7z.
    • Locate the game's prefix. Usually located in ~/.local/share/Steam/steamapps/compatdata/<GAMEID>/pfx
    • Enter the drive_c directory of the game prefix then windows and delete or rename the Microsoft.NET directory
    • Extract archive contents into the game's drive_c directory