~) on PC. Type a Lua command and press Enter, for example c_give("log", 20), and use c_godmode() for invincibility. Server commands need admin rights.Don't Starve Together console commands are Lua functions you type into the in-game console, opened with the tilde key on a standard keyboard. They let you spawn items, change stats, skip days and manage a server.
Many players search for dont starve together console commands without the apostrophe, and the list below covers the same thing. Commands on this page were checked against the Don't Starve wiki and a Nodecraft admin guide. Syntax uses brackets and quotes, so copy it exactly. If you like survival sandboxes, the same idea applies to Subnautica console commands.
How to open the console in Don't Starve Together
Press the tilde key (~), the one above Tab on an English keyboard. The console is on by default and you can change the key in the controls menu.
- Start or join a world.
- Press
~to open the console. - Type the command and press Enter.
- Press
~again to close it.
If the console never opens, open client.ini in the Klei folder (Documents\Klei\DoNotStarveTogether on Windows) and set console_enabled = true under the [MISC] section. Most commands must be typed again after you load a world.
c_reset() and c_regenerateworld() can wipe progress.Local versus remote commands
The console has two modes. Local runs on your own game. Remote runs on the host or dedicated server. Hold Ctrl while the console is open to switch to remote mode.
- Most player commands only work for non-host clients when an admin sends them as remote commands.
c_reset()may crash a client unless it is sent remotely.c_countprefabs("prefab")counts only the loaded area locally, but the whole world remotely.
Don't Starve Together commands list
Items and spawning
| Command | What it does |
|---|---|
c_give("prefab", amount) |
Adds the item to your inventory. Amount is optional. Only works for items that fit in an inventory. |
c_spawn("prefab", amount) |
Spawns the prefab under the mouse cursor. Amount is optional. |
c_find("prefab") |
Returns the nearest matching entity. |
c_countprefabs("prefab") |
Counts how many of a prefab exist. |
c_gonext("prefab") |
Teleports you to the next instance of the prefab. |
c_goadventuring() |
Gives starting items. |
Prefab names are the game's internal identifiers, so they are lowercase and case-sensitive, for example log or flower. A wrong name does nothing.
Player stats and modes
| Command | What it does |
|---|---|
c_godmode() |
Stops health, hunger and sanity loss. Run again to turn it off. |
c_supergodmode() |
Same as godmode but also fills all stats, including when you switch it off. |
c_sethealth(0.9) |
Sets health to a fraction. 0.9 means 90 percent. |
c_sethunger(0.9) |
Sets hunger to a fraction. |
c_setsanity(0.9) |
Sets sanity to a fraction. |
c_setmoisture(0.9) |
Sets wetness as a fraction. |
c_settemperature(degrees) |
Sets body temperature in degrees. |
c_maintainhealth(ThePlayer) |
Keeps regenerating health. Similar maintain commands exist for sanity, hunger, temperature and moisture. |
c_speedmult(2) |
Changes run speed. The default is 1. |
c_freecrafting() |
Toggles creative crafting so every recipe can be built. |
Health, hunger and god mode
Use c_godmode() for a toggle and c_supergodmode() when you also want full stats. Stat-changing commands do not work while godmode is active, so turn it off first. Both revive you if you are dead, but godmode is not kept after the revival.
Percent values are fractions, not whole numbers. c_sethealth(0.5) gives half health. The wiki shows 0.90 as 90 percent.
Values of 12 or more in c_speedmult let you walk through walls and over water, which can strand you in odd places, so use small numbers first.
Time, seasons and weather
| Command | What it does |
|---|---|
c_skip(5) |
Skips the given number of days. |
TheWorld:PushEvent("ms_nextcycle") |
Skips to the next day cycle. |
TheWorld:PushEvent("ms_nextphase") |
Skips the current phase. |
TheWorld:PushEvent("ms_setphase", "night") |
Sets the phase to day, dusk or night. |
TheWorld:PushEvent("ms_setseason", "winter") |
Starts autumn, winter, spring or summer. |
TheWorld:PushEvent("ms_forceprecipitation") |
Starts rain. Pass false to stop it. |
TheWorld:PushEvent("ms_sendlightningstrike", ConsoleWorldPosition()) |
Strikes lightning at the cursor. |
Season changes are useful for testing winter prep without waiting through autumn. Time commands change the whole shard, so on a shared server tell other players first.
Server and player commands
| Command | What it does |
|---|---|
c_announce("text") |
Sends a server announcement. |
c_listallplayers() |
Lists players with their numbers. The wiki says it can be unreliable. |
c_goto(AllPlayers[2]) |
Teleports you to the player with that number. |
c_move(AllPlayers[2]) |
Teleports that player to your cursor. |
c_save() |
Forces a save. Servers normally save when night ends. |
c_rollback(1) |
Rolls the server back by that many saves. |
c_reset() |
Reloads the world without saving. |
c_regenerateshard() |
Regenerates a world shard. Destroys progress. |
TheNet:Kick(userid) |
Kicks a player. |
TheNet:Ban(userid) |
Kicks and bans a player. |
Use AllPlayers[number] with the number from c_listallplayers() to target someone, or UserToPlayer('PlayerName') to use a name.
Don't Starve Together console commands not working
- Console will not open: set
console_enabled = trueinclient.ini, or check the console key in the controls menu. - Nothing happens on a server: you are not an admin, or you need the remote console. Hold Ctrl to switch.
- Item not found: the prefab name is wrong. Use the internal lowercase name, not the display name.
- Stats will not change: godmode is on. Run
c_godmode()again to turn it off. - Syntax error: check quotes, brackets and commas. Lua is strict.
- Commands reset after loading: type them again after each world load.
Other survival games handle this differently: see Raft console commands, Green Hell console commands, Grounded console commands and Project Zomboid console commands. For another cold-weather survival game that needs a mod for its console, read The Long Dark console commands. The wider list is in all game cheat codes.
Don't Starve Together console commands FAQ
How do I open the console in Don't Starve Together?
Press the tilde key (~) in game on a standard English keyboard. If it does not open, set console_enabled = true in client.ini under the MISC section, or rebind the key in controls.
How do I spawn items in Don't Starve Together?
Use c_give(“prefab”, amount) to add an item to your inventory, or c_spawn(“prefab”, amount) to place it under the cursor. Prefab names are lowercase internal names.
What is the god mode command in Don't Starve Together?
Type c_godmode() to stop health, hunger and sanity loss. c_supergodmode() does the same and also fills every stat. Run either again to switch it off.
How do I become admin in Don't Starve Together?
The server owner has to add you to the admin list. Admins can then run commands, using the remote console when needed. Non-admin clients cannot use server commands.
How do I skip days in Don't Starve Together?
Use c_skip(number) to skip that many days. TheWorld:PushEvent(“ms_nextcycle”) jumps to the next day cycle.
Do Don't Starve Together console commands work on consoles?
The sources describe the console on PC with a keyboard. Neither source documents a typed console on PlayStation, Xbox or Switch, so rely on PC for these commands.
If you also play Sons of the Forest, see Sons of the Forest console commands.
More cheat guides
- The Long Dark Console Commands: Enable F1 Console, Full List
- Palworld Console Commands Xbox: Admin Commands and Limits
- ATLAS Console Commands: Enable Cheats, Items, Ships
- Sunkenland Console Commands: No Console, Save Edit Guide
- Core Keeper Console Commands: /give, /spawn and Creative Mode
- Surroundead Console Commands: No Console, Difficulty and Trainers
- All Survival cheat codes
- All game cheat codes
Sources
- Don't Starve Wiki – Console/Don't Starve Together Commands
- Nodecraft – Admin Commands for Don't Starve Together
Leave a Reply