Przeglądaj źródła

feat(vh): add an additional config string for valheim world modifiers (#4341)

* feat(vhserver): added additional config string for valheim world modifiers

* added instructions on how modifiers are stored in the save files and how to go back to default

* small typo

---------

Co-authored-by: Daniel Gibbs <me@danielgibbs.co.uk>
Renato 2 lat temu
rodzic
commit
35a535bfa1

+ 29 - 2
lgsm/config-default/config-lgsm/vhserver/_default.cfg

@@ -22,11 +22,38 @@ backups="4"
 backupshort="7200"
 backupshort="7200"
 backuplong="43200"
 backuplong="43200"
 # If crossplay is empty, it's off. Fill with any text to make true
 # If crossplay is empty, it's off. Fill with any text to make true
-# Crossplay is currently not working on Linux dedicated servers, so for now the default is false (emtpy)
+# Crossplay is currently not working on Linux dedicated servers, so for now the default is false (empty)
 crossplay=""
 crossplay=""
 
 
+# INSTRUCTIONS FOR WORLD MODIFIERS (from Valheim Dedicated Server Manual.pdf located in serverfiles)
+# World modifiers can only be set in the start parameters and can be a combination of the following
+# PRESETS:
+#   Setting a preset will overwrite any other previous modifiers.
+#   Command line parameter: -preset
+#   Valid values: normal, casual, easy, hard, hardcore, immersive, hammer.
+# MODIFIERS:
+#   This is set as a combination of key and value, if combined with a preset should be set after.
+#   Command line parameter: -modifier
+#   Valid keys and possible values:
+#   combat: veryeasy, easy, hard, veryhard
+#   deathPenalty: casual, veryeasy, easy, hard, hardcore
+#   resources: muchless, less, more, muchmore, most
+#   raids: none, muchless, less, more, muchmore
+#   portals: casual, hard, veryhard
+# KEYS:
+#   Sets a world modifier checkbox key.
+#   Command line parameter: -setkey
+#   Valid values: nobuildcost, playerevents, passivemobs, nomap
+# Example of a combination of modifiers where we set no raids, very hard portals and no map run:
+#   worldmodifiers="-modifier raids none -modifier portals veryhard -setkey nomap"
+# NOTE: removing world modifiers will NOT reset them to default. the modifiers are stored in the world save file (.fwl)
+#   To go back to default you need to launch the server with the following parameter at least once:
+#.  worldmodifiers="-preset normal"
+
+worldmodifiers=""
+
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
 ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
-startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${worldname} -public ${public} -savedir '${savedir}' -logFile '${logFile}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong} ${crossplay:+-crossplay}"
+startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${worldname} -public ${public} -savedir '${savedir}' -saveinterval ${saveinterval} -backups ${backups} -backupshort ${backupshort} -backuplong ${backuplong}${logFile:+ -logFile '${logFile}'}${crossplay:+ -crossplay}${worldmodifiers:+ ${worldmodifiers}}"
 
 
 #### LinuxGSM Settings ####
 #### LinuxGSM Settings ####