question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HedgeModManager on Linux/Steam Deck

See original GitHub issue

EDIT: There are more updated instructions on the HedgeModManager wiki. Additionally, there’s a script that can automatically install HedgeModManager through Bottles (Flatpak), which is mainly useful for the Steam Deck.

The original post below was initially done with wine and winetricks.


Hello!

Sorry for my English, as I don’t speak or write fluently, I had to use a translator. But what matters is to understand the main thing, to run the game and the MOD. Sorry also to post this here if it is the wrong place, I wanted to help in some way but I don’t know where to do it.

Well, let’s go:

I recently installed the Sonic Forces game on Linux and knowing that you can use MOD, I searched the internet for a program to help me with this. That’s when I found out about HedgeModManager and wanted to use the same one.

The installation of the Sonic Forces game was very easy, I just installed it and it worked. The HedgeModManager program, on the other hand, became a challenge and so I researched the internet again about making it work. I discovered somewhere that I no longer remember the dependency on Framework 4.7.2+ and thanks to a certain comment and later a solution for using WPF programs, a door was opened to start HedgeModManager.

With everything ready, we only have one observation, the SonicForces.exe executable is 64 bits and HedgeModManager.exe is 32 bits.

So we have to install some dependencies on the game prefix, which is 64 and create another 32-bit prefix to use HMM.

For the job to work, you must install wine 4.6+. I installed staging version 4.7 on Ubuntu 20.04:

sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key -P /tmp
sudo apt-key add /tmp/winehq.key
sudo add-apt-repository "deb https://dl.winehq.org/wine-builds/ubuntu/ focal main"
sudo apt update
sudo apt install winehq-staging/focal winetricks/focal

Dependencies to run Sonic Forces + HMM on prefix 64:

dotnet48 d3dx9 vcrun2019

Dependencies for running HMM on prefix 32:

dotnet48 d3dcompiler_47

Sonic Forces will run on Proton + Steam and HMM on Wine.

My Steam directory is not configured in a standard location, so on your computer, edit the “DATA” and “COMMON” variable for your configuration.

Finally, the work:

APPID=637100
DATA=/home/files/Steam/steamapps/compatdata/$APPID
COMMON=/home/files/Steam/steamapps/common
APP=$COMMON/SonicForces/build/main/projects/exec

PFX=$DATA/pfx
cp -r $PFX/drive_c/Program\ Files\ \(x86\)/Steam/ $DATA
rm -rf "$PFX"_x32 && mkdir "$PFX"_x32
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX=$PFX WINEARCH=win64 winetricks -q dotnet48
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX=$PFX WINEARCH=win64 winetricks -q d3dx9
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX=$PFX WINEARCH=win64 winetricks -q vcrun2019
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX=$PFX WINEARCH=win64 wine $HOME/.cache/winetricks/vcrun2019/vc_redist.x86.exe /q

WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX="$PFX"_x32 WINEARCH=win32 wine path
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX="$PFX"_x32 WINEARCH=win32 winetricks -q dotnet48
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX="$PFX"_x32 WINEARCH=win32 wine reg add 'HKCU\Software\Wine\DllOverrides' '/f' '/v' 'd3d9' '/t' 'REG_SZ' '/d' 'native'
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX="$PFX"_x32 WINEARCH=win32 winetricks -q d3dcompiler_47
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX="$PFX"_x32 WINEARCH=win32 wine reg add "HKCU\\SOFTWARE\\Microsoft\\Avalon.Graphics" /v DisableHWAcceleration /t REG_DWORD /d 1 /f
cp -rf $DATA/Steam "$PFX"_x32/drive_c/Program\ Files/
cd "$PFX"_x32/drive_c
ln -s "Program Files" "Program Files (x86)"
cd windows
ln -sf system32 syswow64
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX="$PFX"_x32 WINEARCH=win32 wineserver -w
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX="$PFX"_x32 WINEARCH=win32 wineboot
wget -c https://github.com/thesupersonic16/HedgeModManager/releases/download/7.3-4/HedgeModManager.exe -P $APP
mkdir -p $APP/mods

cat <<'EOF' > ~/.local/bin/SonicForces_Mod
#!/bin/bash

APPID=637100
DATA=/home/files/Steam/steamapps/compatdata/$APPID
COMMON=/home/files/Steam/steamapps/common
APP=$COMMON/SonicForces/build/main/projects/exec
PFX=$DATA/pfx
cd $APP
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX="$PFX"_x32 WINEARCH=win32 wine HedgeModManager.exe "$@"
EOF
chmod +x ~/.local/bin/SonicForces_Mod


The creation of Script ~/.local/bin/SonicForces_Mod serves to execute the HMM program in an easy way without having to go to the game directory every time you use it.

The Sonic Forces game runs on Steam:

Ps.: Add these options in game properties to play

PROTON_OLD_GL_STRING=1 PROTON_NO_ESYNC=1 PROTON_NO_FSYNC=1 gamemoderun %command%

Optionally, if the game gets heavy on your computer, add MOD Sonic Forces - Low End Effects

End.

This way I was able to use the MOD I wanted in the game and play happily. Thank you creator of HedgeModManager, the program is very good.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:440 (81 by maintainers)

github_iconTop GitHub Comments

7reactions
GlowingRaincommented, Nov 25, 2021

I don’t know if I should comment on a closed issue/or here, but I thought I’d hijack the initial comment here. The thing is that I find this guide & script over-complicated, Using proton’s waitforexitandrun command is way more easier than what it’s described here for the average user, I however think this is only convenience, launching the mod manager from Steam is a thing that makes wonders if we’re talking about custom/mod launchers in Linux. I have disabled hardware acceleration in the registry as stated in this issue.

As this works in Generations, I’d suppose it’ll work with Forces too and every other game that HedgeModManager supports, as I put the executable in the game’s folder.

I first used Proton 5-0.10 to launch the config tool to create the prefix for the compatdata folder, then install the requirements for the mod manager with protontricks (dotnet48 d3dx9 vcrun2019 d3dcompiler_47), and once completed, I used these launch parameters to launch it from Steam:

/home/user/path/to/proton-5-0.10/proton waitforexitandrun ~/path/to/steamapps/common/Sonic\ Generations/'HedgeModManager.exe'; echo %command%

Then it booted up with no problems. After that I installed some mods (didn’t play yet) to verify everything’s was working, and closed it. Then I switched to Proton 6.19-GE-2 in the compatibility tab and changed the launch parameters accordingly:

/home/user/path/to/proton-6.19-ge-2/proton waitforexitandrun ~/path/to/steamapps/common/Sonic\ Generations/'HedgeModManager.exe'; echo %command%

And it successfully launched HedgeModManager, even downloading updates works. The Save and Play button also works. So I don’t know why this wasn’t attempted first.

I’m sorry if this isn’t the place to post this information.

6reactions
thesupersonic16commented, Jun 30, 2022

This build should have CommonLoader removed. I think it might be worth also asking in #435 for how they got it working as they reported having it working on their end. HiteModLoader.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

HedgeModManager installation tutorial for Steam Deck ...
HedgeModManager installation tutorial for Steam Deck using SteamTinkerLaunch · Install SteamTinkerLaunch v12.12 via ProtonUp. · Open STL settings: ...
Read more >
another way for hedgemodmanager to work on deck?
2) Install ProtonTricks from the discover store and then open steam. 3) Next, open ProtonTricks and select sonic generations. Select the default ...
Read more >
Sonic Generation Steamdeck great fps nd ...
Open Lutris and press the plus button on top left, press add locally installed game, give name (Hedgemodmanager), runner must be wine, then...
Read more >
hedge mod manager
Enhance Your Sonic Frontiers Experience with Mods ... UPDATE (12/27/2022): updated Steam Deck guide is available! UPDATE (12/5/2022): video guide ...
Read more >
Game Details for Sonic Generations Collection
Once all that is done, just enable the mod in HedgeModManager and now Sonic Generations will run great on Steam Deck, maintaining a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found