thesupersonic16 / HedgeModManager

A mod manager for Sonic Generations, Sonic Lost World, Sonic Forces, Sonic Colours Ultimate and other PC Hedgehog Engine games.
MIT License
273 stars 63 forks source link

HedgeModManager on Linux/Steam Deck #219

Closed elppans closed 1 month ago

elppans commented 3 years ago

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.

Reav77 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

elppans commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

nezd5553 commented 3 years ago

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 commented 3 years ago

oh my thank you so much

Meromp commented 3 years ago

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

Meromp commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

nezd5553 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

SeongGino commented 3 years ago

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 commented 3 years ago

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

SheaShea0524 commented 3 years ago

Correction, it is open, i just cannot see it

GlowingRain commented 3 years ago

@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 commented 3 years ago

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

ThorinWolf commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

@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.

GlowingRain commented 2 years ago

@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.

No worries. I ended up forgetting that this thread/issue existed in the first place. Now that I've got confirmation that it works using the latest Proton-GE I might as well update my prefix. Although I didn't see a reason on why it wouldn't work, call that lazy...

DQuittard commented 2 years ago

Is there an issue with GNOME or something ? I'm on Pop OS 21.10 and I have tried @GlowingRain and @SeongGino's answers but to no avail. The most I got was with SeongGino's answer: Hedgemodmanager started on Steam and asked me to create a mod folder but then the process was hanging and it closed. I couldn't even open it with all my other attempts. I must mention that I also tried the OP's script and it also didn't work for me. Just wondering if there's another thing to try ?

DQuittard commented 2 years ago

Answer for other people wondering: I managed to finally make it run ! But I don't know what was stopping it from working... As a disclaimer, I was running Pop OS 21.10 with a KDE Plasma Desktop.

I followed @SeongGino's comment to install dotnet48 and all the other dependencies, then I could launch the mod loader. It asked me to create a mod folder and after saying yes it "seemingly" crashed. Seeing as it was still running in the background, I killed the process, then installed 2 fonts (Steam told me they were missing) and I was able to fully launch the mod loader ! After that I swapped from Proton GE-5.9 to Proton Experimental, and everything worked !

MooMew64 commented 2 years ago

Has anyone had any luck getting Hedgemod Manager to run on Steam Deck? I've spent the last two weeks trying every method I could think of, including the @GlowingRain's and @SeongGino's methods but have had no luck. When using the Flatpak version of ProtonTricks to install dependencies to Generation's prefix, the dotnet installers fails on latest versions of proton and Proton 5-10 and 5.9GE simply tell me that the process will hang until all Wine processes are done, but skip ahead 15+ minutes later and no window ever pops up. I get the same results trying to run ProtonTricks from the Konsole as well. Sonic Generations does not boot ith Proton 5-10 or 5.9GE either; The main game crashes, while the config tool is the only thing that will load.

I can get the mod loader to boot and work through Bottles, but then the Save and Play button doesn't work (simply tells me Steam client is not open) and when booting Gens up normally, no mods or codes are present despite the fact the mod loader claims to be installed and I can see the debug menu run when the game is launched. Honestly not sure what to do at this point.

Anyone have any thoughts?

SeongGino commented 2 years ago

@SolarNyan Geh! Unfortunately the process is very delicate about how you go about it.

You'll have to delete the prefix and recreate the prefix with GE-5.9. It's normal that Generations itself won't boot like this. Close out the config tool, then run aforementioned Protontricks. If at some point the process hangs after a wineserver notice, try terminating some of the child processes spawned from it - it's rare, but not completely unusual that one of the tasks will just stall without warning.

Only after all of this is done, start up your prefix with a modern Proton and try to run Generations (don't want to be booting up a modded setup to a Configuration Mismatch error, after all). The mod loader itself needs VC2019, so it's no wonder just running it off a vanilla Gens prefix won't do anything.

I really can't help much more beyond that - if there's any difference with a Flatpak installation, you'll just have to figure it out yourself. One troubleshooting tip I can give is to try at least a basic winetricks verb--the Visual C installers should always popup quickly and work, no matter what. If even that doesn't work, then that's probably a SteamOS/Deck thing. :woman_shrugging:

The only other thing I've experienced that causes instability in my current setup is running with the Locked 60 FPS code, which is the one modification that outright crashes for me.

MooMew64 commented 2 years ago

I'll keep givin it a shot. Worse comes to worse, I can always just stream modded Gens from my desktop, ha ha. Thank you for the reply!

DQuittard commented 2 years ago

@SolarNyan Hello, I've successfully installed Hedgemodmanager for Sonic Generations, Forces and somewhat installed it on Lost World under Linux following @SeongGino's post. I also had the same error as you where the wine process would hang. You can force it with the command (71340 for Sonic Generations) "protontricks --no-background-wineserver 71340 --force dotnet48 d3dx9 vcrun2019 d3dcompiler_47". Hope it'll works for you. Sonic Generations also crashed for me with the 60 FPS hack.

MooMew64 commented 2 years ago

@DQuittard I got the dependencies to install! The only issue is using @SeongGino's and @GlowingRain's launch parameters don't launch the mod loader, the game simply crashes and launches nothing. Running HMM through Bottles inside the Generations prefix gets the program to load, but I am then greeted with an error telling me that it could not access the game directory. I also used GlowingRain's Konsole command to turn of Hardware Acceleration for the Generations prefix.

DQuittard commented 2 years ago

@SolarNyan Does Steam say the game is loaded ? I know you said crash, but I actually had HMM invisible the first time around, I had to kill the process with the Task manager and then it worked the second time around. I think it doesn't work with Bottles because it's dependent on the Proton's prefix: for example, with Sonic Lost World, I installed HMM on Proton 6.3 (which is bad to run SLW), then I tried forcing Proton 7 and it crashes whereas with Proton 6.3 everything works.

MooMew64 commented 2 years ago

@DQuittard I GOT IT TO WORK FINALLY

I deleted all of Generations files and prefix, did a fresh install, and validated files. Turned out that somewhere along the way, Proton files must have gotten corrupted and needed to redownload and verify. After doing that, I followed @SeongGino's instructions and downloaded the dependencies onto a freshly made Generations prefix made with Proton-GE 5.9-8-ST.

Once they finished, I downloaded Proton-GE 7-14 and booted the game with no issues.

THEN, I went back into desktop mode, and ran the HedgeModManager through the Protontricks Flatpak launcher. I chose to run it through the Gens Prefix, and it booted flawlessly and installed the mod loader without a problem. Using the Protontricks Flatpak, you can actually skip the step of needing to use custom launch instructions on Steam, simplifying the process even more.

So, for fellow Steam Deck users who want a full outline of the process:

mountainmohawk commented 2 years ago

@DQuittard I GOT IT TO WORK FINALLY

I deleted all of Generations files and prefix, did a fresh install, and validated files. Turned out that somewhere along the way, Proton files must have gotten corrupted and needed to redownload and verify. After doing that, I followed @SeongGino's instructions and downloaded the dependencies onto a freshly made Generations prefix made with Proton-GE 5.9-8-ST.

Once they finished, I downloaded Proton-GE 7-14 and booted the game with no issues.

THEN, I went back into desktop mode, and ran the HedgeModManager through the Protontricks Flatpak launcher. I chose to run it through the Gens Prefix, and it booted flawlessly and installed the mod loader without a problem. Using the Protontricks Flatpak, you can actually skip the step of needing to use custom launch instructions on Steam, simplifying the process even more.

So, for fellow Steam Deck users who want a full outline of the process:

  • Download Generations and launch the configuration tool only with Proton-GE-5.9-8-ST (You can acquire it from the ProtonQT app found on the Discover software app bundled with the Deck)
  • Once you successfully boot into the Configuration Tool, close it.
  • Switch to Desktop mode and open your Konsole
  • Install Protontricks from Discover and set it up with your Konsole (the github for its Flatpak has a guide)
  • Run @DQuittard's Protontricks command "protontricks --no-background-wineserver 71340 --force dotnet48 d3dx9 vcrun2019 d3dcompiler_47" (without quotation marks).
  • Once it finishes installing all dependencies, download Proton-GE-7-14 from ProtonQT and set it as Generation's Forced Compatibility tool.
  • Run the game once in SteamOS to make sure it installed all the dependencies properly. If you get a message telling you a program failed to launch, ignore it, the game will boot fine.
  • Close the game and return to Desktop mode.
  • Navigate to your installation of Sonic Generations and move HedgeModManager into it.
  • Open it with Protontricks launcher, and select Sonic Generation's prefix as the prefix to run it in.
  • You should see it create all of the necessary files it needs to, and after a few moments, it will run! Everything works as far as I can tell, although I would avoid messing with the framerate codes as they may cause crashes. Save and Play will work, but you will get a Graphics Config mismatch because Gens needs to be played in the SteamOS.
  • Install and enjoy your mods! Note, Dexterity's Marza Sonic glitches out in cutscenes, so I'm assuming other sonic models probably don't work in them either. You may want to use the vanilla Sonic model when playing through the story.

Does this allow Hedgemod to work with All the Sonic games?

And sorry to ask, but I’m a complete Linux noob, but is there any chance you could make a video guide?

RushingAlien commented 2 years ago

@mountainmohawk https://github.com/thesupersonic16/HedgeModManager/wiki/Running-on-Linux-(Wine) I've added a guide in this page

elppans commented 2 years ago

@mountainmohawk https://github.com/thesupersonic16/HedgeModManager/wiki/Running-on-Linux-(Wine) I've added a guide in this page

Very good and easy. But the Screens are VERY small, I almost didn't fill them. In an instant, I thought I was half blind.

ItsSparks commented 2 years ago

@RushingAlien fyi i tried this on the steam deck and it doesn’t seen to work bro, when i launch it it just stays on a blank/ see-through screen. And just eventually crashes

MooMew64 commented 2 years ago

@DQuittard I GOT IT TO WORK FINALLY I deleted all of Generations files and prefix, did a fresh install, and validated files. Turned out that somewhere along the way, Proton files must have gotten corrupted and needed to redownload and verify. After doing that, I followed @SeongGino's instructions and downloaded the dependencies onto a freshly made Generations prefix made with Proton-GE 5.9-8-ST. Once they finished, I downloaded Proton-GE 7-14 and booted the game with no issues. THEN, I went back into desktop mode, and ran the HedgeModManager through the Protontricks Flatpak launcher. I chose to run it through the Gens Prefix, and it booted flawlessly and installed the mod loader without a problem. Using the Protontricks Flatpak, you can actually skip the step of needing to use custom launch instructions on Steam, simplifying the process even more. So, for fellow Steam Deck users who want a full outline of the process:

  • Download Generations and launch the configuration tool only with Proton-GE-5.9-8-ST (You can acquire it from the ProtonQT app found on the Discover software app bundled with the Deck)
  • Once you successfully boot into the Configuration Tool, close it.
  • Switch to Desktop mode and open your Konsole
  • Install Protontricks from Discover and set it up with your Konsole (the github for its Flatpak has a guide)
  • Run @DQuittard's Protontricks command "protontricks --no-background-wineserver 71340 --force dotnet48 d3dx9 vcrun2019 d3dcompiler_47" (without quotation marks).
  • Once it finishes installing all dependencies, download Proton-GE-7-14 from ProtonQT and set it as Generation's Forced Compatibility tool.
  • Run the game once in SteamOS to make sure it installed all the dependencies properly. If you get a message telling you a program failed to launch, ignore it, the game will boot fine.
  • Close the game and return to Desktop mode.
  • Navigate to your installation of Sonic Generations and move HedgeModManager into it.
  • Open it with Protontricks launcher, and select Sonic Generation's prefix as the prefix to run it in.
  • You should see it create all of the necessary files it needs to, and after a few moments, it will run! Everything works as far as I can tell, although I would avoid messing with the framerate codes as they may cause crashes. Save and Play will work, but you will get a Graphics Config mismatch because Gens needs to be played in the SteamOS.
  • Install and enjoy your mods! Note, Dexterity's Marza Sonic glitches out in cutscenes, so I'm assuming other sonic models probably don't work in them either. You may want to use the vanilla Sonic model when playing through the story.

Does this allow Hedgemod to work with All the Sonic games?

And sorry to ask, but I’m a complete Linux noob, but is there any chance you could make a video guide?

Sorry for the late reply, I don't use GitHub much lol.

The only other game I tested this method with was Forces. Lost World works with HMM in Bottles out of the box whereas Forces and Gens wouldn't for whatever reason. However, it seems like @RushingAlien got them all to work in Bottles? If so, do that method, it will be significantly less messy than mine lol.

I do plan on trying to record a video guide for fellow Steam Deck owning Sonic fans soon here. From my current testing, the only major game that isn't playable and moddable on Deck atm is Colors Ultimate, and that's just unfortunately probably due to Epic Launcher shenanigans. However, both the abandonware Heroes and Sonic R ports work like a dream, which is awesome!

sks316 commented 2 years ago

@RushingAlien I used your Bottles method, but there's a serious issue with it, at least on Steam Deck. If hardware acceleration is enabled, the window will appear transparent and if interacted with, it will crash. To fix it, I opened the Bottles registry editor and did the following:

After doing this, the HedgeModManager window shows up and works fine. I tried Better FxPipeline and am able to confirm that mods will install and work.

RushingAlien commented 2 years ago

@sks316 thank you! I will update guide with these steps for Deck users

JDsGod7 commented 2 years ago

@sks316 thank you! I will update guide with these steps for Deck users

I just got my steam deck today and am a life long windows user so a video guide would be amazing! I would very much appreciate it.

sks316 commented 2 years ago

I'm having issues running a mod on Linux, specifically the Trans Fem Sonic mod The mod doesn't work at all on Linux, aside from a few images replacements. I've been told by the mod's developer that apparently cpkredir simply isn't loading the mod files for whatever reason I'm curious if anyone else is having issues with this mod and if possible I would love help, every other mod I've tried works fine, even character replacement mods

SeongGino commented 2 years ago

I'm having issues running a mod on Linux, specifically the Trans Fem Sonic mod The mod doesn't work at all on Linux, aside from a few images replacements. I've been told by the mod's developer that apparently cpkredir simply isn't loading the mod files for whatever reason I'm curious if anyone else is having issues with this mod and if possible I would love help, every other mod I've tried works fine, even character replacement mods

Unable to replicate; it seems to work fine here. Image edits, voicelines and all. 2022_06-20-113624 Make sure the mod can load by itself. If it does, try checking your load order again.

sks316 commented 2 years ago

I'm having issues running a mod on Linux, specifically the Trans Fem Sonic mod The mod doesn't work at all on Linux, aside from a few images replacements. I've been told by the mod's developer that apparently cpkredir simply isn't loading the mod files for whatever reason I'm curious if anyone else is having issues with this mod and if possible I would love help, every other mod I've tried works fine, even character replacement mods

Unable to replicate; it seems to work fine here. Image edits, voicelines and all. 2022_06-20-113624 Make sure the mod can load by itself. If it does, try checking your load order again.

Already tried loading it by itself, it still doesn't work. I'm considering trying a full reinstall of the game and mod manager. I should note this is on Steam Deck.