Don’t Starve Together – All Console Commands List

You are currently viewing Don’t Starve Together – All Console Commands List

In Don’t Starve Together, commands allow you to do pretty much anything you want. From spawning items to teleporting to a specific object, all can be done by a single line of code.

Sometimes, you can’t just remember all the commands in the game or specific parameters, making the debugging process take longer than expected.

Recommended Read: Don’t Starve Together – All Bosses List

That’s why in this guide, we’ll list all Don’t Starve Together console commands, including the character and player, attribute, item, world, server, and other miscellaneous commands.

All commands have been tested and should work fine with the game’s current version (v572130).

Table of Contents

All Console Commands in Don’t Starve Together

To use console commands in Don’t Starve Together, press the “~” key on your board. If nothing appears, you must enable the console command first.

Besides typing the commands and pressing the “Enter” key to activate the commands, you can:

  • Press the “Up Arrow” key to show the previous command.
  • Press the “Ctrl” key to switch between Local and Remote mode, which sometimes can be helpful if you only want to execute a command on your client side.

Remember that if a command requires a single () or double quotation mark () for any parameter, we will put it in. Otherwise, don’t use quotation marks in the commands.

The commands are case-sensitive. So, copying and pasting instead of manually typing them is recommended.

Character and Player Commands

Get a list of active/all players on the server and their number IDs.
You can use the IDs here as [number] in other commands.
AllPlayers[number]:PushEvent(‘death’)Kill the selected player.
AllPlayers[number]:PushEvent(‘respawnfromghost’)Revive the selected player.
c_despawn(AllPlayers[number])Force the selected player to change the character.
AllPlayers[number].components.inventory:DropEverything()Drop all items of the selected player.
c_makeinvisible()Monsters will ignore you in most cases.
c_godmode()Maintain your attributes (health, sanity, hunger) at the current value.
If you’re dead, using this will revive your character instead.
Using the command again, traveling through wormholes and cave entrances, sleeping, dying, transforming, teleporting, or re-entering the world will turn off this effect.
c_supergodmode()Same as above, but also set all attributes to full.
c_goto(AllPlayers[number])Teleport you to the selected player.
c_gonext(“prefab”)Teleport you next to the “prefab” object. If multiple objects exist, entering the command again will teleport you to the next object in the list.
c_move(AllPlayers[number])Teleport the selected player to your cursor.
Unlock all recipes, and you can craft anything without the required materials.
ThePlayer:EnableMovementPrediction(enable/false)Has the same effect as changing the value of this option through the settings menu.
for k,v in pairs(AllPlayers) do command endApply a command to all players on the server. If the command has “AllPlayers[number]”, then replace it with “v”.
For example: for k,v in pairs(AllPlayers) do c_despawn(v) end
ThePlayer.Transform:SetScale(x,y,z)Change the size of your character.
ThePlayer.AnimState:SetMultColour(x/255,y/255,z/255,number)Change the color and transparency of your character. Replace “x” with red value, “y” with green, “z” with blue, and “number” with opacity value.

Attribute Commands

Set your corresponding attribute to the inputted percent.
(1 = 100%, 0.5 = 50%, etc.)
c_speedmult(multiplier)Multiply your character’s waking speed.
Constantly restore your corresponding attribute.
c_maintainall()Constantly restore all attributes.
c_cancelmaintaintasks()Remove the effect of all maintain commands.
Set the max value of the corresponding attribute.
ThePlayer.components.hunger:Pause(true)Pause your hunger attribute.
ThePlayer.components.combat.damagemultiplier=valueMultiply your damage dealt by the inputted value.

Item Commands

c_spawn(“prefab”,amount)Spawn items, objects, and even characters at your cursor.
c_give(“prefab”,amount)Spawn items in your inventory. If you try giving a non-item, the object will be spawned at your cursor instead.
c_mat(“prefab”)Spawn the materials to craft the “prefab” item in your inventory.
c_find(“prefab”).Transform:SetPosition(AllPlayers[number]:GetPosition():Get())Teleport the nearest “prefab” object to the selected player’s location.
Delete items under your cursor.
c_goadventuring()Give starting materials, armor, weapons, tools, and food.

World Commands

c_skip(number)Skip “number” days*30*days)Skip the exact number of days.
For example, replacing “days” with 3.5 will skip 3.5 days.
TheWorld:PushEvent(“ms_nextcycle”)Skip to the start of the following day.
TheWorld:PushEvent(“ms_nextphase”)Skip to the next phase of the day.
TheWorld:PushEvent(“ms_setphase”,”phase_name”)Go to the corresponding phase of the day. “phase_name” can be day, dusk, or night.
TheWorld:PushEvent(“ms_setseason”,”summer/winter/spring/autumn”)Skip to the corresponding season.
TheWorld:PushEvent(“ms_forceprecipitation”, false)
Start/stop rain.
TheWorld:PushEvent(“ms_sendlightningstrike”, ConsoleWorldPosition())Summon a lightning strike at your cursor.
c_spawn(“shadowmeteor”,number)Spawn “numbers” of meteores at your cursor.
Regenerate a new world/shard and delete the current one.
for k,v in pairs(Ents) do if v.prefab == “prefab” then v:Remove() end endDelete all “prefab” objects in the world.
minimap = TheSim:FindFirstEntityWithTag(“mini­map”)
TheWorld.minimap.MiniMap:ShowArea (0,0,0,10000)
for x=-1600,1600,35 do for y=-1600,1600,35 do ThePlayer.player_classified.MapExplorer:RevealArea(x,0,y) end end
Reveal the map for yourself.
for k,v in pairs(AllPlayers) do for x=-1600,1600,35 do for y=-1600,1600,35 do v.player_classified.MapExplorer:RevealArea(x,0,y) end end endReveal the map for all players.
TheWorld:PushEvent(“ms_setseasonclocksegs”, {summer={day=x1,dusk=y1,night=z1}, winter={day=x2,dusk=y2,night=z2}, spring={day=x3,dusk=y3,night=z3}, autumn={day=x4,dusk=y4,night=z4}})Set the time for each phase of the day of each season. The sum of x, y, and z in a season must equal 16.
TheWorld:PushEvent(“ms_setclocksegs”, {day=x,dusk=y,night=z})Set the time for each phase of the day. The sum of x, y, and z in a season must equal 16.
TheWorld:PushEvent(“ms_setseasonlength”, {season=”autumn”, length=20})Set the length of the chosen season. In this case, Autumn has 20 days.
TheWorld:PushEvent(“ms_nextnightmarecycle”)Skip to the next Nightmare Cycle.
TheWorld:PushEvent(“ms_nextnightmarephase”)Skip to the next phase of Nightmare Cycle.
TheWorld:PushEvent(“ms_setnightmarephase”,”phase_name”)Go to the corresponding phase of Nightmare Cycle. “phase_name” can be calm, warm, wild, or dawn.
TheWorld:PushEvent(“ms_locknightmarephase”,”phase_name”)Lock Nightmare Cycle to the chosen phase.
TheWorld:PushEvent(“ms_locknightmarephase”)Unlock Nightmare Cycle from the chosen phase.
TheWorld:PushEvent(“ms_setnightmaresegs”, {calm=x,warn=y,wild=w,dawn=z})Set the time for each phase of Nightmare Cycle. The default value is 12, 3, 5, and 2.
Speed up the world simulation and set the simulation speed. The default value is 1.
for k, v in pairs(SPECIAL_EVENTS) do if v ~= SPECIAL_EVENTS.NONE then local tech = TECH[k] if tech ~= nil then tech.SCIENCE = 0 end end end function IsSpecialEventActive(event) return true endActivate all Events.

Server Commands

c_announce(“text”)Announce “text” as the server.
c_announce(“text”,number)Same as above, but the “text” will be repeated after “number” seconds.
c_connect(“IP address”, port, “password”)Connect to a specific server, assuming you know the server’s IP and password. By default, the port is 10999. If the server doesn’t have a password, remove that parameter from the command.
c_rollback(number)Roll to the previous saves (or days). It’s rollback by 1 day if you leave “number” empty.
c_save()Save the server immediately.
c_shutdown(true/false)Shut down the server without saving unless you put “true” or leave the parameter empty.
c_reset()Reload the world without saving.
c_stopvote()Stop the current vote.
TheNet:SetAllowIncomingConnections(true/false)Allow/prevent other people from joining the server.
Ban or kick a specific player. Remember that you can do these actions using the Scoreboard panel.
TheNet:BanForTime(“userid”,seconds)Ban a specific player for the inputted seconds. Remember that “userid” is not the first number you see when using the c_listallplayers() command. It’s the second string.

Other Commands

worm1 = c_spawn(“wormhole”)
worm2 = c_spawn(“wormhole”)
worm1.components.teleporter.targetTeleporter = worm2
worm2.components.teleporter.targetTeleporter = worm1
Spawn and link a pair of wormhole.
function spawn_beef(tendency) local beef = c_spawn(“beefalo”); beef.components.hunger:DoDelta(400); beef.components.domesticatable:DeltaTendency(tendency, 1); beef:SetTendency(); beef.components.domesticatable.domestication = 1; beef.components.domesticatable:BecomeDomesticated(); endA preparation function to spawn a tamed Beefalo.
spawn_beef(“DEFAULT/RIDER/ORNERY/PUDGY”)Must use the above command first. Then, use this command and pick your tendency to spawn a tamed Beefalo.
c_select().Transform:SetScale(x, y, z)Change the size of the object under your cursor.
c_select().AnimState:SetMultColour(x/255,y/255,z/255,number)Change the color and transparency of the object under your cursor. Replace “x” with red value, “y” with green, “z” with blue, and “number” with opacity value.
ErasePersistentString(“morgue”)Clear entries in the History of Travels and Obituaries menu.
c_countprefabs(“prefab”)When used in the Local mode, it will display the total number of “prefab” objects near you in the console log.
When used in the Remote mode, it will count all the “prefab” objects in the world.
ThePlayer.components.talker:Say(tostring(c_countprefabs(“prefab”)))Let your character say how many “prefab” items are in the world.
You can replace “prefab” with any object’s codename.
print(math.sqrt(ThePlayer:GetDistanceSqToInst(ConsoleWorldEntityUnderMouse())))Show the distance between your character and the hovered object in the console log.
c_select():AddComponent(“inventoryitem”)Make the object under your cursor pick-able. This command often crashes the game with mods installed.
TheScrapbookPartitions:DebugUnlockEverything()Complete the scrapbook. The command must be used in the Local mode.

That’s the list of all console commands in Don’t Starve Together!

Have any suggestions for this guide? Let us know in the comments section below.

Binh Tran

As a game writer, my goal is to craft engaging, informative, and concise articles. Whether it's diving into the latest gaming trends or writing game guides, I'm always excited to share my insights with others.

Leave a Reply