Comments (11)
Hey, @Fusion86. Spent the evening yesterday myself getting BepInEx to work.
Here's the rundown.
- Moved Valheim.app from build/ to it's own directory in
/Applications/Games/Valheim/GAME
- Downloaded BepInEx (BepInEx_unix_5.4.21.0.zip)
- Unpacked it into
GAME
dir (i.e. the dir-structure is now:Valheim.app
,BepInEx
,doorstop_libs
,run_bepinex.sh
andchangelog.txt
) - Open a terminal in the
GAME
dir and make the .sh user-executable by typingchmod u+x run_bepinex.sh
- [hours of trying to get it to work skipped for you]
- Download the denikson BepInEx distribution for Valheim at thunderstore.io
- unpack somewhere else and copy
winhttp.dll
,doostop_config.ini
and (probably, most importantly)unstripped_corlib
to theGAME
dir. Also copyBepInEx/config
(and why notBepInEx/plugins/Valheim.DisplayBepInExInfo.dll
, while you're at it) toGAME/BepInEx/
First part is done.
Now edit run_bepinex.sh
in the GAME
dir as follows:
- after the
# ---- EDIT AS NEEDED ------
line - addexport SteamAppId=892970
as per @timkurvers comment above (thanks!) - change
executable_name
toexecutable_name="Valheim.app"
- find the
DOORSTOP_CORLIB_OVERRIDE_PATH
and change it to"$BASEDIR/unstripped_corlib"
(or copy the relevant part for it from here:)
# -------- SETTINGS --------
# ---- EDIT AS NEEDED ------
export SteamAppId=892970
# EDIT THIS: The name of the executable to run
# LINUX: This is the name of the Unity game executable
# MACOS: This is the name of the game app folder, including the .app suffix
executable_name="Valheim.app"
# The rest is automatically handled by BepInEx
# Whether or not to enable Doorstop. Valid values: TRUE or FALSE
export DOORSTOP_ENABLE=TRUE
# What .NET assembly to execute. Valid value is a path to a .NET DLL that mono can execute.
export DOORSTOP_INVOKE_DLL_PATH="$BASEDIR/BepInEx/core/BepInEx.Preloader.dll"
# If specified, Doorstop will load core libraries from this folder instead of the normal Managed folder
# Mainly usable to unstrip assemblies in some games
export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR/unstripped_corlib"
# ----- DO NOT EDIT FROM THIS LINE FORWARD ------
To launch directly from steam:
- Open steam and add a non-steam game.
- Now, find
Valheim.app
(in my case it's inside:/Applications/Games/Valheim/GAME
) - After you add the game, select the newly added Valheim in your steam library (it shouldn't have an icon), click the little cogwheel-settings button and select
Properties...
. - There, edit
Launch Options
as follows:
"/Applications/Games/Valheim/GAME/run_bepinex.sh" %command% --args -console"
(You can skip the --args -console if you don't need the in-game console for some reason).
That's it.
You should now be able to start from steam and it should work.
In case it doesn't - try to launch from the terminal and post the output here: (i.e. open the terminal, go to the GAME
dir and type in ./run_bepinex.sh
).
PS: Oh, and @timkurvers: Thanks so much for making this happen! We'll enjoy the ride, while it lasts : )
from valheim-macos.
Incredible write-up @phonique! Thanks for sharing 🥳
from valheim-macos.
Great write up @phonique
Just chiming in about some recent changes:
Basically unstripped_corlibs is no longer needed. Tested this last night, and bepinex works.
For reference, this is what my shell file now looks like:
Have fun!
from valheim-macos.
Thanks @phonique for that detailed description! with that held I was able to make it even easier to work (in my case I wanted to use ValheimPlus, which already includes BepEx):
Just head to their release page and get the latest UnixClient.zip
(for me it was 0.9.9.16) and put the content next to the Valheim.app
folder.
The only thing you have to adapt now is the same as @phonique described:
edit the start_game_bepinex.sh
:
...
# -------- SETTINGS --------
# ---- EDIT AS NEEDED ------
export SteamAppId=892970
# EDIT THIS: The name of the executable to run
# LINUX: This is the name of the Unity game executable
# MACOS: This is the name of the game app folder, including the .app suffix
executable_name="Valheim.app"
...
export DOORSTOP_CORLIB_OVERRIDE_PATH="$BASEDIR/unstripped_corlib"
...
If you do not want ValheimPlus you can just delete the dll in the `BepInEx/plugins` folder
from valheim-macos.
@seathasky Judging from Mono's FileSystemWatcher
code, it should be possible to swap to a different watcher (seems to default to CoreFX on macOS?) by setting environment variable MONO_MANAGED_WATCHER
to something (e.g. false
) or disabled
.
from valheim-macos.
@seathasky Judging from Mono's
FileSystemWatcher
code, it should be possible to swap to a different watcher (seems to default to CoreFX on macOS?) by setting environment variableMONO_MANAGED_WATCHER
to something (e.g.false
) ordisabled
.
This did it! Thank you!!
For those having similar issues to mods, add export MONO_MANAGED_WATCHER=FALSE to you run shell.
epic loot working:
@timkurvers thanks again
from valheim-macos.
No worries! 🙌
The current Valheim + Steam integration works due to injection of SteamAppId
into the environment when the app launches in Info.plist
.
From a quick inspection it seems that the BepInEx script launches the MacOS/Valheim
binary directly, which might mean that particular Steam setting is not taken into account.
Could you try running it as follows:
SteamAppId=892970 ./run_bepinex.sh
from valheim-macos.
This worked fantastic! Thank you! Was able to get Valheim+ (Grantapher Temp) and Advize PlantEverything installed and haven't had any issues so far.
from valheim-macos.
I've followed the steps in this thread and have mods loading but some mods have a problem where their textures aren't loading and all the items or enemies they add are purple. For example monstrum mobs are purple but the odinshorse loads in just fine. Epicloot weapons are purple pillars when thrown. but odins campsites loads and works fine. There are no errors in the logs.
I've tested it on windows and all the mods are compatible with no issues.
Any help would be appreciated.
from valheim-macos.
I've followed the steps in this thread and have mods loading but some mods have a problem where their textures aren't loading and all the items or enemies they add are purple. For example monstrum mobs are purple but the odinshorse loads in just fine. Epicloot weapons are purple pillars when thrown. but odins campsites loads and works fine. There are no errors in the logs.
I've tested it on windows and all the mods are compatible with no issues.
Any help would be appreciated.
It's possible the mods are using texture formats that are not supported by OpenGL for macOS (Apple deprecated it years ago, after all).
Anything in the Player.log
about textures that could not be loaded?
from valheim-macos.
LogOutput.log
Anyone able to get epicloot working? Bepin loads just fine, but plugins seem to not load in game. Doing same manual setup on pc works just fine.
Here's the error in the log:
[Error : Unity Log] IOException: Operation not supported
Stack trace:
System.IO.CoreFX.FileSystemWatcher.StartRaisingEvents () (at <5fe808a9ce234d7cb9b1a4e14f988a80>:0)
System.IO.CoreFX.FileSystemWatcher.StartRaisingEventsIfNotDisposed () (at <5fe808a9ce234d7cb9b1a4e14f988a80>:0)
System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) (at <5fe808a9ce234d7cb9b1a4e14f988a80>:0)
(wrapper remoting-invoke-with-check) System.IO.CoreFX.FileSystemWatcher.set_EnableRaisingEvents(bool)
System.IO.CoreFXFileSystemWatcherProxy+<>c.<StartDispatching>b__9_0 (System.IO.CoreFX.FileSystemWatcher internal_fsw, System.IO.FileSystemWatcher fsw) (at <5fe808a9ce234d7cb9b1a4e14f988a80>:0)
System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action`4[T1,T2,T3,T4] map_op, System.Action`2[T1,T2] object_op, System.Object handle, System.Action`2[T1,T2] cancel_op) (at <5fe808a9ce234d7cb9b1a4e14f988a80>:0)
Rethrow as InvalidOperationException: object_op
System.IO.CoreFXFileSystemWatcherProxy.Operation (System.Action`4[T1,T2,T3,T4] map_op, System.Action`2[T1,T2] object_op, System.Object handle, System.Action`2[T1,T2] cancel_op) (at <5fe808a9ce234d7cb9b1a4e14f988a80>:0)
System.IO.CoreFXFileSystemWatcherProxy.StartDispatching (System.Object handle) (at <5fe808a9ce234d7cb9b1a4e14f988a80>:0)
System.IO.FileSystemWatcher.Start () (at <5fe808a9ce234d7cb9b1a4e14f988a80>:0)
System.IO.FileSystemWatcher.set_EnableRaisingEvents (System.Boolean value) (at <5fe808a9ce234d7cb9b1a4e14f988a80>:0)
(wrapper remoting-invoke-with-check) System.IO.FileSystemWatcher.set_EnableRaisingEvents(bool)
EpicLoot.EpicLoot.LoadJsonFile[T] (System.String filename, System.Action`1[T] onFileLoad, EpicLoot.Data.ConfigType configType, System.Boolean update) (at <c085ade0925d42a7910d0d32c1396d5c>:0)
EpicLoot.EpicLoot.InitializeConfig () (at <c085ade0925d42a7910d0d32c1396d5c>:0)
EpicLoot.EpicLoot.Awake () (at <c085ade0925d42a7910d0d32c1396d5c>:0)
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.UI.Graphic:get_canvas()
TMPro.TextMeshProUGUI:OnCanvasHierarchyChanged()
from valheim-macos.
Related Issues (20)
- I can't download HOT 2
- Action and attack input get stuck HOT 3
- Getting to work on arm64 HOT 2
- Patch 0.217.25
- Cant find build folder
- Patch 0.217.28 HOT 1
- line 77: dotnet: command not found HOT 2
- Possible to build old_default for .25? HOT 4
- Permission denied running build.sh (git pull is up-to-date but stuck on .215)
- App closes after initial logo-startup HOT 2
- Instant crash after newest patch HOT 3
- Current script is missing vendor folder creation. HOT 1
- Any update? HOT 1
- Deleted old Valheim-macos folder HOT 5
- Save/Autosave not working with build 0.217.38 HOT 9
- Dotnet@7 not available HOT 5
- Failed to build Valheim - System.DllNotFoundException HOT 3
- "Valheim" is damaged and can't be opened. HOT 2
- A couple of tiny suggestions (and a big thanks!) HOT 3
- Game shows broken menu on launch HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valheim-macos.