cheats
Developer cheats in Valheim are console commands used for testing, exploration, and direct world manipulation. They are available in solo play after enabling the console, and the more powerful developer commands must be switched on separately.
Accessing the console
Since version 0.148.6, the in-game console is disabled by default. To enable it, add -console to the game’s launch options in Steam.
- Press F5 to open or close the console.
- Type devcommands to enable or disable developer commands in solo play.
- Developer commands do not function in multiplayer.
Core developer commands
These are the main cheats and debug commands used for player control, world manipulation, and quick testing.
Player and survival control
- god: toggles god mode; the player takes no damage.
- ghost: toggles ghost mode; creatures ignore you.
- heal: fully restores the character.
- puke: resets food duration and returns health and stamina to their default state, allowing you to eat again.
- killall: kills all nearby enemies.
- tame: tames all nearby creatures.
- hair: removes the character’s hair permanently.
- beard: removes the character’s beard permanently.
- model [0/1]: switches the character’s gender.
Movement and camera
- fly: toggles flight for the character.
- freefly: toggles a free camera while leaving the character behind.
- ffsmooth 1 / 0: enables or disables smooth movement for free-fly camera movement.
- In debug mode, Z toggles flying, Space raises altitude, and Ctrl lowers altitude.
Time, weather, and environment
- tod [0-1]: sets the time of day.
- 0 and 1 are night.
- 0.5 is noon.
- tod -1 restores normal time progression.
- skiptime [seconds]: advances time by the specified number of seconds.
- sleep: skips a day.
- wind [angle 0-360] [strength 0-1]: sets wind direction and intensity.
- resetwind: resets wind direction and strength.
- env [environment]: sets a debug environment or weather state.
- resetenv: resets the debug environment.
Map, travel, and position
- exploremap: reveals the entire map.
- resetmap: resets the map to its original unexplored state.
- pos: shows the player’s coordinates.
- goto [x,z]: teleports the player to the specified coordinates.
- location: changes the spawn point to the current location.
Events and world state
- event [name]: triggers the named event.
- stopevent: ends the currently running event.
- randomevent: triggers a random event.
- setkey [name]: sets a global key.
- resetkeys [name]: clears the specified global key.
- listkeys: displays all global keys.
Debug mode
The debugmode command enables a special building-and-flying mode focused on creative testing.
When debug mode is active:
- B opens build mode.
- Z enables flight.
- Space increases altitude.
- Ctrl decreases altitude.
- K kills all creatures near the player, including tamed creatures.
Miscellaneous developer commands
- dpsdebug: toggles DPS display while in debug mode.
- beard [beard1 ... beard10, none]: changes your beard to the selected style.
- genloc: present as a developer command.
Admin commands
These commands are used to manage a server and require administrator access.
- help: shows all available server commands.
- kick [name/IP/UserID]: removes a player from the server.
- ban [name/IP/UserID]: permanently bans a player.
- unban [IP/UserID]: removes a permanent ban.
- banned: lists banned players.
- ping: shows server latency.
- info: shows current system information.
- save: forces an immediate world save.
- lodbias [1-5]: sets the server’s draw distance.
Console-spawned items and special content
Some items and entities are only available through console commands or are otherwise inaccessible in normal play.
Blue mushroom is currently unimplemented and can only be obtained via console commands.
Knight shield is currently only obtainable via console commands.
Iron shield is currently only obtainable via console commands and does not function properly; it appears attached behind the left foot rather than in the hand.
Hood of Odin can be spawned via commands, but only players with access to the associated DLC can equip and upgrade it.
- The cape and hood related to Hood of Odin can be spawned via commands, but cannot be equipped without the DLC.
- There is a creature with internal ID Goblin_Gem that does not appear in normal gameplay but can be spawned with the console and drops all three kinds of Ashlands gemstones.
- There is an unused asset called BonemawSerpentScale that can only be spawned with the Developer console and serves no gameplay purpose.
- Vile has starred variants that are only available by using the developer console.
- When Thungr is spawned with cheats, his corpse appears normal green rather than blue.
- Summoned starred variants of Thungr are brown, while Zil keeps his normal color.
Spawning Odin
Using the console command spawn odin, a silhouette appears briefly in front of the player and then vanishes.
- Odin disappears after 300 seconds.
- Odin also disappears if a player comes within 20 meters.
- Odin disappears if all players are more than 50 meters away.
- Odin does not take damage.
World edge notes
Developer commands make it possible to reach otherwise inaccessible places, such as fallen items at the edge of the world.
- Typing devcommands, then god and fly, lets you safely fly down to recover items, especially tombstones, without dying.
- The north, east, and west edges of the map have a flat ocean floor with no water.
- The ocean floor is empty except for some Tuna from the surface.
- Currents constantly push the player farther away from the edge of the world.
- Beyond about 5500 units north or 500 units east or west from the world edge, the Ocean biome becomes endless Ashlands.
- The south edge of the world is always Ashlands.
- At around 1,000,000 units from the center of the world, actor placement breaks down and characters begin to jitter until they are no longer visible.