Comments (14)
Thank you so much for posting this, everything's working and v+ is working wonderfully.
from valheimplus.
Could you share what your file looks like? I've tried a few edits after " ## Special case: if there is an arg, use that as executable path ..." but nothing seems to be working so having a copy to look at and compare would be super helpful. Also could you share what your vhserver.cfg looks like?
Thank you for making this post btw, was pulling my hair out on how to add it to gsm, now only if i could get it to run. (Server starts but doesn't stay running and I'm not sure why)
from valheimplus.
Could you share what " ## Special case: if there is an arg, use that as executable path ..." looks like on yours?
Thank you for making this post btw, was pulling my hair out on how to add it to gsm, now only if i could get it to run. (Server starts but doesn't stay running and I'm not sure why)
This is what I commented out:
## Special case: if there is an arg, use that as executable path
## Linux: arg is path to the executable
## MacOS: arg is path to the .app folder which we need to resolve to the exectuable
#if [ -n "$1" ]; then
# case $os_type in
# Linux*)
# executable_path="$1"
# #echo "executeable_path ${executable_path}"
# #exit 1
# ;;
# Darwin*)
# # Special case: allow to specify path to the executable within .app
# full_path_part=`echo "$1" | grep "\.app/Contents/MacOS"`
# if [ -z "$full_path_part" ]; then
# executable_name=`basename "$1" .app`
# real_executable_name=`defaults read "$1/Contents/Info" CFBundleExecutable`
# executable_path="$1/Contents/MacOS/${real_executable_name}"
# else
# executable_path="$1"
# fi
# ;;
# esac
#fi
from valheimplus.
I've done that/removed it at one point, what I'm having trouble with is what to do / where to put
"do
case $arg in
-name)
argName=$2
shift 2
;;
-password)
argPassword=$2
shift 2
;;
-port)
argPort=$2
shift 2
;;
-world)
argWorld=$2
shift 2
;;
-public)
argPublic=$2
shift 2
;;
esac
done "
When I add the above code (with Do/Done) and try to start the server it says (In red) Fail no server running on /tmp/tmux-1005/default
If I add the above code without the (Do/Done ((Leaving the rest of the Case code)) ) and start the server I get (in green) OK and looks to start. If I run details it'll show offline, looking at the log file I see "password to short" (zodm1) but I've tried "ThisLongPass" and still it quits on me with the same password to short error, I can share my log file if needed.
from valheimplus.
Probably easier if I share the whole file
#!/bin/sh
# BepInEx running script
#
# This 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.
# -------- SETTINGS --------
# ---- EDIT AS NEEDED ------
# 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_server.x86_64"
# The rest is automatically handled by BepInEx
# Whether or not to enable Doorstop. Valid values: TRUE or FALSE
export 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="${PWD}/BepInEx/core/BepInEx.Preloader.dll"
# ----- DO NOT EDIT FROM THIS LINE FORWARD ------
# ----- (unless you know what you're doing) ------
if [ ! -x "$1" -a ! -x "$executable_name" ]; then
echo "Please open run.sh in a text editor and configure executable name."
exit 1
fi
doorstop_libs="${PWD}/doorstop_libs"
arch=""
executable_path=""
lib_postfix=""
os_type=`uname -s`
case $os_type in
Linux*)
executable_path="${PWD}/${executable_name}"
lib_postfix="so"
;;
Darwin*)
executable_name=`basename "${executable_name}" .app`
real_executable_name=`defaults read "${PWD}/${executable_name}.app/Contents/Info" CFBundleExecutable`
executable_path="${PWD}/${executable_name}.app/Contents/MacOS/${real_executable_name}"
lib_postfix="dylib"
;;
*)
echo "Cannot identify OS (got $(uname -s))!"
echo "Please create an issue at https://github.com/BepInEx/BepInEx/issues."
exit 1
;;
esac
## Special case: if there is an arg, use that as executable path
## Linux: arg is path to the executable
## MacOS: arg is path to the .app folder which we need to resolve to the exectuable
#if [ -n "$1" ]; then
# case $os_type in
# Linux*)
# executable_path="$1"
# #echo "executeable_path ${executable_path}"
# #exit 1
# ;;
# Darwin*)
# # Special case: allow to specify path to the executable within .app
# full_path_part=`echo "$1" | grep "\.app/Contents/MacOS"`
# if [ -z "$full_path_part" ]; then
# executable_name=`basename "$1" .app`
# real_executable_name=`defaults read "$1/Contents/Info" CFBundleExecutable`
# executable_path="$1/Contents/MacOS/${real_executable_name}"
# else
# executable_path="$1"
# fi
# ;;
# esac
#fi
executable_type=`LD_PRELOAD="" file -b "${executable_path}"`;
case $executable_type in
*64-bit*)
arch="x64"
;;
*32-bit*|*i386*)
arch="x86"
;;
*)
echo "Cannot identify executable type (got ${executable_type})!"
echo "Please create an issue at https://github.com/BepInEx/BepInEx/issues."
exit 1
;;
esac
doorstop_libname=libdoorstop_${arch}.${lib_postfix}
export LD_LIBRARY_PATH="${doorstop_libs}":${LD_LIBRARY_PATH}
export LD_PRELOAD=$doorstop_libname:$LD_PRELOAD
export DYLD_LIBRARY_PATH="${doorstop_libs}"
export DYLD_INSERT_LIBRARIES="${doorstop_libs}/$doorstop_libname"
export templdpath=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
export SteamAppId=892970
### finalsolarflare modifcation ###
argName="Valheim+"
argPassword="password"
argPort=2456
argWorld="world"
argPublic=1
for arg in "$@"
do
case $arg in
-name)
argName=$2
shift 2
;;
-password)
argPassword=$2
shift 2
;;
-port)
argPort=$2
shift 2
;;
-world)
argWorld=$2
shift 2
;;
-public)
argPublic=$2
shift 2
;;
esac
done
## "${PWD}/${executable_name}" -name "servername" -password "serverpassword" -nographics -batchmode -port 2456 -world "world"
"${PWD}/${executable_name}" -name "${argName}" -password "${argPassword}" -port "${argPort}" -world "${argWorld}" -public "${argPublic}"
export LD_LIBRARY_PATH=$templdpath
from valheimplus.
https://i.imgur.com/U06Octo.png
Seems like this appears on me
from valheimplus.
https://i.imgur.com/U06Octo.png
Seems like this appears on me
I think that error is related to binding the server port.
What does the file: ~/lgsm/config-lgsm/vhserver/vhserver.cfg look like? Should look similar to this
#### Game Server Settings ####
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
servername="Valheim+"
# Minimum password length is 5.
serverpassword="serverpassword"
port=2456
gameworld="${selfname}"
public=1
executable="./run_bepinex.sh"
from valheimplus.
Same error with putting that as well. I am using Ubuntu 20.04.
from valheimplus.
I used the following script to try and debug any problems with arguments that were being passed
new file: ~/serverfiles/run_test.sh
#!/bin/sh
for arg in "$@"
do
case $arg in
-name)
servername=$2
shift 2
;;
-password)
serverpassword=$2
shift 2
;;
-port)
serverport=$2
shift 2
;;
-world)
serverworld=$2
-port)
serverport=$2
shift 2
;;
-world)
serverworld=$2
shift 2
;;
-public)
serverpublic=$2
shift 2
;;
esac
done
echo "vars passed... \n"
echo " -name '${servername}' -password '${serverpassword}' -port '${serverport}' -world '${serverworld}' -public '${serverpublic}'"
while :; do sleep 3600; done;
change lgsm config lgsm/config-lgsm/vhserver/vhserver.cfg
commenting bepinex executable to run_test.sh
instead
# executable="./run_bepinex.sh"
executable="./run_test.sh"
./vhserver start
tmux a -t vhserver
shows what arguments are being passed
from valheimplus.
-public 1 was removed and is not longer used
from valheimplus.
Hey, I am writing on a PR that is incorporating am automatic publish system for V+ builds, UnixServer included. I did something similar to this with run_bepinex.sh and would deploy that script on release. I will also add some code which tries to identify (or guess ;)) if it is run within LGSM and act accordingly.
All one needs to do is changing the default.cfg or instance.cfg in LGSM. But maybe we can get them to include some magic into LGSM, too...
from valheimplus.
I was making it more complicated than it needs to be.
Updated for version 0.8.5 - update the file start_server_bepinex.sh
with the following (comment for reference)...
#./valheim_server.x86_64 -name "My server" -port 2456 -world "Dedicated" -password "secret"
./valheim_server.x86_64 "${@}"
Change lgsm config located at ~/lgsm/config-lgsm/vhserver/vhserver.cfg
add the following
executable="./start_server_bepinex.sh"
from valheimplus.
Your version is fine if you want to be LGSM-neutral. Add your params to the run-script or get any of them fomr the arguments.
from valheimplus.
Our start.sh for 0.9.6 should be working on any system now.
from valheimplus.
Related Issues (20)
- [BUG] After the latest Valheim update, Valheim Plus fails to complete loading HOT 30
- [BUG] V+ incompatible with new default Bepinex 5.4.21.0 HOT 3
- [BUG] Website is dead for 24+ hours HOT 17
- RIP? HOT 2
- [BUG] Windows Client: Getting a white screen background where the Valheim Plus logo usually is HOT 29
- [BUG] Difficulty Scaling Calculation Incorrect HOT 1
- PBT 0.214.300.3 Compatibility HOT 2
- local defined Keys will not be loaded when connecting to a dedicated server HOT 10
- [BUG] Valheim plus not starting on valheim 0.214.300 HOT 27
- [BUG] V+ server crash on run HOT 5
- [BUG] Install V+ with Lgsm HOT 1
- [BUG] V+ not working with Xbox Gamepass Valheim HOT 14
- [FEATURE REQUEST] A faster turnaround time for updates! Or you'll lose users. You already are, though. HOT 18
- [BUG] HOT 2
- [BUG] Patch 0.215.2 Incompatibility HOT 3
- [BUG] auto-caft issue (loosing ore) on server
- [BUG] Game Crashes at Logo screen HOT 2
- Ability to ride (and move) a starred lox HOT 1
- [BUG] HOT 1
- [BUG] Game Crashing after Valheim plus install HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from valheimplus.