KeepWorlds

Valheim World Modifiers on a Dedicated Server, Tested

What every Valheim world modifier preset and setting writes to the world, the -setkey syntax that works, and which settings turn off achievements.

World modifiers are the difficulty and rules you pick when you create a Valheim world: combat, death penalty, resources, raids, portals and a handful of checkboxes. A dedicated server has no menu for them, so you set them with launch arguments. Most guides stop at listing those arguments.

We run Valheim dedicated servers, so we tested what each argument actually does to the world: dozens of combinations on a dedicated server on version 1.0.16, re-checked on 1.0.17, with the world file read back after every run and the game code read where the files couldn't answer. Four results surprise people:

  • Modifiers live inside the world file. Remove the launch arguments and nothing changes.
  • -modifier adds to what's already there instead of replacing it.
  • A -setkey value has to be one argument with its key, or the number is silently dropped.
  • Every setting the in-game menu doesn't offer turns off achievements for that world.

Where world modifiers are stored

They're saved in the world's metadata file — the .fwl next to the .db that holds the world itself (.fwl2 and .db2 in the 1.0 save layout) — as a list of keys. The .db doesn't contain them. Every time the world loads, the server clears all modifier keys and loads them again from that list, so the world file is the only place the settings live.

That has a few practical consequences:

  • Removing the launch arguments changes nothing. The next start keeps whatever the world already has.
  • Restoring a backup restores its modifiers too. Roll back to last Tuesday and the difficulty goes back to what it was last Tuesday.
  • A world you bring over keeps its own. Copy a single-player world to the server, or move a world from another host, and it arrives with the modifiers it was created with.
  • The file catches up at the next save. The server writes the world every 30 minutes and on a clean shutdown. Change the arguments, restart, and open the file a minute later: you'll still see the old list. The new settings are already active in game.

The four launch arguments

ArgumentWhat it does
-preset <name>Clears every modifier, then applies a preset: normal, casual, easy, hard, hardcore, immersive, hammer
-modifier <type> <level>Sets one modifier — combat, deathpenalty, resources, raids or portals — and leaves the rest alone
-setkey <key>Adds one raw key, including the ones the menu doesn't offer
-resetmodifiersClears every modifier. It isn't in the manual that ships with the server, but it works

They run from left to right, in the order you write them. Names and levels aren't case-sensitive. A misspelt preset or level doesn't stop the server: it logs a line starting Could not parse and starts with the modifiers the world already had.

Why -modifier doesn't undo an earlier setting

-modifier only adds or replaces the keys belonging to the level you pick. Keys that level doesn't use stay where they were. Start a world on the Hard preset, later switch with -modifier combat veryeasy, and the world keeps enemyleveluprate 120 from Hard — more starred enemies on a world that is otherwise set to Very Easy. Very Easy simply has no key of that name to overwrite it with.

The fix is to start the list from nothing every time. This order gave us the same result on every restart:

./valheim_server.x86_64 -nographics -batchmode -name "Our world" -world "Dedicated" -password "<password>" \
  -resetmodifiers -preset hard -modifier deathpenalty casual -setkey nomap

-resetmodifiers first, then a preset or the individual -modifier lines, then any -setkey. -preset clears everything itself, so anything you put before it is lost.

What each preset writes

Measured on a fresh world. Numbers are percentages of the game's normal value. Every preset also stores a preset <name> bookkeeping entry, which the achievement check below ignores.

PresetKeys written
Normalnone — clears everything
Casualplayerdamage 125, enemydamage 50, enemyspeedsize 90, deathkeepequip, skillreductionrate 15, resourcerate 150, eventrate 0, passivemobs, teleportall, playerevents
Easyplayerdamage 110, enemydamage 75, enemyspeedsize 95, eventrate 150
Hardplayerdamage 85, enemydamage 150, enemyspeedsize 110, enemyleveluprate 120, eventrate 60
Hardcoreplayerdamage 70, enemydamage 200, enemyspeedsize 120, enemyleveluprate 140, eventrate 60, deathdeleteitems, deathskillsreset, nomap, nobossportals
Immersivenomap, noportals, fire
Hammer Modenobuildcost, passivemobs, eventrate 0

Casual is Very Easy combat plus the Casual death penalty, more resources, no raids, passive enemies, unrestricted portals and player-based raids. Hardcore is Very Hard combat plus the Hardcore death penalty, no map and no portals while a boss is alive.

What each modifier level writes

Combat — playerdamage is the damage you deal, enemydamage the damage you take, enemyspeedsize how big and fast enemies are, enemyleveluprate how often starred enemies appear.

-modifier combatplayerdamageenemydamageenemyspeedsizeenemyleveluprate
veryeasy1255090—
easy1107595—
normal————
hard85150110120
veryhard70200120140

Death penalty — skillreductionrate scales how much skill you lose on death.

-modifier deathpenaltyKeysWhat happens when you die
casualdeathkeepequip, skillreductionrate 15Equipped gear stays on you; the rest drops. Little skill loss
veryeasyskillreductionrate 15Everything drops where you died. Little skill loss
easyskillreductionrate 50Everything drops. Half the normal skill loss
normalnoneEverything drops, and you can go back for it
harddeathdeleteunequipped, skillreductionrate 150Equipped items drop; the rest of your inventory is deleted. More skill loss
hardcoredeathdeleteitems, deathskillsresetEverything you carry is deleted and every skill resets

Resources — one key, resourcerate: muchless 50, less 75, more 150, muchmore 200, most 300.

Raids — one key, eventrate, and it runs backwards: it stretches the time between raids, so a bigger number means fewer raids. none 0 (raids off), muchless 200, less 150, more 60, muchmore 30.

Portals — casual writes teleportall (every item can go through, ores and metals included), hard writes nobossportals (no portals while a boss is alive), veryhard writes noportals.

The five checkboxes in the menu have no -modifier form. Set them with -setkey: nobuildcost (No Build Cost), passivemobs (Passive enemies), playerevents (Player based raids), nomap (No Map), fire (Fire Hazards).

Settings the menu doesn't have

-setkey accepts more than the menu offers. These keys aren't in the in-game World Modifiers screen, but the game code reads them and a dedicated server applies them:

KeyEffect
nocraftcostCrafting needs no materials
noworkbenchBuild without being near a workbench
allpiecesunlockedEvery build piece is available from the start
allrecipesunlockedEvery crafting recipe is available from the start
dungeonbuildPlace build pieces inside dungeons and other interiors
nobuildingfallRain, snow, ash and lava stop damaging buildings

deathkeepinventory, nopseudodrops, noheavysnow, allheavysnow and worldlevellockedtools are read by the game too. We haven't tested what they do.

Then the rates. Each takes a percentage, 100 is the game's default, and the number goes in the same argument as the key: -setkey "carryweightrate 200" doubles carry weight.

KeyScales
skillgainrateHow fast skills level up
skillreductionrateSkill lost on death
staminarateStamina used by every action (0 = none)
movestaminarateExtra multiplier for running, jumping and swimming
staminaregenrateHow fast stamina recovers
eitrrateEitr used by magic
durabilityrateHow fast weapons, tools and armor wear out
foodrateHow fast food wears off (higher = sooner)
adrenalinerateHow fast Adrenaline builds up
carryweightrateMaximum carry weight

The combat keys take any percentage the same way, for example -setkey "playerdamage 150".

Everything in this section turns off achievements for the world, and so does a combat value no menu level uses. Details below.

Why -setkey seems not to work

The value went in as a separate argument. -setkey carryweightrate 200 is two arguments: the server stores carryweightrate with no number, which means 100%, and treats 200 as a stray argument. The key and the number must be one argument, so quote them: -setkey "carryweightrate 200". Watch launchers that build the command line from a single variable split on spaces — some panels and container images do this — because they split the quoted pair back into two.

A typo is accepted. -setkey doesn't check names. -setkey nobuildcosts is written to the world exactly as typed and does nothing.

It can't remove anything. Leaving a -setkey out of the next start doesn't turn the setting off, because the key is already saved in the world. Start with -resetmodifiers and list what you want to keep.

You checked the file too early. The new key is active in game as soon as the world loads, but it reaches the .fwl only at the next save.

On a hosted server you don't build this line by hand

With KeepWorlds, world modifiers are a form in your Console: pick a preset, or choose Custom Modifiers to set the five difficulty settings, the rules and the rates one by one. The Console writes the arguments in the order above, starts from a clean list every time and passes each rate as a single argument. The default is Keep the world's own settings, so a world you import or set up earlier keeps the modifiers it already has.

Do world modifiers turn off achievements?

The settings the in-game menu can produce — the presets, the five sliders at their levels and the five checkboxes — don't switch achievements off on their own. Anything else does.

The game checks every modifier key in the world against the values its menu can produce. One key outside that set marks the world, and everyone playing in it sees this in the achievements panel:

Achievement progress is permanently disabled for this world due to using dev command world modifiers.

That covers every key in the "Settings the menu doesn't have" section, every rate key — even one set to 100 — unless its value is one a menu level writes (such as skillreductionrate 50), and a combat value no level uses, such as playerdamage 150. It applies on a dedicated server too: when a player joins, the server sends the world's keys and the player's game runs the same check on them. We read this in the game code of 1.0.16 and confirmed it unchanged in 1.0.17. The message says "permanently". The check reads the world's current keys, so removing them with -resetmodifiers may clear it, but we haven't confirmed that in game. Assume it's permanent.

Iron Gate's Valheim 1.0 FAQ adds that some menu modifiers also block certain achievements, naming Hammer Mode, which it counts as a temporary cheat. We couldn't find how that is enforced in the code, so treat Hammer Mode as blocking.

Achievements tied to a difficulty count progress under your Combat setting alone. Death penalty, resources, raids and portals play no part in that.

The death penalty is the one setting backups can't undo

Valheim characters live on each player's own computer, not on the server. A server backup holds the world: buildings, chests, the map and the modifiers. It doesn't hold anyone's inventory or skills.

So the Hard and Hardcore death penalties act on something no server-side backup reaches. Under Hard, a player who dies loses everything in their inventory that wasn't equipped. Under Hardcore, everything they carry is deleted and every skill resets. Rolling the world back afterwards returns the world to the earlier point. It doesn't return their gear.

Treat these two as a group decision. Tell everyone before they go on, not after the first death.

Changing modifiers on an existing world

You can, at any point: stop the server, change the arguments, start it again. The new modifiers apply when the world loads and are saved into it from then on. Players already in the world keep their characters; the new combat, rates and rules apply to them from that start.

If you'll keep the arguments in your launch line anyway, keep the full list, starting with -resetmodifiers. Then the launch line is an exact record of the world's settings, and changing one word changes one setting.

Common questions

How do I set world modifiers on a Valheim dedicated server?

Add launch arguments to the server's start command: -preset for one of the seven presets, -modifier <type> <level> for combat, death penalty, resources, raids or portals, and -setkey for the checkboxes and anything else. Begin with -resetmodifiers so the result doesn't depend on what the world had before, then restart the server.

Do world modifiers reset when the server restarts?

No. They're saved in the world file and loaded with the world, so a restart without the arguments keeps them. To change them you have to pass new ones, and to clear them, -resetmodifiers or -preset normal.

Why does -setkey ignore the number I gave it?

The key and the number were passed as two arguments. Quote them as one: -setkey "carryweightrate 200". Written as -setkey carryweightrate 200, the server stores the key with no value, which means the default 100%.

Are world modifiers saved in backups?

Yes. They're part of the world file, so a backup carries the modifiers the world had at that moment, and restoring it brings them back. Player characters, including what a harsh death penalty took from them, are not in a server backup.

Handing it off

Every setting above is a launch argument whose order, quoting and spelling you have to get right, on a world that quietly keeps whatever it was last given.

With Valheim server hosting from KeepWorlds, the same settings are a form. Saving the Hard or Hardcore death penalty asks you to confirm you've warned your players first, and backups and restores cover the world whenever an experiment goes wrong.

World modifiers in your Console — presets, or every setting one by one

Read this in another language

Rather not run it yourself?

Pick a game and a plan, and your server launches on a machine of its own. Backups, game updates and expiry reminders are on us.

See Plans