Fix/bepinex mod for valheim install#4938
Open
yourfate wants to merge 2 commits into
Open
Conversation
- mods_list: set modsubdirs="BepInExPack_Valheim" so only the pack contents (not loose Thunderstore metadata) are installed to serverfiles - mods_core: implement modsubdirs subfolder isolation in fn_mod_install_files; when modsubdirs is not "0", the named subfolder becomes the extract root - fix_vh: update BepInEx env vars to match current start_server_bepinex.sh (DOORSTOP_ENABLED/DOORSTOP_TARGET_ASSEMBLY replacing old names, remove defunct DOORSTOP_CORLIB_OVERRIDE_PATH) - mods_list: update modsubdirs field comment to reflect its actual semantics Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
SteamCMD creates a Wine prefix at serverfiles/steamapps/compatdata/
containing a z: symlink pointing to /. Without excluding this path,
`find "${serverfiles}"` traverses the entire filesystem, causing
check_permissions.sh to hang indefinitely.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Bepinex mod for valheim changed the directory structure in the downloaded zip, which meant the files were now in the wrong position inside serverfiles.
This required a change to the extraction logic for mods, I used the previously unused
modsubdirsvariable. It was meant to just be the depth of subfolder the mod was in, but that is kind of useless once there are several folders in parallel. Now it is just a prefix you can set, from which the files inside the zip are taken. You can also use multiple folders here likesome/dir/in/mod/folderto get to an arbitrary depth. IMHO this improves over the planned functionally of just having a number of dirs there.If you prefer, I can move it to a new variable in the unzip command, that would then require changing all other mod installers tho.
This is currently an undocumented feature, so no changes to the dev documentation are required. I did update the comment.
Also the preload env vars in the
fix_vh.shscript were outdated.Lastly, the check permissions script caused errors when it checked files inside a wine prefix, which steamCMD ships with some (all?) game servers on linux.
Fixes #[4491]
The fix was created with the help of claude. I have manually written this PR, manually reviewed / edited the changes, and manually tested the fix on two installs.
Type of change
Testing
Please list the exact validation you performed and the outcome.
Risk and rollback
mods-remove, that should clean it up nicely.Breaking changes
Documentation impact
Checklist
PR will not be merged until all steps are complete.
Documentation
If documentation does need updating either update it by creating a PR (preferred) or request a documentation update.
Thank you for your Pull Request!