Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HedgeModManager on Linux/Steam Deck #219

Closed
elppans opened this issue May 6, 2021 · 632 comments
Closed

HedgeModManager on Linux/Steam Deck #219

elppans opened this issue May 6, 2021 · 632 comments

Comments

@elppans
Copy link

elppans commented May 6, 2021

EDIT: An updated guide using Bottles is on the Hedge Mod Manager wiki.

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.

@elppans elppans closed this as completed May 6, 2021
@Reav77
Copy link

Reav77 commented Aug 8, 2021

This is amazing. But far too complicated. Im new to arch linux and I have absolutely no idea how to use this to open hedgemod manager. I was looking to mod Sonic Generations, but, if this is what is necessary, then its impossible for the average joe.

Elppans fala português? Então... A explicação de desse post não ta muito clara não, amigo. Mas o esforço e sucesso que você atingiu em executar o Hedgemod manager é admirável. vamos sonhar que um dia os devs do Hedgemod decidam criar uma versão linux do app. Até lá estamos ferrados.

@LeviLeal
Copy link

This is amazing. But far too complicated. Im new to arch linux and I have absolutely no idea how to use this to open hedgemod manager. I was looking to mod Sonic Generations, but, if this is what is necessary, then its impossible for the average joe.

Elppans fala português? Então... A explicação de desse post não ta muito clara não, amigo. Mas o esforço e sucesso que você atingiu em executar o Hedgemod manager é admirável. vamos sonhar que um dia os devs do Hedgemod decidam criar uma versão linux do app. Até lá estamos ferrados.

Tô tentando tbm e faço a menor ideia kk

@coatlessali
Copy link

Going to be real, I have not the slightest clue how to use this.

@elppans
Copy link
Author

elppans commented Sep 19, 2021

This is amazing. But far too complicated. Im new to arch linux and I have absolutely no idea how to use this to open hedgemod manager. I was looking to mod Sonic Generations, but, if this is what is necessary, then its impossible for the average joe.

Elppans fala português? Então... A explicação de desse post não ta muito clara não, amigo. Mas o esforço e sucesso que você atingiu em executar o Hedgemod manager é admirável. vamos sonhar que um dia os devs do Hedgemod decidam criar uma versão linux do app. Até lá estamos ferrados.

Olá... Eu falo português, sou do Brasil.
Eu tentei resumir a matéria e deixar somente o que é importante para mostrar e... parece que ficou complicado mesmo... huehue... Desculpe-me xD

@elppans
Copy link
Author

elppans commented Sep 19, 2021

This is amazing. But far too complicated. Im new to arch linux and I have absolutely no idea how to use this to open hedgemod manager. I was looking to mod Sonic Generations, but, if this is what is necessary, then its impossible for the average joe.
Elppans fala português? Então... A explicação de desse post não ta muito clara não, amigo. Mas o esforço e sucesso que você atingiu em executar o Hedgemod manager é admirável. vamos sonhar que um dia os devs do Hedgemod decidam criar uma versão linux do app. Até lá estamos ferrados.

Tô tentando tbm e faço a menor ideia kk

É ligeiramente fácil, basta copiar cada linha e colar no terminal e ir fazendo os comandos
Depois cria um script qualquer pra poder usar as variáveis pra executar o programa. Como o que eu fiz alí com o SonicForces_Mod

@elppans
Copy link
Author

elppans commented Sep 19, 2021

Going to be real, I have not the slightest clue how to use this.

It is slightly easy, just copy each line and paste it into the terminal and do the commands
Then create any script to be able to use the variables to run the program. Like what I did there with SonicForces_Mod

@Meromp
Copy link

Meromp commented Oct 9, 2021

Is there a way to do this in sonic generations with the hedgemodmanager

@nezd5553
Copy link

nezd5553 commented Oct 9, 2021

edit: I recommend GlowingRain's solution below

I modified elppans' script to work with Sonic Generations and with the default Steam installation location:

export WINEDEBUG=-all
APPID=71340
DATA=$HOME/.local/share/Steam/steamapps/compatdata/$APPID
COMMON=$HOME/.local/share/Steam/steamapps/common
APP="$COMMON/Sonic Generations"

PFX=$DATA/pfx
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 --force vcrun2019

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 winetricks -q d3dcompiler_47
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX="$PFX"_x32 WINEARCH=win32 winetricks -q 7zip
ln -sf $COMMON $PFX/drive_c/Program\ Files\ \(x86\)/Steam/steamapps/common
ln -sf $PFX/drive_c/Program\ Files\ \(x86\)/Steam/ "$PFX"_x32/drive_c/Program\ Files/Steam
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.6/HedgeModManager.exe -P "$APP"

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

APPID=71340
DATA=$HOME/.local/share/Steam/steamapps/compatdata/$APPID
COMMON=$HOME/.local/share/Steam/steamapps/common
APP="$COMMON/Sonic Generations"
PFX=$DATA/pfx_x32
cd "$PFX/drive_c/Program Files (x86)/Steam/steamapps/common/Sonic Generations"
WINESERVER=/usr/bin/wineserver WINELOADER=/usr/bin/wine WINEPREFIX="$PFX" WINEARCH=win32 wine HedgeModManager.exe "$@"
EOF
chmod +x ~/.local/bin/genshmm

To run the script, copy the above code into a new file called hmminstall.sh, make it executable with chmod +x hmminstall.sh, and run it with ./hmminstall.sh.
Afterwards, run HMM with the command genshmm.

I removed the registry edits from the original script because they were causing HMM to crash (I think).

One issue I have is that HMM tells me the installed codes are incompatible even though they work just fine. It also tells me to reinstall Generations Code Loader even though it also works (I suggest unchecking "Check for code loader updates"). Also, the play button in HMM does not work (but that is expected).

If Generations is booting without mods, make sure the mods directory in the HMM settings is C:\Program Files (x86)\Steam\steamapps\common\Sonic Generations\mods (as opposed to Program Files without the x86).

Screenshot_20211009_151643

Thank you elppans for figuring out what dependancies to install to use HMM and for writing the original script!

@Meromp
Copy link

Meromp commented Oct 13, 2021

oh my thank you so much

@Meromp
Copy link

Meromp commented Oct 13, 2021

wait do i use the normal linux vertion of steam or the windows one?

@Meromp
Copy link

Meromp commented Oct 13, 2021

this does not work on ubuntu or its because im using the flathub vertion of steam or its because im missing the thing that you said is making it crash

@nezd5553
Copy link

nezd5553 commented Oct 13, 2021

The script is for the package version of steam, not the flatpak. You need to change $HOME/.local/share/Steam to $HOME/.var/app/com.valvesoftware.Steam/data/Steam.

@Meromp
Copy link

Meromp commented Oct 15, 2021

Application could not be started, or no application associated with the specifie
d file.
ShellExecuteEx failed: File not found.
its going to the wrong place for the mod manager i have it in the generations folder

@nezd5553
Copy link

I think you didn't change DATA and COMMON at the bottom of the script as well as the ones at the top. You can just open ~/.local/bin/genshmm and change them there.

@SheaShea0524
Copy link

I cannot start Generations, i can start HedgeMod Manager just fine, but i cannot start Generations. It says that the Steam Client isnt running

@nezd5553
Copy link

nezd5553 commented Nov 3, 2021

The play button in HMM won't work, you need to start Generations from Steam.
If mods aren't loading, make sure that the mods directory in the HMM settings is set to C:\Program Files (x86)\Steam\steamapps\common\Sonic Generations\mods (not Program Files without the x86)

@SheaShea0524
Copy link

Okay, Thank you, any suggestions on what to do if Generations wont start even through steam?

@nezd5553
Copy link

nezd5553 commented Nov 5, 2021

If it says the game files are missing or corrupt, that is an issue that also happens with Windows. I used this guide that is for Windows. On Linux you have to copy this text into a .reg file such as sonic.reg in your home directory:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Sega]

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Sega\Sonic Generations]
"locale"="en-us"
"SaveLocation"="%UserProfile%\\Saved Games\\Sonic Generations"

Then, run the command WINEPREFIX=$HOME/.local/share/Steam/steamapps/compatdata/71340/pfx wine regedit sonic.reg

If that isn't the problem, it could be one of your mods.

And if all else fails, you can wipe your Generations install and start over by uninstalling it in Steam and then deleting the steamapps/common/Sonic Generations and steamapps/compatdata/71340 directories.

@GlowingRain
Copy link

GlowingRain commented 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.

@SheaShea0524
Copy link

THANK YOU GLOWING RAIN, OMG THIS IS SO MUCH MORE SIMPLE

@SeongGino
Copy link

I can confirm that while installing HMM in its own Lutris instance doesn't work, @GlowingRain's tip to run HMM in a Proton prefix does work; though for the sake of full transparency, I had to do things slightly differently.

The Proton 5.x series just doesn't want to cooperate with my machine at the moment (any attempt at making a from-scratch prefix fails with them for some unknown reason), so I instead pulled Proton-GE 5.9 which as of writing is the latest build that cooperates with dotnet40's installer, restarted Steam, and created the Generations prefix from scratch with it as a forced compatibility tool. Then, much the same as above, running protonfixes 71360 --force dotnet48 d3dx9 vcrun2019 d3dcompiler_47 installs the deps without any trouble. After which, I set Generations' launch command to:

/path/to/proton-ge-custom/proton waitforexitandrun '/path/to/steamlibrary/common/Sonic Generations/HedgeModLoader.exe'; echo %command%

Aside from the first boot of HMM having some black rendering bugs, subsequent launches work perfectly fine (but the right click options popup only shows after the pointer hovers over where the menu actually is, rather than immediately). BetterFxPipeline, D3DEx, and a bunch of Unleashed Project mods were tested in conjunction and work as they should on Windows without problems.

Seriously, compared to the OP's megascript, this single command and launch option change with a temporary Proton version swap is much more palatable. Absolutely worth the necro update imo.

@SheaShea0524
Copy link

okay now i have a problem with @GlowingRain solution, i cannot boot it whatsoever.

@SheaShea0524
Copy link

Correction, it is open, i just cannot see it

@GlowingRain
Copy link

GlowingRain commented Nov 28, 2021

@SheaShea0524

Weird, what DE/WM are you using? (Works fine in KDE) Remember that for this to work you first need to delete the game's prefix folder (71360) in the compatdata folder inside steamapps then do all the steps necessary, however it doesn't need to be the same Proton version, however it needs Proton 5-0.10 or GE-5.9 for dotnet installs to work.

Also... I suspect this is because of HW Acceleration being enabled, don't forget to put this in the command line.

protontricks -c "wine reg add \"HKCU\\SOFTWARE\\Microsoft\\Avalon.Graphics\" /v DisableHWAcceleration /t REG_DWORD /d 1 /f" 71340

@SheaShea0524
Copy link

Im using Gnome, that is the desktop environment, Gnome, through Pop-OS btw.

@ThorinWolf
Copy link

ThorinWolf commented Jan 20, 2022

I'm on Arch Rolling, XFCE4.
When I try and use the solution provided by @nezd5553, the mod manager launches and then has a critical failure, closing itself before giving a stacktrace in terminal (terminal says it closes itself). I switch to that used by @GlowingRain and it launches again, this time complaining of an error and immediately crashes (with useless stacktrace). I change and use that by @SeongGino and the mod manager doesn't even launch, giving me a HTTP 403 forbidden error over and over. On the first 2, without launch options the game no longer launches, and on the last it launches without launch options but the sounds are broken. I've used SonicGMI in past with no issue, but all the newer mods use this and I cannot access them without this working. Can someone help?

@GlowingRain
Copy link

GlowingRain commented Jan 25, 2022

@ThorinWolf

Have you deleted the prefix between each solution? I think it's a vital step to start with a new one: delete, then launch the game for the first time with Proton 5-0.10 and immediately close it, install all dependencies/components (dotnet48 d3dx9 vcrun2019 d3dcompiler_47) using protontricks, if it completes without failure then you should try to see if the launcher works using the launch options specified with Proton 5-0.10, if it opens correctly, do nothing and close it, if it asks for updates, cancel. After that well... change the compatibility tool to Proton-GE or a newer version of Proton and update the path to the newer Proton in the launch options, it should work from there and beyond. This is the easiest method to date to run anything mod related in games that require use of managers if I recall correctly.

Otherwise I have no idea what might be going on. I haven't touched my prefix in a while since I got the mod launcher up & running, and even updates work. You can launch Steam using the command line to see if anything relevant comes up.

EDIT: Don't forget to disable hardware acceleration as indicated here:

protontricks -c "wine reg add \"HKCU\\SOFTWARE\\Microsoft\\Avalon.Graphics\" /v DisableHWAcceleration /t REG_DWORD /d 1 /f" 71340

Most of this is just trial and error. I recommend using newer versions of Proton-GE as the issues with sound are getting abolished in recent times. Right now, using Proton-6.19-GE-2 gives me weird stutters in audio and sometimes audio repeats itself but just to a minimum, it's not a big deal, since when you play your brain kind of merges everything and it doesn't become a problem until you hear it again.

If you still have audio issues, a lookup in ProtonDB usually gives it away:

(commands to launch the mod manager); PROTON_NO_ESYNC=1 PROTON_USE_D9VK=1 echo %command%

@ThorinWolf
Copy link

@GlowingRain I have done all of that already, but I shall attempt it again at your behest and see if it works this time. I deleted the prefix each time, used the arguments, created the prefix using the right version, switched versions correctly and did all the protontricks stuff. I hope it works this time, because if not, I'm stuck with yet another unique problem that I have on WINE/Proton that no one else does.

@ThorinWolf
Copy link

@GlowingRain It is now working! I have no clue as to why it wasn't before, but it is now, using GE-7.0rc6. Thank you so much, I wish these errors wouldn't get in the way of me trying to do this so often. Sorry if I wasted your time.

@thesupersonic16
Copy link
Owner

Oops wrong button

@karmazogs
Copy link

Whenever I try to run the game or Open Mod/Game Directory via Wine or Steam Tinker Launch, I get a "File not Found" error. I was able to install all the dependencies and the app itself opens up fine.

@lordpsi99
Copy link

Ever since following the guide here, thinking it was a solution to get Frontiers working, all of my Sonic games no longer work. I've tried reinstalling each game 3 times. I get a Missing Downloaded Files error for Origins, Forces, Frontiers, and Colours doesn't start with any error. I've tried redoing the Origins setup guide from the Ultrafix gb page. Things seemed to stop working when I pasted the more than 3 year old top post here. I have no idea why this guide was linked in a thread about Frontiers. If the old Forces guide in OP screwed my Steam Deck up, how do I undo it? Every mod was working from the newest Bottles method with yml config file, except Sonic Frontiers. I've tried placing windows.7z's windows folder manually in each compatdata's pfx folders exactly where I was told to. I've tried placing the mscoree dll file in each folder containing each game's exe.

@thesupersonic16
Copy link
Owner

thesupersonic16 commented Nov 7, 2024

You may need to reset your proton prefixes, which you can do by deleting the numbered folder from the compatdata folder or in the Steam client there should be an option to reset your prefix.

Keep in mind the modloader will stil persist even if you uninstall games using Steam.

Once you do get it working again, also keep in mind that some Frontiers codes do not work on Linux.

@lordpsi99
Copy link

specifically pasting these in the konsole terminal started this "missing downloaded files" error and opening Colours just hard crashes the Steam Deck when everything but Frontiers was working:
"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"

"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"
How do I undo this damage? Clearing proton prefixes did nothing. Uninstalling HedgeModManager, reinstalling the bottles, disabling all codes and mods, unchecking force proton version and deleting everything from launch options, no difference.

@thesupersonic16
Copy link
Owner

That guide is old, don't use it. Use the updated Bottles guide to get HMM running and use windows.7z method to get the ML running for each game.

@lordpsi99
Copy link

I'm aware. However you directed several of us with Frontiers issues to this defunct and damaging guide. How do I get any of my games working again? I followed the Bottles and windows.7z guides but the Steam Deck won't even create the pfx folders for me to place my windows folder into. Trying to open games either crashes or it says it's missing files. I checked file integrity, all clear, no difference.

@lordpsi99
Copy link

now every game is giving me "missing downloaded files" whether they relate to Sonic or not. Whole Steam library and Deck broken. I don't even want to use mods now. I really don't want to do a full system wipe.

@lordpsi99
Copy link

lordpsi99 commented Nov 7, 2024

I'm sorry for being a nervous wreck. I just found that this could be an error with the steam client and the download cache. I'll try clearing it and get back to you. Ah it's fetching the files to play games now. AH! YES! Games open again. I'll go through the bottles setup again and disable codes for Frontiers to see if that boots the mod list with medium foliage mod.

@ahmanwoods
Copy link

Using the bottles guides and things that need reflection aren't working in Origins. Tried the windows.7z method and symlinking.

@thesupersonic16
Copy link
Owner

Which Origins code does not work? I havent had issues with the codes I tested.

@ahmanwoods
Copy link

ahmanwoods commented Nov 20, 2024

Any codes that need Reflection. Similar to the issue here hedge-dev/HMMCodes#7.

I'm just trying with the 30fps menu codes for now. I just factory reset my deck, set up bottles again, and encountered the same issue.

Edit: Using bottles to install dotnet40 and dotnet48 in the origins prefix fixed the issue.

@Sanic161
Copy link

Sanic161 commented Dec 2, 2024

I'm trying to run Frontiers with mods but every time the game boots up it has a black screen for a few seconds and then closes. The mod loader is working since the debug console appears, but the game itself crashes. I have installed dotnet via 7zip file under the troubleshooting portion but it still crashes. I am on steam deck, if that makes a difference. How can I fix this? Please let me know if any additional details are required.

@PolarStar64
Copy link

I'm having the exact same issue with getting Sonic Origins Plus working on Linux (specifically Bazzite), every other HedgeModManager game (Generations 2011, Lost World, Forces, Frontiers, Colors Ultimate, Shadow Generations) I've gotten working flawlessly, but no matter what I do I cannot get either the 30FPS code or Sonic Origins Ultrafix to work. I have both Dotnet40 and 48 installed and working with Bottles and symlinks (since it does it automatically). I feel like I've tried everything and I genuinely have no idea why it's not working. The "windows.7z" file doesn't help either.

@thesupersonic16
Copy link
Owner

The Frontiers issue is common with most HMMCodes crashing. I suspect the same issue is happening with the mentioned code and mod. Maybe changing proton versions can help? If you do change versions keep in mind it will count as a hardware change to Denuvo.

@Koopaco64
Copy link

I'm having an issue on steam deck where sonic frontiers will just crash at a black screen when the mod loader is active I am assuming that it is Denuvo causing it but I am unsure. If there are any suggestions let me know.

@thesupersonic16
Copy link
Owner

Some codes do not work on Proton. There is a chance you may still have a code enabled or you do not have dotnet installed.

@Koopaco64
Copy link

Now I have it working but none of the codes work at all on sonic frontiers it just crashes with any of them applied

@spiffeeroo
Copy link

spiffeeroo commented Dec 31, 2024

If you have access to winetricks, you can use winetricks to install dotnet48 into the game's wine prefix. (Installing dotnet48 with protontricks failed for me.) Origins and mods with reflection codes such as Sonic Origins Ultrafix and Sonic CD - Fix timing and restore SFX work properly and no longer crash on startup. The windows.7z method does not work for some mods, unfortunately.

For example, Sonic Origins would use this command in a terminal like Konsole:
WINEPREFIX="~/.steam/steam/steamapps/compatdata/1794960/pfx" winetricks -q dotnet48

Sonic Frontiers would use:
WINEPREFIX="~/.steam/steam/steamapps/compatdata/1237320/pfx" winetricks -q dotnet48

Adjust the path if you installed the game elsewhere, accordingly. Winetricks will install dotnet48 and dotnet40 into the prefix once completed.

@Grm1n
Copy link

Grm1n commented Jan 3, 2025

If you have access to winetricks, you can use winetricks to install dotnet48 into the game's wine prefix. (Installing dotnet48 with protontricks failed for me.) Origins and mods with reflection codes such as Sonic Origins Ultrafix and Sonic CD - Fix timing and restore SFX work properly and no longer crash on startup. The windows.7z method does not work for some mods, unfortunately.

For example, Sonic Origins would use this command in a terminal like Konsole: WINEPREFIX="~/.steam/steam/steamapps/compatdata/1794960/pfx" winetricks -q dotnet48

Sonic Frontiers would use: WINEPREFIX="~/.steam/steam/steamapps/compatdata/1237320/pfx" winetricks -q dotnet48

Adjust the path if you installed the game elsewhere, accordingly. Winetricks will install dotnet48 and dotnet40 into the prefix once completed.

how do I go about installing HMM via winetricks for shadow generations?

@spiffeeroo
Copy link

how do I go about installing HMM via winetricks for shadow generations?

You only need winetricks for installing Microsoft's dotnet into a game's wine prefix to replace the default Wine Mono that is installed. The wiki guide for the Bottles method for installing HMM works just fine. Bottles installs HMM in its own location separate from the rest of your Sonic games.

The Steam appid for Shadow Generations is listed here and in the url:

https://steamdb.info/app/2513280/info/

You can use that appid to find that game's compatdata path. That is where Steam stores the Wine prefix for that game.

@shyguy85
Copy link

Tried using bottles method on deck. did everything right. pressing save & play sends me into a black screen. game then closes. tried extracting windows.7z but same thing. wtf do i do???

@thesupersonic16
Copy link
Owner

Did you check if it still crashes with no codes enabled and no mods enabled?

@GuckicheLorraine
Copy link

Do you plan as doing like Reloaded 2 mod loader Author and make a script to make HMM installation easier on Linux with working codes ? Or rebuild HMM to support linux, just like reloaded 2 mod loader author plan on doing with Reloaded 3 ?

(pls say yes ! ><)

@thesupersonic16
Copy link
Owner

A rewrite with native Linux support is in the works, however the issue with the HMMCodes crash is out of my control and will still happen until work is done on that. Right now the authors of the crashing codes are not very interested in fixing them on Linux.

@GuckicheLorraine
Copy link

A rewrite with native Linux support is in the works, however the issue with the HMMCodes crash is out of my control and will still happen until work is done on that. Right now the authors of the crashing codes are not very interested in fixing them on Linux.

That's still better than the current way of using HMM, and maybe EGS version of Sonic games will be detected correctly on Deck and Linux this way.
Thank you for the intel ^^ !

@sylarbp
Copy link

sylarbp commented Jan 13, 2025

Hi everyone,
I succeed to install HMM for Sonic Frontiers but there is a lot of mods who are not working. I can for example use the Super Sonic Mod or the Shadow mod but everytime I try to install a more "complex" mod like "vanilla+" or "mach speed", the game crash at launch.
Do someone have an explanation or a fix for that ? Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests