-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mod support #9
Comments
No worries! 🙌 The current Valheim + Steam integration works due to injection of From a quick inspection it seems that the BepInEx script launches the Could you try running it as follows:
|
Hey, @Fusion86. Spent the evening yesterday myself getting BepInEx to work.
Now edit
To launch directly from steam:
That's it. You should now be able to start from steam and it should work. PS: Oh, and @timkurvers: Thanks so much for making this happen! We'll enjoy the ride, while it lasts : ) |
Incredible write-up @phonique! Thanks for sharing 🥳 |
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 edit the ...
# -------- 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
|
This worked fantastic! Thank you! Was able to get Valheim+ (Grantapher Temp) and Advize PlantEverything installed and haven't had any issues so far. |
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 |
Great write up @phonique 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! |
LogOutput.log Here's the error in the log:
|
@seathasky Judging from Mono's |
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 |
got it working, thanks a lot. but now must comment DOORSTOP_CORLIB_OVERRIDE_PATH asignation, now that lib is into Valheim i think |
Thank you @timkurvers for all you've done. I'm new to Mac but got this going thanks to you. Additionally I want to thank @phonique and @seathasky for the details with getting mods to work...which I have. The only thing that doesn't work for me is launching the external app in Steam. I put in the console options "/Applications/Games/Valheim/GAME/run_bepinex.sh" %command% --args -console" but it throws an unknown error. If I remove %command% it launches but no bepinex or mods are enabled. Currently I can only run mods by using @phonique 's terminal instructions: ./run_bepinex.sh If anyone has any suggestions to get it working from the external Steam app method I would be most grateful. |
@drummercraig - can you share any details on what mod you were using and how you got it runnning? It looks like BepInEx had it's config files rearchitected at some point as the config files look completely different than this thread. I'm trying to play ValheimPlus and when I update the game path and try to launch using the start_game_bepinex.sh script I get an error: I've tried to update the config to point to the exectuable at Valheim.app/Contents/MacOS/Valheim and the game launches but BepInEx is not injected and its not running ValheimPlus. Example of the current config file:
To answer your question - I was able to get (the base game) running via steam by following some of the steps here. EDIT: while I was working on getting this running Valhiem announced an official MacOS Port earlier today on Twitter!! |
Totally appreciate you asking. I have learned to just use the command line to launch and don't need to launch with Steam and am happy with that. A friend told me today about the official MacOS coming on the 10th I think? Awesome. |
Sorry, I think my earlier response didn't answer a question you asked. I run it on an M1 Mac Studio and have never got the Steam launch to work. I do currently run 13 mods with my install. I also never got the start_game_bepinex.sh to work. So to try and clarify, I built the Valheim app using Tim's instructions. I then created a new separate folder (name it what you want) to be my Valheim game folder and copied the single Valheim.app file previously built. Then I manually downloaded from thunderstore the specific Valheim Bepinex and copied the Bepinex folder into my new folder and added the mods into the plugin folder within. I have a separate run_bepinex.sh file that I got from somewhere in here that I use to launch the game via command line. I have copied the contents below. I hope that helps and if you need any other details just ask. Sorry about the comment formatting below...this page just does it, changing font, removing the # etc and I don't know how to not have it change anything. #!/bin/sh BepInEx running scriptThis script is used to run a Unity game with BepInEx enabled.Usage: Configure the script below and simply run this script when you want to run your game modded.a="/$0"; a=${a%/*}; a=${a#/}; a=${a:-.}; BASEDIR=$(cd "$a"; pwd -P) -------- SETTINGS ------------ EDIT AS NEEDED ------export SteamAppId=892970 EDIT THIS: The name of the executable to runLINUX: This is the name of the Unity game executableMACOS: This is the name of the game app folder, including the .app suffixexecutable_name="Valheim.app" The rest is automatically handled by BepInExWhether or not to enable Doorstop. Valid values: TRUE or FALSEexport 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 folderMainly usable to unstrip assemblies in some gamesexport DOORSTOP_CORLIB_OVERRIDE_PATH="" ----- DO NOT EDIT FROM THIS LINE FORWARD ----------- (unless you know what you're doing) ------Special case: program is launched via SteamIn that case rerun the script via their bootstrapper to ensure Steam overlay worksif [ "$2" = "SteamLaunch" ]; then if [ ! -x "$1" -a ! -x "$executable_name" ]; then doorstop_libs="$BASEDIR/doorstop_libs" os_type=$(uname -s) Special case: if there is an arg, use that as executable pathLinux: arg is path to the executableMacOS: arg is path to the .app folder which we need to resolve to the exectuableif [ -n "$1" ]; then abs_path() { _readlink() { resolve_executable_path () {
} executable_path=$(resolve_executable_path "${executable_path}") case $executable_type in doorstop_libname=libdoorstop_${arch}.${lib_postfix} "${executable_path}" |
@drummercraig - thank you! Could you try pasting the old run_bepinx.sh script here again - try using triple tilde's before and after the script and it should format the whole thing correctly as a code block. I'm tying to make it work but some of the code was reformatted from not being in a code-block. I think that's the issue - the newer .sh included with the later versions of Bepinx refuse to launch the .app file and are detecting it as a folder. EDIT: nevermind - the older releases are still available - I pulled down the start script from there. Thank you! |
Closing this issue as the official macOS client is now available! 🥳 (see #104) |
I do feel a bit selfish for immediately asking for this, but I've been wondering whether it is possible to get mods working with this setup?
The official BepInEx site mentions that it is compatible with macOS, but I couldn't get it to work on the first try.
The text was updated successfully, but these errors were encountered: