U-1F31A / BepInEx_Valheim_Full

3 stars 1 forks source link

BepInEx for Valheim, Full Pack

This pack is for Valheim modding. It includes

It runs both on clients and servers.

Table of Contents

Links

Installation

First time using BepInEx

The package's zip is structured as follows:

BepInEx_Valheim_Full/
    BepInEx/
        config/
            ...
        core/
            ...
        doorstop/
            ...
        .version
    unstripped_corlib/
        ...
    doorstop_config.ini
    start_server_bepinex.sh
    winhttp.dll
checksums.sha256
icon.png
manifest.json
README.md

Extract the files manually to your Valheim installation so you get the following structure:

Valheim/
    BepInEx/
        config/
            ...
        core/
            ...
        doorstop/
            ...
        .version
    unstripped_corlib/
        ...
    doorstop_config.ini
    start_server_bepinex.sh
    winhttp.dll

If you're on Windows, just run the game via Steam.

For Linux users,

I've already got a working BepInEx setup

Just install this plugin to your current BepInEx plugins and it'll auto-install + -update BepInEx Valheim Full for you: https://valheim.thunderstore.io/package/1F31A/BepInEx_Valheim_Full_Updater/

Building the pack yourself

Notes:

Requirements

DLLs

  1. From C:\Program Files\Mono\lib\mono\4.5
    • Copy all DLLs
  2. Copy the whole folder C:\Program Files\Mono\lib\mono\4.5\Facades (not just the DLLs inside, the folder Facades)
    • Keep the DLLs in that subfolder
  3. From C:\Program Files\Unity\Hub\Editor\2019.4.20f1\Editor\Data\MonoBleedingEdge\lib\mono\4.5
    • Copy all DLLs (overwrite when prompted)
  4. Copy the whole folder C:\Program Files\Unity\Hub\Editor\2019.4.20f1\Editor\Data\MonoBleedingEdge\lib\mono\4.5\Facades (not just the DLLs inside, the folder Facades)
    • Keep the DLLs in that folder, overwrite when prompted
  5. From C:\Program Files\Unity\Hub\Editor\2019.4.20f1\Editor\Data\PlaybackEngines\windowsstandalonesupport\Variations\mono\Managed
    • Copy all DLLs (overwrite when prompted)
  6. From C:\Program Files\Unity\Hub\Editor\2019.4.20f1\Editor\Data\Managed\UnityEngine
    • Copy all DLLs (overwrite when prompted)
  7. Get a copy of System.Buffers (target .NET 4.5) and add the DLL: https://www.nuget.org/packages/System.Buffers/

Extras

FAQ

Are you open to pull requests?

Yes.

Will this package be maintained?

Yes. Both the GitHub and the packages on the mod websites are maintained by a team. If any one person becomes unavailable, the others can continue to maintain it. Should the whole team want to stop, we're open to considering new volunteers.

Can I submit some-random-name.dll to the pack?

This pack is only meant for .NET/Mono/Unity DLLs. If it's part of that, sure. Make sure to include where you got it from and why you need it.

I'm getting a weird audio-related error when I start Valheim.

Try removing UnityEngine.AudioModule.dll from your DLLs.

How do I configure my server on Linux with the bash script?

Open the bash script in your favorite text editor, look at the very top.

What's my Linux server's password if I use the bash script?

If you didn't configure the bash script to set your own password, it'll autogenerate a random password and show it in your terminal on startup.

UNSAFE_ROOT_EXECUTION

When you try to run the Linux server via the bash script, you may encounter a similar error:

ERROR: Running as root exposes your machine to malware and is unnecessary in a large majority of cases.

For environments that require running the bash script as root, you can start it with:

./start_server_bepinex.sh UNSAFE_ROOT_EXECUTION

or with the environment variable

UNSAFE_ROOT_EXECUTION=true ./start_server_bepinex.sh

There are DLLs that aren't really necessary in the pack

We're aware. If you've got a good reason to delete them (e.g. some are already loaded by the game or by BepInEx) and you want to improve the pack, submit a pull request with the change.

There's a .NET/mono/Unity DLL missing from the pack

Submit a pull request with the details and we'll get it added.

Can I run this on Linux with Proton?

Yes. Follow the guide here: https://bepinex.github.io/bepinex_docs/master/articles/advanced/steam_interop.html#protonwine

SHA-256 File Checkums

Checksums are in the file checksums.sha256.

Checksums are sorted alphabetically so they can easily be compared even in simple text editors.

Changelog

1.0.3