LavaGang / MelonLoader

The World's First Universal Mod Loader for Unity Games compatible with both Il2Cpp and Mono

Home Page:https://discord.gg/2Wn3N2P

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: No mods on Linux

SymbolicFrank opened this issue · comments

All of the following criteria must be met

  • All Requirements must be installed.
  • Changed the title so that it doesn't just says "[Bug]: "
  • I have searched the GitHub issues for my bug, even in the closed issues.

All of the following are optional to answer

  • Tried reinstalling the Game.
  • Tried reinstalling MelonLoader.
  • Tried restarting PC.
  • Was able to see the Start Screen.

Describe the issue.

I have used MelonLoader for years on Windows 10 with The Long Dark. I migrated to Linux Mint and reinstalled everything. Issues:

  1. The Linux build of v0.6.2 is not recognized as a unity module. It crashes.
  2. The Linux build of v0.6.1 does seem to work, but I wasn't able to activate it.

That gave multiple, different errors that Il2Cpp wasn't accessible. I tried to install it myself, but that didn't work, as I didn't know which version and name was expected. I couldn't get it to download automatically, either.

Which was when I discovered, that the mods only work if you force Proton compatibility in Steam and add "-force-glcore" to get the game running. So it's nice that there are native Linux builds, but they don't seem to have a function yet.

Next, remove all, enable proton compatibility and reinstall in Steam. And get protontricks to work? The native builds are old, there is a Flatpak that is reasonably up-to-date, but doesn't work from the command-line. I couldn't get it updated with apt or pipx. This was a great help: https://forums.linuxmint.com/viewtopic.php?t=398249

  1. Paths are probably too long.

I tried this from a terminal:
#!/bin/bash
STEAM_COMPAT_DATA_PATH=/mnt/[some long GUID]/SteamLibrary/steamapps/compatdata/305620 STEAM_COMPAT_CLIENT_INSTALL_PATH=/mnt/[some long GUID]/SteamLibrary/steamapps/common/TheLongDark "/home/frank/.steam/steam/steamapps/common/Proton - Experimental/proton" run "/mnt/[some long GUID]/SteamLibrary/steamapps/common/TheLongDark/tld_gl.bat

This gave all kinds of "file (or assembly) not found" errors.

"tld_gl.bat" is: "./tld.exe -force-glcore --melonloader.hideconsole >> ./ml.log"

  1. The Windows builds won't run with Proton when you follow the instructions on the wiki.

I made a new mount point ("/mnt/Games") and a "G:" drive with protontricks in winecfg, to the new "/mnt/Games/SteamLibrary/steamapps/common/TheLongDark" directory. Which gave errors that Il2Cpp couldn't find an assembly named 'tld' at 'g:'. So I removed the G: drive, but that didn't help. I made a new G: drive to "/mnt/Games/SteamLibrary/steamapps/common/", so the executable would be: "G:\TheLongDark\tld.exe" (with a backslash after the ":" !), which removed the error.

  1. Protontricks isn't able to start it up at all.

There are many issues, mostly with the requirements. There is no good way to install them. I tried selecting them in protontricks ("Install a Windows DLL or Component"), which gave many errors about 32-bits versions not working, wrong versions and checksums, etc. Opening an Explorer and executing the Windows installers gave many errors about incorrect Windows versions (it seems to be reported as either WinNT or WinXP64 by proton). I cannot verify if all the trial and error worked or not.

All in all, I couldn't get the same result when running through protontricks as Steam.

  1. Missing rendertargets.

I got errors about unsupported render targets, while I have an AMD Radeon 6950, with a native driver installed and active. I checked. And the game runs unmodded. But I don't know if this is actually an issue, only that after these error messages, the mods get unloaded. Unfortunately, there is a new version of The Long Dark just at this moment, so I have to update before I can run it from Steam and cannot reproduce the previous error messages.

  1. Fatal error. System.AccessViolationException: Attempted to read or write protected memory.

This is the final error, so far. I don't think I can debug that myself. It all seems to work with this setup until everything is ready and I see the MelonLoader screen and graphic pop-up for a fraction of a second, after which everything crashes.

Player.log

And the new log, with new errors:
Player.log

Btw, your animated logo is quite small on a 4k screen.

Did you attach your log file?

Yes, I attached my log file to the text box above.

There's a lot to unpack here.

That gave multiple, different errors that Il2Cpp wasn't accessible.

Assuming you're talking about Cpp2IL, The Wiki mentions this.

Which was when I discovered, that the mods only work if you force Proton compatibility in Steam and add "-force-glcore" to get the game running. So it's nice that there are native Linux builds, but they don't seem to have a function yet.

You're talking like MelonLoader is made for your game. MelonLoader is a universal mod loader. I don't see what's keeping mods from running on the linux version of your game, Mods may be using some windows specific code, but it certainly doesn't have "no function". Other games may use MelonLoader and have mods that are written with cross-platform in mind

Next, remove all, enable proton compatibility and reinstall in Steam. And get protontricks to work? The native builds are old, there is a Flatpak that is reasonably up-to-date, but doesn't work from the command-line. I couldn't get it updated with apt or pipx. This was a great help: https://forums.linuxmint.com/viewtopic.php?t=398249

Sorry, being the only linux user on the team, I can't know about the situation of installing tooling on distributions I don't use

Onto your next point about mounting (?), I'm really not sure. I don't have my games on a separate drive.

There are many issues, mostly with the requirements. There is no good way to install them. I tried selecting them in protontricks ("Install a Windows DLL or Component"), which gave many errors about 32-bits versions not working, wrong versions and checksums, etc. Opening an Explorer and executing the Windows installers gave many errors about incorrect Windows versions (it seems to be reported as either WinNT or WinXP64 by proton). I cannot verify if all the trial and error worked or not.

The wiki clearly describes how to install the requirements. protontricks APPID uninstaller for dotnet 6. That is realistically all you need.

Fatal error. System.AccessViolationException: Attempted to read or write protected memory.

I've heard numerous things about this happening under Proton. I have yet to run into any of it. Then again, I don't mod any of the games where this has come up, and I can only imagine that mods are causing it, not us.

All in all, I think you're overthinking most of this. I would recommend you start over by deleting your prefix, running the game through steam's GUI once, running protontricks APPID uninstaller, installing dotnet 6 with it, and adding WINEDLLOVERRIDES="version=n,b" %command% as a launch option by right clicking the game in steam -> properties

Then you can run the game

All in all, I think you're overthinking most of this. I would recommend you start over by deleting your prefix, running the game through steam's GUI once, running protontricks APPID uninstaller, installing dotnet 6 with it, and adding WINEDLLOVERRIDES="version=n,b" %command% as a launch option by right clicking the game in steam -> properties

Then you can run the game

I did the first part at the start. It didn't work. I replaced the launch option in Steam with the above one, which made it crash immediately.

I understand that you think the project you worked on for so long is really great and that I do everything wrong. But I try to supply all the information I can to allow you people to fix things if you ever want to allow the things I try to do. So I can enjoy your work as well.

Please join the discord and @rinlovesyou in support. Github troubleshooting like this is a bit of a pain.

I understand that you think the project you worked on for so long is really great and that I do everything wrong.

I've never said you did anything wrong, I just see a lot of steps I've never had to deal with, so i tried providing a more concise way of starting over.

I did the first part at the start. It didn't work. I replaced the launch option in Steam with the above one, which made it crash immediately.

What didn't work? Crash makes sense if you were unable to install .net 6.