lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.96k stars 276 forks source link

How to use mod #72

Closed jang-geon closed 3 years ago

jang-geon commented 3 years ago

https://valheim.thunderstore.io/package/Valdream/Data_Rate_Modifier/

I think this mode is essential Is there any way to apply it?

lloesche commented 3 years ago

This is covered by the work in https://github.com/lloesche/valheim-server-docker/issues/63 which also uses BepInEx.

See https://github.com/lloesche/valheim-server-docker/discussions/58 for how we're currently solving it manually.

armanatz commented 3 years ago

@lloesche The work that I am doing in #63 is currently focused on getting Valheim Plus to work well and keep the behaviors of this Docker image intact; namely auto updates and Steam validation.

However, because of that, I am not sure if the current iteration of my work can be used to support other mods as I hadn't planned for it. Once my PR is submitted, we can discuss how to extend the BepInEx in the Docker image to also support other drop in mods.

What do you think?

lloesche commented 3 years ago

@armanatz oh I was referring to V+. I had created an issue https://github.com/nxPublic/ValheimPlus/issues/58 which is resolved and says that data rate modification will be included with V+ v0.8.5. So no extra work for you 🎉 🙂

wedol commented 3 years ago

Instead adding support for specific mods, it will be better to add generic support for mods (via BepInEx) and expose volume for plugins.

lloesche commented 3 years ago

@wedol thank you for the suggestion! @armanatz what do you think? I only just now looked into BepInEx. I wasn't aware that ValheimPlus is a collection of plugins that all base on BepInEx. Would it make more sense to add generic BepInEx support and then maybe have a switch "Add all ValheimPlus" plugins? That way users could use a curated preselection (Valheim Plus) but also add their own modifications. Sounds cleaner to me.

armanatz commented 3 years ago

@lloesche It was an idea I was mulling over. However, there are a few considerations we'd need to take into account:

  1. So BepInEx alone is not enough to run mods. We would also need unstripped Unity DLLs in order for Doorstop to not crash on startup of Valheim Server (see https://github.com/NeighTools/UnityDoorstop/issues/10 for more info). These DLLs come pre-shipped with V+ which makes it a more verifiable source than the one in the GitHub ticket I linked.
  2. V+ ships with it's own BepInEx.cfg file which will override the one that BepInEx generates. I am not sure if the configuration is different from the defaults
  3. Should we go with this method, how do we ensure that the mods are not overridden by updates? Since we are only accounting for V+ at the moment, it is easy to auto-update both the game and the mod.

I think one way to tackle a lot of these changes is to use V+ as the base mod and all other mods can then be installed on top of it. However, I am not sure how some mods may interact with V+ and that could cause conflicts and errors to occur

Morgul commented 3 years ago

I think one way to tackle a lot of these changes is to use V+ as the base mod and all other mods can then be installed on top of it. However, I am not sure how some mods may interact with V+ and that could cause conflicts and errors to occur

Might it make sense to roll out mod support in stages? As a first pass, do this, with the caveat of "beware mod interactions with V+, as we use it as the base mod". Then, look into more full-featured general mod support?

Toucan-Sam commented 3 years ago

I'm keen on V+ because reasons, but as far as support in this container, I don't have objections with there being some arbitrary level of knowledge required to install/manage them.

IF MOD_SUPPORT = TRUE, THEN install BepInEx AND configure executable_name=""; AND launch game via ./run_bepinex.sh IF MOD_SUPPORT = FALSE (default), THEN launch game via steam_cmd.

Long as the required directories are symlink'd to an external volume/mount that should be enough?

PS, BepInEx goes in folder. -> ??? -> Success! I have no idea how BepInEx works so this might not even viable. I just don't think this container should be overly concerned with mod incompatibilities. That's not what the container does.

brcoding commented 3 years ago

BepInEx hooks the executable on startup, if there are no plugins to load, it does nothing. It is usually no big deal to just have it run and then you can drop in files in whatever the configured folder is.

lloesche commented 3 years ago

If you guys would like to test ValheimPlus support you can use the dev tag of the Docker image lloesche/valheim-server:dev

Updated README is here https://github.com/lloesche/valheim-server-docker/tree/dev

Let us know in https://github.com/lloesche/valheim-server-docker/pull/91 if everything works.

Thanks to all testers!

lloesche commented 3 years ago

ValheimPlus support is now in the main branch.