This is how to use BTD6 mods using MelonLoader on Linux! This is a MUCH different process than on Windows, and may not be very beginner-friendly. But, since you're modding games on Linux, I'm assuming you aren't a beginner anyway. Let's get started!
BepInEx is another mod loader (of sorts) for IL2CPP games. But that's not the important part; the important part is it comes with integrated MelonLoader support, which actually supports Wine! Here's how to get it set up:
- Download an IL2CPP build of BepInEx from BepisBuilds. You can find this under the Artifacts tab on the page, and it is very important that you download the zip file that begins with BepInEx_UnityIL2CPP_x64. Any other builds will not work.
- Extract the zip file you have downloaded into BTD6's directory, which is probably located at
~/.steam/steam/steamapps/common/BloonsTD6
.
With the current setup, you may find that BepInEx just doesn't work. You need to do a few extra steps to get it to function.
- Open up the BTD6 wine prefix in winecfg. This can be done either by using protontricks, which may be easier, or by executing
WINEPREFIX=~/.steam/steam/steamapps/compatdata/960090/pfx/ winecfg
, assuming you have installed BTD6 to the default Steam directory. - Now in winecfg, select the
Libraries
tab, then selectwinhttp
under theNew override for library
dropdown, then clickAdd
.
Now that BepInEx is set up, it is time to get MelonLoader working.
- Get the appropriate zip file for BTD6's Unity version from this repository. As of 24.0, the game's Unity version is 2019.4.20. If you are reading this and the current version is no longer 24.0, it might be a good idea to check the game's Unity version by going into the main directory and opening
BloonsTD6_Data/globalgamemanagers
in a hex/text editor - the first legible string is the version number. - Extract the DLLs from the zip file you've downloaded into
BepInEx/unity-libs
in the main directory. - Install BepInEx's MelonLoader plugin from this repository, following steps 1 and 2 in the installation instructions.
- Start the game, and see the magic happen!
- Mods utilizing some of .NET Framework's libraries, such as System.Drawing, will fail to load, even if .NET Framework is installed on the Wine prefix.
Where do I put Mods? in Mods or MelonLoader/Mods? Neither work I'm confused! And Btd6 mod helper works in MelonLoader/mods but when I but mods there Btd6 mod helper doesn't work, putting them in mods doesn't work either.
Using proton 6.20 GE custom on Manjaro Linux, though no issues just can't get mods to work....
Edit: I looked at logs and it turns out the mods should be in MelonLoader/Mods just that 99% of mods use System.Drawing!
Do you know any good mods that don't use system.drawing? I can't find any...