Skip to content
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

[Feature] Add mod support through BepInEx #130

Closed
rosudrag opened this issue Feb 17, 2021 · 6 comments · Fixed by #148
Closed

[Feature] Add mod support through BepInEx #130

rosudrag opened this issue Feb 17, 2021 · 6 comments · Fixed by #148
Labels
enhancement New feature or request odin Tag if theres an issue with odin

Comments

@rosudrag
Copy link

rosudrag commented Feb 17, 2021

Valheim has a bunch of mods available on NexusMods that work when loaded through the BepInEx modding framework / https://www.nexusmods.com/valheim/mods/4 . Downloading them and shoving them on the volumes on this docker doesn't work because it needs extra setup on unix. https://bepinex.github.io/bepinex_docs/master/articles/user_guide/installation/index.html?tabs=tabid-nix

@rosudrag
Copy link
Author

I've tried adding BepInEx myself but I'm beat... The loader startup scripts just sets up some env variables which can be done in docker-compose with:

  • DOORSTOP_ENABLE=TRUE
  • DOORSTOP_INVOKE_DLL_PATH=/home/steam/valheim/BepInEx/core/BepInEx.Preloader.dll
  • LD_LIBRARY_PATH=/home/steam/valheim/doorstop_libs
  • LD_PRELOAD=libdoorstop_x64.so
  • DYLD_LIBRARY_PATH=/home/steam/valheim/doorstop_libs
  • DYLD_INSERT_LIBRARIES=/home/steam/valheim/doorstop_libs/libdoorstop_x64.so

The library download is at https://builds.bepis.io/projects/bepinex_be and needs copying to the right volume location.

They also mention needing gcc 10+ so a modified image is required with that installed:
RUN echo 'deb http://deb.debian.org/debian testing main' >> /etc/apt/sources.list
&& apt-get update && apt-get install -y --no-install-recommends -o APT::Immediate-Configure=false gcc g++

It's just crashing with undefined symbol errors:
ln: symbol lookup error: /home/steam/valheim/doorstop_libs/libdoorstop_x64.so: undefined symbol: dlopen

@mbround18
Copy link
Owner

Adding belpix support wouldn't be too hard <3

@mbround18 mbround18 changed the title [Feature Request] Add mod support through BepInEx [Feature] Add mod support through BepInEx Feb 18, 2021
@mbround18 mbround18 added odin Tag if theres an issue with odin enhancement New feature or request labels Feb 18, 2021
@mbround18
Copy link
Owner

Before I write any code, is BepInEx the only framework used for modding Valheim?

@rosudrag
Copy link
Author

Before I write any code, is BepInEx the only framework used for modding Valheim?

Looks to be this way only. Maybe one day the devs will add in official support but why would they even bother when HarmonyX does the job

@kachunkachunk
Copy link

Just to throw it out there, ValheimPlus also incorporates BePinEx and this seems to load the server component. I'm not certain what the most elegant approach is for handling it, but maybe take a look at their newest 0.8 release for Linux/Unix servers and you can see how it loads/runs, too.

@mbround18
Copy link
Owner

@kachunkachunk done. See #148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request odin Tag if theres an issue with odin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants