The developer console, or just console, is an in-game interface for entering text-based commands used for debugging, cheating and server administration.
Enabling the console[]
To be able to use console commands, the console has to be enabled. There are multiple different ways depending on the game's version.
Steam
- Right-click Valheim in the Steam library.
- Select Properties.
- In the General tab, look for the Launch Options field.
- In it, type "-console".
- Close the window.
- Press F5 in-game to open the console window.
PC Game Pass
- Navigate to the game's installation folder. Typically, it is C:\XboxGames\Valheim\Content.
- In that folder, find Valheim.exe.
- Right-click Valheim.exe and select Create shortcut.
- Drag the shortcut to the desktop or preferred location.
- Right-click the shortcut and select Properties.
- In the Shortcut tab, add "-console" to the end of the Target field.
- Click Apply, then click OK.
- Launch the game from the shortcut.
- Press F5 in-game to open the console window.
Xbox Game Pass
- While in game hold: LB + RB + MENU.
- Press A to bring up the keyboard.
MacOS (App Store)
- Create a text file in TextEdit (or similar) and name it valheim.sh in a suitable place in your system
- Open the file and enter the following text:
#!bin/bash /Applications/Valheim.app/Contents/MacOS/Valheim -console
- Run the valheim.sh file to open Valheim with the console enabled.
- Use F5 in-game to open the console window
Note: These instructions are for users who purchased Valheim through the AppStore. If running Valheim through Steam, use the Steam instructions above.
GeForce Now
- Enable family sharing mode in Steam either via the client or the website (instructions via Steam). Do not add Valheim to the whitelist.
- Open Valheim using GeForce Now.
- Enter the PIN you set up in step 1, this will take you to the Steam client within GFN.
- Enable the console using the instructions for Steam above.
- Start the game.
- This will need doing every session as your settings will be reset when the session ends.
Commands[]
Player commands[]
Player commands do not require devcommands and can be used from the chat window. Typing "/" and clicking tab shows available commands.
Command | Effect | Note |
---|---|---|
bind [keybode] [command] | Binds a custom command to a Unity keycode. | - |
challenge | Challenge emote. | - |
cheer | Cheer emote. | - |
clear | Clears the console window. | - |
cr | Unloads unused assets | Happens by default every 20 minutes, but this commands forces a fresh unload. |
fov [number] | Changes field of view. | - |
hidebetatext | Toggles beta text visibility. | - |
help [page] [pages = 5] | Shows the available commands. | Optional parameters allow showing only some part of the commands. For example "help 2 4" shows the second quarter. |
info | Prints the current system information | - |
lodbias [number] | Sets the draw distance for the server. | The number can be set from 1 to 5. |
nomap | Toggles map visibility. | If the server, also toggles the nomap global key. |
noportals | Toggles portals. | If the server, toggles the noportals global key. |
nonono | Nonono emote. | - |
optterrain | Converts all the old terrain modifications (before Update 0.150.3) in the nearby area to the new system. | - |
point | Point emote. | - |
ping | Pings the server to measure latency. | - |
printbinds | Prints current custom command binds. | - |
printseeds | Prints seeds and positions of nearby dungeons. | - |
resetbinds | Removes all custom commands binds. | - |
resetsharedmap | Removes shared map data from cartography table. | - |
resetspawn | Resets the spawn location. | - |
respawn | Kills the character. | - |
restartparty | Restarts the playfab party network. | - |
s | Shouts a chat message. | - |
say | Says a chat message. | - |
sit | Sit emote. | - |
thumbsup | Thumbs up emote. | - |
tutorialreset | Resets viewed tutorial messages. | - |
tutorialtoggle | Toggles whether the tutorials are shown. | - |
unbind [keycode] | Clears all custom command binds from a Unity keycode. | - |
wave | Wave emote. | - |
W [player name] | Whispers a chat message to a player. | - |
Admin commands[]
Various admin utilities. Only available when player's SteamID is in the admin list.
Command | Effect | Note |
---|---|---|
ban [name/ip/userID] | Bans the named user. | - |
banned | Shows a full list of banned users. | - |
kick [name/ip/userID] | Kicks the named user. | - |
save | Forces the game to save. | - |
unban [name/ip/userID] | Unbans the named user. | - |
Cheat commands[]
To activate cheat commands, type devcommands and press enter. To deactivate cheat commands, type devcommands and press enter again. The cheat commands are available in singleplayer or manually hosted mode only. They do not work on a dedicated server.
Command | Effect | Note |
---|---|---|
addstatus [name] | Adds a status effect. | For example: Rested, Burning, SoftDeath, Wet, etc. |
aggravate | Aggravates neutrals within 20 meters. | - |
beard [beard#] | Permanently changes your beard. | Entering this command without an argument removes your beard. |
clearstatus | Removes any status effects (good and bad). | - |
dpsdebug | Toggles dps debug print on and off. | - |
env [env] | Sets debug environment. | Variables: Clear, Twilight_Clear, Misty, Darklands_dark, Heath clear, DeepForest Mist, GDKing, Rain, LightRain, ThunderStorm, Eikthyr, GoblinKing, nofogts, SwampRain, Bonemass, Snow, Twilight_Snow, Twilight_SnowStorm, SnowStorm, Moder, Ashrain, Crypt, SunkenCrypt. |
exploremap | Reveals the entire map. | - |
event [name] | Starts the named event. | - |
ffsmooth 1 | Adds smooth movements to free camera. | "ffsmooth 0" will reset smooth movements to normal. |
forcedelete [radius=5] [*name] | Removes objects within given radius (up to 50 meters). | If ID is given, only objects that contain the name on their ID. Following objects are never removed: Players and tombstones, Valkyrie, Points of Interests (locations), Dungeons and their rooms, Vegvisirs, Boss stones at the start temple. |
find [text] [pingmax] | Finds matching objects and pings them on the map. | Pingmax defaults to 1; If greater, will place pins on the map instead. |
findtp [text] | Finds matching objects and teleports the player to the nearest match. | |
fly | Toggles the fly mode. | Same as in the debug mode. |
freefly | Toggles the free camera. | - |
gc | Shows garbage collection information. | - |
genloc | Redistributes all unplaced locations. | - |
ghost | Toggle the ghost mode (enemies ignore you). | - |
god | Enables the god mode. | - |
goto [x] [z] | Teleports player to the specified coordinates. | - |
hair [hair#] | Permanently changes your hair. | Entering this command without an argument removes your hair. |
heal | Heals you to full health. | - |
itemset [name] [keep] | Spawns a premade item set. | Without "keep" flag, current items will be dropped.
|
killall | Kills nearby enemies and tamed creatures. | - |
killenemies | Kills nearby enemies. | - |
killtame | Kills nearby tamed creatures. | - |
listkeys | Lists all global keys. | - |
location [name] | Spawns a location instance. | Permanently disables saving. |
location [name] SAVE | Spawns a location instance. | Saving is not disabled. |
model [0-1] | Switches character model from masculine to feminine. | - |
nextseed | Forces the next dungeon to a seed (regenerates it). | Permanently disables saving. |
nocost | Toggles the no cost mode. | Same as in the debug mode. |
players [number] | Adjusts the difficulty scale. | Enter 0 to reset difficulty. |
pos | Shows player coordinates. | - |
printcreatures | Prints the counts and levels of active creatures. | - |
printlocations | Prints the loaded locations and their distances and offsets to the player. | - |
puke | Resets fullness/hunger, returning you to default Health/Stamina. | - |
raiseskill [skill] [amount] | Raises (or lowers) the named skill by the value entered. | - |
randomevent | Starts a random event. | - |
recall [name] | Teleports all players matching the name to your position. | Without name, teleports all players. |
removebirds | Removes all active birds. | - |
removedrops | Removes all items drops in the area. | Same as in the debug mode. |
removefish | Removes all active fish. | - |
removekey [name] | Removes a global key. | - |
resetcharacter | Resets all of your character data. | - |
resetenv | Resets the debug environment. | - |
resetkeys [name] | Removes all global keys. | [name] parameter does not do anything. |
resetmap | Hides entire map. | - |
resetskill [skill] | Sets specified skill level to 0. | - |
resetwind | Resets the wind angle and intensity. | - |
save | Forces the game to save the current world state. | - |
setfuel [value] | Adds value amount of fuel to all nearby fire sources | Negative values will reduce the level of fuel in fire sources down to zero. |
setkey [name] | Adds a global key. | - |
setpower [name] | Sets the current Forsaken power and resets the cooldown | For example: GP_Eikthyr, GP_TheElder, etc. |
skiptime [seconds = 240] | Skips forward, changing day number and time of day. | This does not update timestamps of objects which causes issues when going back in the time.
|
sleep | Skips forward one day. | - |
spawn [entity name] [amount] [level] | Spawns specified entity. | See ItemIDs for a list of spawnable entities.
|
stopevent | Stops the current event. | - |
tame | Tames all nearby tameable Creatures. | - |
test [value] | Toggles a test value. | "oldcomfort" Reverts to old non-optimized comfort calculation. |
time | Shows the current time and whether sleeping is possible. | - |
timescale [target = 1] [fadetime = 0] | Sets the speed of time. | Up to 3x speed. Fadetime sets the transition duration.
|
tod [0-1] | Sets time of day. | 0 and 1 are both midnight. 0.5 is noon. -1 revert to default. |
wind [angle] [intensity] | Adjusts the direction and intensity of the wind. |
|
Debug mode[]
The debug mode can be entered to access more cheats such as toggle fly or building without a workbench or resources. It can be entered by typing and executing the command debugmode in the console. Executing it again will exit the debug mode.
Key | Action |
---|---|
B | Toggle for creative mode building, no workbench or resources needed. |
K | Kills nearby enemies (excluding tamed creatures). |
L | Removes nearby item drops. |
Z | Toggle to fly. Spacebar gives you altitude, Ctrl brings you back down. |
Ctrl + MMB (on map) | Teleport to cursor location. |
Shift + C | Set time to day. |