Skip to content

Commit

Permalink
feat(vh): add an additional config string for valheim world modifiers (
Browse files Browse the repository at this point in the history
…#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 <[email protected]>
  • Loading branch information
rainst and dgibbs64 authored Oct 28, 2023
1 parent c0742b2 commit 35a535b
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions lgsm/config-default/config-lgsm/vhserver/_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,38 @@ backups="4"
backupshort="7200"
backuplong="43200"
# 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=""

# 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
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 ####

Expand Down

0 comments on commit 35a535b

Please sign in to comment.