Skip to content

Instantly share code, notes, and snippets.

@BowDown097
Last active December 4, 2023 06:25
Show Gist options
  • Save BowDown097/1f35312036c347c40c400f362ac780fd to your computer and use it in GitHub Desktop.
Save BowDown097/1f35312036c347c40c400f362ac780fd to your computer and use it in GitHub Desktop.
Instructions to use BTD6 mods using MelonLoader on Linux.

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!

Installing BepInEx

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:

  1. 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.
  2. Extract the zip file you have downloaded into BTD6's directory, which is probably located at ~/.steam/steam/steamapps/common/BloonsTD6.

Making BepInEx Actually Function

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.

  1. 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.
  2. Now in winecfg, select the Libraries tab, then select winhttp under the New override for library dropdown, then click Add.

Setting Up MelonLoader

Now that BepInEx is set up, it is time to get MelonLoader working.

  1. 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.
  2. Extract the DLLs from the zip file you've downloaded into BepInEx/unity-libs in the main directory.
  3. Install BepInEx's MelonLoader plugin from this repository, following steps 1 and 2 in the installation instructions.
  4. Start the game, and see the magic happen!

Current Issues

  • 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.
@yavko
Copy link

yavko commented Nov 10, 2021

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

@Thyssenkrupp234
Copy link

BTD6 says modified game detected, but there is no directory BepInEx/unity-libs.

@NIKODEMUS209
Copy link

@SpamixOfficial
Copy link

Seems like this tutorial sadly doesn't work anymore. I wish there were more documentation on this. this is the only tutorial/documentation I've found on this topic.

@46620
Copy link

46620 commented Dec 3, 2023

Found this post again so I'll put an updated and working way to install mods

  1. Download MelonLoader and install it to the games directory (I used the exe but the manual zip should work the same)
  2. Run WINEPREFIX=~/.steam/steam/steamapps/compatdata/960090/pfx/ winecfg and add version.dll as an override
  3. Run WINEPREFIX=~/.steam/steam/steamapps/compatdata/960090/pfx/ winetricks dotnetdesktop6 and install dotnet6 to the prefix
  4. Add BTD-Mod-Helper to <gamedir>/Mods
  5. Launch the game
  6. ...
  7. Profit

@SpamixOfficial
Copy link

Thanks for the update @46620

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment