Valheim Wiki
EN
1293 records
› Home › Mechanics › Console commands
Cheats and administration

Console commands

Every Valheim console command: how to open the console, turn on the cheat commands and spawn any item or creature. The IDs are checked against the game data.

How to enable the console and cheats

  • Steam: right-click Valheim, open Properties and type -console in the Launch Options. In game, press F5.
  • PC Game Pass: add -console to the end of the Target field of a Valheim.exe shortcut. In game, press F5.
  • Xbox: hold LB, RB, LT and RT and press Menu. You type with the on-screen keyboard (the A button).
  • Then enter devcommands: the cheat commands are on. Entering it again turns them off.
Steam launch options for Valheim with -console typed in

Quick answers

How do I open the console in Valheim?

On Steam, add -console to the Launch Options, start the game and press F5. On PC Game Pass, add -console to the Target field of a Valheim.exe shortcut. On Xbox, hold LB, RB, LT and RT and press Menu. Then type devcommands to turn the cheat commands on.

Why does F5 not work?

Check that -console is in the launch options and restart the game, because the option is read only at launch. On many laptops F5 needs the Fn key held down. If the console opens but a command does nothing, type devcommands first.

Why can’t I use dev commands?

Cheat commands work in single player and in a world you host yourself. On a dedicated server they are not available to regular players. Type devcommands before the cheats.

Are there console commands on Xbox?

Yes. Hold LB, RB, LT and RT and press Menu, then type with the on-screen keyboard using the A button.

How do I turn on god mode or flying?

After devcommands, god toggles invincibility, fly toggles flying and nocost makes building free. Each command works as a switch: enter it again to turn it off.

Where do I find item IDs for spawn?

The IDs for spawn section below lists every item and creature of the wiki with its ID. Click an ID to copy the ready command and keep the letter case exactly as shown.

Player devcommands

Command What it does
god Toggles invincibility.
ghost Monsters stop noticing you.
nocost Building is free: no materials are spent.
heal Fully restores health and stamina.
repairall Repairs all of your equipment.
respawn The same as die: kills your character and you respawn.
die Kills your character.
puke Empties your stomach: all the food you ate disappears.
addstatus <effect> Applies a status effect by its ID. The list of effects is below.
clearstatus Removes all status effects from you.
setpower <power> Sets your active boss power and resets its cooldown. The power IDs are below.
nomap Turns the map off for your character. If the host runs it, the map is also turned off for players who join later.

Skills and looks devcommands

Command What it does
raiseskill <skill> <levels> Raises a skill by the given number of levels. The skill names are below.
resetskill <skill> Resets the given skill.
resetknownitems Resets the known items and recipes.
resetcharacter Resets the character data.
model <0|1> Changes the character model: 0 is masculine, 1 is feminine.
hair <1–23> Changes the hairstyle.
beard <1–16> Changes the beard.

Items devcommands

Command What it does
spawn <ID> [amount] [level] [p|e|i] Creates an item or a creature next to you. For creatures, level 3 means two stars (spawn Troll 1 3 creates a troll with two stars). Add * at the end of the name to spawn everything that contains the word. The letter p picks the spawned items up, e equips them, and i spawns only if you do not already have one.
itemset <set> [keep] Gives a ready-made gear set. With keep your current items are not dropped. The set names are below.
inventorysize <number> Sets the inventory size as a whole number (32 by default). Going beyond the standard grid can break the look of the interface.
inventoryclean Throws out items that sit in invalid inventory slots.
removedrops Removes all item drops lying on the ground nearby.
forcedelete [radius] [*name] Force-deletes objects within a radius (5 by default, 50 at most). If you give a name, only the matching objects are removed. Back up the world first.

Creatures devcommands

Command What it does
tame Tames all tameable creatures nearby.
killall Kills all creatures nearby.
killenemies Kills all enemies nearby.
killtame Kills all tamed creatures nearby.
aggravate Makes all neutral creatures nearby hostile.
removebirds Removes all birds.
removefish Removes all fish.
printcreatures Shows the count and levels of active creatures.

World, weather and time devcommands

Command What it does
env <weather> Forces the weather. The names are below.
resetenv Cancels the forced weather.
wind <angle> <intensity> Sets the wind direction and strength.
resetwind Returns the wind to normal.
event <event> Starts an event by name. The list of events is below.
randomevent Starts a random event.
stopevent Stops the current event.
pevents <list|start|stop|here> Shows persistent events or starts and stops them.
players <number> Forces the world difficulty as if the given number of players were online. 0 resets it.
time Shows the current in-game time.
skiptime <seconds> Skips ahead by the given number of in-game seconds.
sleep Skips the night to the morning.
tod <0–1> Forces the time of day: 0 is midnight and 0.5 is midday. The value −1 returns the normal flow of time.
timescale <speed> [fade] Changes the speed of in-game time. The fade time is 1 by default and 3 at most.
snow [amount] Adds or removes a layer of snow on all building pieces nearby.
tombstone <name> Creates a tombstone with the given name.
vegetation Spawns vegetation.
resetbuildui Resets the saved build menu data.
save Forces the world to save.
location <location> [SAVE] Spawns a location nearby. Without SAVE, saving the world is disabled for good, so use it on a test world only.
genloc Runs the generation of the world’s locations. It changes the world, so use it on a test world only.

Map and teleporting devcommands

Command What it does
printseeds Shows the world seed (you need the text after the slash, and the number before it is its numeric form) and the seeds of the loaded dungeons. Handy on a server or in a friend’s world. How to find your world seed → Open the seed in the Seed Map →
pos Shows your current coordinates.
goto <x> <z> Teleports you to the given coordinates.
find <text> [amount] Searches the loaded objects and locations by name and pings the results on the map. If you give a number above 1, it places pins instead.
findtp <text> Teleports you to the nearest object with that name.
findbiome <biome> Marks the centers of biomes of the given type on the map.
findbiometp <biome> Finds the nearest biome of this type and teleports you there.
exploremap Reveals the whole map.
resetmap Resets the map exploration.
resetsharedmap Removes the shared map data from the cartography table.
recall [name] Teleports all players to you, or only the one whose name you give.
resetspawn Resets your spawn point.
altbioms Lists the biomes with their modifiers.
haslocation Checks whether the zone has a location.
printlocations Shows the count of loaded locations.
optterrain Optimizes old terrain modifications.
nextseed <seed> Forces the seed of the next dungeon. Saving the world is disabled for good, so use it on a test world only.
biomeinfo Shows info about the biome you are standing in.
height Shows the terrain height at your position.

Flying and camera devcommands

The debugmode command turns on flying and a few more features. These keys work in it: Z toggles flying (Space goes up, Ctrl goes down), K kills the enemies nearby, L removes the drops on the ground nearby, B toggles free building.

Command What it does
debugmode Toggles the debug mode (flying, free building and more). The keys are described above.
fly Toggles flying.
freefly Toggles the free camera.
ffsmooth <0|1> Turns smooth free-camera movement on or off.
fov <number> Changes the field of view.

Utility

Command What it does
devcommands Turns the cheat commands on. Entering it again turns them off.
help [1–5] Shows the list of commands. There are five pages; give the number after help.
sortcraft <type> Sorts the crafting list by name, type, weight or count (name, type, weight, count).
filtercraft <text> Filters the crafting list by text.
clear Clears the console window.
maxfps <number> Limits the frames per second.
bind <key> <command> Binds a command to a key. It can conflict with the game controls.
unbind <key> Removes your own key bind.
printbinds Shows the current key binds.
resetbinds Resets all key binds to the defaults.
stats Shows the player stats.
achievements Shows your stats and progress.
confirmcheats Confirms the use of cheat commands and shows whether they block achievement progress. On Xbox the game may ask for it after devcommands.
yesiuseddevcommandsbutiwantmyachievementsanyway <1|0> Items and pieces made with cheats normally do not count toward achievements. The value 1 turns that check off.
setkey <key> Sets a world global key.
setkeyplayer <key> Sets a key for the player.
listkeys Lists the active global keys.
removekey <key> Removes a global key.
resetkeys Clears all global keys. On a server there is also resetworldkeys.
getstat <stat> Shows the given stat.
clearpopups Clears all current unlock pop-ups.
tutorialtoggle Toggles Hugin’s hints.
tutorialreset Resets the tutorial data.

Chat

Command What it does
say <text> Sends a chat message.
s <text> Sends a shout message.
w <name> <text> Sends a private message to a player.

Debug and rare

Mostly developer tools that are poorly documented. You will hardly need them in a normal playthrough.

Command What it does
xb:version Shows the hash of the game build.
cr Forces unused assets to unload.
gc Shows garbage collector information.
dpsdebug Toggles the damage-per-second debug print.
updatecover Forces the shelter cover to refresh.
exclusivefullscreen Switches the window between exclusive fullscreen and borderless.
cinematic <name> Plays a cinematic.
cinematicsleep <name> Plays a cinematic during the next sleep for everyone.

Server admin

These commands work only for players on the server admin list.

Command What it does
kick <name|ip|userID> Removes a player from the server.
ban <name|ip|userID> Bans a player.
unban <ip|userID> Removes a ban.
banned Lists the banned players.
ping Shows the connection ping.
noportals Turns portals off on the server.
restartparty Restarts the PlayFab party network.
save Forces the server world to save.
info Shows the server’s system information.
lodbias <number> Controls how far objects keep their detail on the server. It takes whole and fractional numbers (for example 1 or 2.5).
setworldpreset <preset> Sets the world difficulty preset. The value default resets all modifiers to the standard ones. The list of presets is below.
setworldmodifier <modifier> <value> Changes a single world modifier. Write the modifier name with a capital letter. To reset everything to the standard values, use setworldpreset default. The modifiers and their values are below.
resetworldkeys Resets the world’s global keys.

Values for the commands

Presets for setworldpreset

The same presets as in the world creation menu. They work on a server for an admin. The default preset resets everything to the standard settings.

Modifiers for setworldmodifier

The modifier name starts with a capital letter and the value is lowercase. There is no separate “standard” value: use the default preset to reset. The options match the world menu.

Combat
DeathPenalty
Resources
Raids
Portals
Sets for itemset

Gear sets for the stages of the game, plus a fisherman set (Fisherman).

Effects for addstatus

The game’s effect IDs: conditions, potions and meads, and gear effects.

Powers for setpower

The Forsaken powers in progression order.

Skills for raiseskill and resetskill

Type the names exactly as listed, without spaces.

Events for event

Every event enabled in the game. Raids have a page of their own on the wiki.

Weather for env

Two names with a space are left out: Heath clear and DeepForest Mist.

IDs for spawn

Every item and creature of the wiki with its ID for the spawn command. Click an ID to copy the ready command. The name links to the item or creature page. Type the ID exactly, keeping the letter case.

Weapons
One-handed weapons and bombs
Two-handed weapons
Bows
Ammo
Shields
Armor
Helmets
Chest armor
Leg armor
Capes
Belts and other
Food and potions
Food
Potions and meads
Tools and trinkets
Tools
Trinkets
Idols
Materials
Ores and metals
Wood and stone
Hides and animal parts
Kitchen
Plants and seeds
Rare and magical
Parts and blanks
Molds and blanks
Bait
Potion bases
Trophies
Keys and boss loot
Valuables
Other
Building pieces
Crafting stations
Decor and comfort
Storage and transport
Defense
Siege
Seasonal
Structures
Other
Creatures and bosses
Passive creatures
Meadows
Black Forest
Swamp
Mountain
Plains
Mistlands
Ashlands
Deep North
Bosses and mini-bosses
Event variants and aspects