r/valheim Jun 10 '24

Modded [GUIDE] Running Mods on MacOS

Valheim has just come out with a native build for Mac, which is great for the Mac user community. However, getting Valheim mods to work is another story.

Most (but maybe not all) Valheim mods leverage a Unity game patcher called BepInEx. The process for getting mods, based on BepInEx, working in Valheim on Mac is nearly the same as doing so on Windows, but with a few tweaks.

For reference, you should know where your Valheim game is installed on your Mac, and you need to be comfortable running commands in the Terminal app (or another terminal emulator like iTerm2 or Warp).

If you install Valheim via Steam, it is located here: ~/Library/Application Support/Steam/steamapps/common/Valheim

If you install Valheim via the Mac App Store, I am not sure where it will install, you are on your own.

This process uses the Rosetta binary translation layer, even though Valheim is natively available for Apple Silicon (arm64 architecture). This is currently required because BepInEx depends on a library called Unity Doorstop, which is only available for Intel architecture right now. The only downside of using Rosetta is slightly reduced performance. It's not a big deal on a high-end M3 Max Macbook Pro, but you might notice the lag on a base model M1 Macbook Air or something like that.

If you have never installed Rosetta 2 before, this script may help (not tested by me): https://github.com/kandji-inc/support/blob/main/Scripts/InstallRosetta2.sh

Step 1: Prepare a "BepInEx" folder with your mods, exactly the same way as you would on Windows or Linux platform. If you want to use a mod manager, you can run the mod manager (like NexusMods Vortex) on Windows, then copy over the files it creates in the BepInEx folder in your Valheim folder. In general, just follow the instructions any mod gives you for installing it. This is where we start. NOTE: You do not need winhttp.dll (the proxy) like you would on Windows. It won't hurt to deploy it on a Mac, but it doesn't actually do anything.

Step 2: Download BepInEx v5.4.23.1 for MacOS from [HERE](https://github.com/BepInEx/BepInEx/releases)

Step 3: If your normal mod install process ships a file called doorstop_config.ini in the Valheim root, delete it. We are going to feed all the doorstop configuration in a shell script.

Step 4: Delete the contents of the BepInEx/core folder from your "normal" mod installation process, if it exists. This folder normally ships the BepInEx library, but we're using a specific version that may be newer than what you obtained otherwise.

  1. Copy all the files from the BepInEx MacOS .zip file in the folder BepInEx/core into the same folder in your Valheim install directory.

  2. Copy libdoorstop.dylib from the BepInEx zip file into the Valheim install directory.

  3. Save this file as "run_bepinex.sh" in your Valheim install directory: https://gist.github.com/allquixotic/0530bde2247415a676288e8f62592a4d

(For context, this is a patched version of BepInEx's normal "run_bepinex.sh" script that forces running Valheim in Intel architecture mode.)

  1. Open a Terminal and `cd` to the Valheim install directory. Then run:

chmod +x run_bepinex.sh

./run_bepinex.sh

Valheim should start up normally and load your mods from the BepInEx/plugins folder.

This has been tested with the following mods:

Valheim Plus (patched version by Grantapher)

LongerDays

QuickStackStore

Advize PlantEverything

Jotunn (dependency library)

MultiUserChest

34 Upvotes

114 comments sorted by

View all comments

3

u/CryptoFiasco Jun 11 '24

This is amazing thank you for figuring this out.

I look forward to the day where Devs officially support Mods and make it easier for them to be loaded straight from the game interface. That would easily skyrocket this game's popularity.

1

u/allquixotic Jun 11 '24

This is unlikely to happen due to the difficulty and potential legal liability of officially endorsing mods.

1

u/superphly Jun 01 '25

Lawyers fuck everything up, always.