Within the estranged and wondrous world of Don’t Starve Together server hosting, many adventures await you and your friends. From collecting resources to building new tools, and creating a decked-out shelter. When doing this, you may find that resources take some time to gather, that the game is a bit too difficult, or that you simply want to spawn the best items. If you’re facing any of these situations, Don’t Starve Together admin commands are the option for you!
On a server, admin commands for Don’t Starve Together allow you to control and manage every detail of your server. You’ll be able to enable god mode for invincibility, enter creative mode to spawn any item, teleport to other players, and more. To use commands, you’ll only need admin access and a few seconds to type the commands. In this guide, we will show you how to become an admin and use admin commands on your Don’t Starve Together server!
Before you can become a Don’t Starve Together admin, you will need your KU ID, an ID provided by your Don’t Starve account. To access this, load Don’t Starve Together and, at the main menu, press “Account”.
Inside your Don’t Starve Together account you’ll see your “User Info” and, more importantly, the “Klei User ID” of your account. Copy your ID and save this for the next steps to become an admin on your game server!
With that ID in hand, follow these steps to become an admin:
Once your server is online, you and your admins will now have access to Don’t Starve Together admin commands!
Now that you’re an admin on your server, you can use Don’t Starve Together admin commands in your server’s console. How do you open that? Once you have joined in-game, press the “~”-key on your keyboard. If you don’t see that, it’s the key directly above the “Tab”-key.
After that has been pressed, you’ll see the Don’t Starve Together console and can begin using commands!
When exploring commands to use on your server, it’s important to note that “prefab” are objects within the game. Using their spawn code, you can summon and manipulate objects on your Don’t Starve Together server. Below, you can find a full list of the commands you can start using on your server today!
Name | Description | Syntax |
Spawn prefab | Summons in the specified amount of “prefab”. | c_spawn(“prefab”,amount) |
Give item | Gives the player a “prefab” and amount of that object. | c_give(“prefab”,amount) |
Go Adventuring | Gives the player a set of starting items. | c_goadventuring() |
Scenario | Applies a scenario script and runs it. | c_doscenario(scenario) |
Set Your Health | Sets your health to the set percentage. Note: Use fractional numbers for the percentage – 0.90 = 90%. | c_sethealth(percent) |
Set Your Sanity | Modifies your health to the set percentage. Note: Use fractional numbers for the percentage – 0.80 = 80%. | c_setsanity(percent) |
Set Your Hunger | Sets your hunger to the set percentage. Note: Use fractional numbers for the percentage – 0.70 = 70%. | c_sethunger(percent) |
Set Your Moisture | Adjusts the humidity to a set percentage. Note: Use fractional numbers for the percentage – 0.60 = 60%. | c_setmoisture(percent) |
Temperature | Sets your temperature to a set percentage. Note: Use fractional numbers for the percentage – 0.50 = 50%. | c_settemperature(degrees) |
God Mode | When god mode is enabled for your character, you will no longer lose sanity, hunger, or health. While active, commands to change your stats will not work. God mode can be disabled by using the command again. | c_godmode() |
Super God Mode | Similar to god mode but all stats are set to max. Super god mode can be disabled using the same command, however, max stats will remain. | c_supergodmode() |
Maintain Your Health | When used, sets the player’s health to constantly regenerate. To cancel the process, enter c_cancelmaintasks (ThePlayer). | c_maintainhealth(ThePlayer) |
Maintain Your Sanity | After being applied to a player, their sanity will constantly regenerate. To cancel the process, enter c_cancelmaintasks (ThePlayer). | c_maintainsanity(ThePlayer) |
Maintain Your Hunger | If set to a player, their hunger will constantly regenerate. To cancel the process, enter c_cancelmaintasks (ThePlayer). | c_maintainhunger(ThePlayer) |
Maintain Your Temperature | When set to a player, ensures their temperature is always perfect. To cancel the process, enter c_cancelmaintasks (ThePlayer) | c_maintaintemperature(ThePlayer) |
Maintain Your Moisture | Enabling this for a player will ensure their moisture is always perfect. To cancel the process, enter c_cancelmaintasks (ThePlayer). | c_maintainmoisture(ThePlayer) |
Maintain All | Sets a player to constantly regenerate all stats. To cancel the process, enter c_cancelmaintasks (ThePlayer). | c_maintainall(ThePlayer) |
Mob Invisibility | Prevents mobs from targeting the player in combat. It does not work in all circumstances such as boss fights. | c_makeinvisible() |
Set Your Running Speed | The standard bonus running speed is 1.2, making you twice as fast. At 12 or more you can easily walk through walls and “over” water. | c_speedmult(multiplier) |
Name | Description | Syntax |
Hide and show HUD | Hides or shows (after hiding) the full HUD of the game. | GetPlayer().HUD:Hide()GetPlayer().HUD:Show() |
Creative Mode | Allows a player to craft any item for free, including items not normally available. After switching levels, you will need to re-enter the command. | GetPlayer().components.builder:GiveAllRecipes() |
Maximum Health | Changes the maximum Health of your characters. | GetPlayer().components.health:SetMaxHealth(value) |
Maximum sanity | Changes the maximum sanity of your characters. | GetPlayer().components.sanity:SetMax(value) |
Maximum hunger | Changes the maximum hunger of your characters. | GetPlayer().components.hunger:SetMax(value) |
Pause hunger | Your Characters will no longer starve. | GetPlayer().components.hunger:Pause(true) |
List all players with username and player number | Displays a list of players in the chat. | c_listallplayers() |
Get a certain player | AllPlayers[1] will get the player if you are the host. Other players should have numbers as shown on the scoreboard. (In certain situations, the number may be wrong. You can be more precise by using c_listallplayers() first to see the username and character for each player number. Most of ThePlayer commands can be used with AllPlayers[number] instead of ThePlayer. | AllPlayers[number] |
Apply a command to all players | Replace the command with another command, using “v” instead of AllPlayers[number]. For example, “for k,v in pairs(AllPlayers) do c_move(v) end” will move all players to the mouse position. | for k,v in pairs(AllPlayers) do [command] end |
Kill a player | Instantly kills a player. | AllPlayers[number]:PushEvent(‘death’) |
Resurrect a player | Brings a player back to life. | AllPlayers[number]:PushEvent(‘respawnfromghost’) |
Give creative mode to a player | Provides a player with creative mode. | AllPlayers[number].components.builder:GiveAllRecipes( |
Teleport to a player | Teleports you to a player. | c_goto(AllPlayers[number]) |
Werebeaver | Turn Woodie into the Werebeaver. | GetPlayer().components.beaverness:SetPercent(1) |
Name | Description | Syntax |
Teleport to Prefab | After pressing enter, teleports you to the first numerical instance of the named prefab. If multiple iterations of the prefab exist, a list of the entity numbers will be displayed in the console log, and each subsequent execution of the same command will transport the player from entity to entity in the order they were generated in the world. | c_gonext(“prefab”) |
Delete Item Under Mouse | After pressing enter, this will delete the item under your mouse. Use the second command on dedicated servers, as the first command in single-player only. | ConsoleWorldEntityUnderMouse():Remove()c_select():Remove() |
Delete All | After pressing enter, you’ll delete every instance of whatever item prefab is entered. Great for cleaning up objects on your server. | for k,v in pairs(Ents) do if v.prefab == “prefab” then v:Remove() end end |
Skip to the Next Day Cycle | Skips to the next cycle in the day. | TheWorld:PushEvent(“ms_nextcycle”) |
Skip Day | Skips a set amount of time based on what you set for the num. Values above 12 can result in lag. | c_skip(x) |
Skip time | TheWorld.net.components.clock:OnUpdate(16*30*x) | |
Skip time units and update | Skips X time units and performs the “LongUpdate” function on world objects.Note: There are 30-time units per segment. To skip a whole day one can either use LongUpdate(480) or use multiplicative values such as LongUpdate(X*16*30) or LongUpdate(X*TUNING.TOTAL_DAY_TIME), with X=days to skip. | LongUpdate(X) |
Speed up simulation | Speeds up the simulation of the world. Some events are determined by time past in-game and hence can be triggered to happen earlier through this speed-up. | c_speedup() |
Speed up simulation* | Sets the time scale of the simulation to a specific value X. The normal time scale corresponds to the value 1. The value 0 pauses the game. Note that console can not be used while the game is paused preventing removing pause. | TheSim:SetTimeScale(X) |
Skip phase | Skips the current phase | TheWorld:PushEvent(“ms_nextphase”) |
Set segments | Allows for setting the duration for day, dusk, and night. (total value must NOT exceed 16) | TheWorld:PushEvent(“ms_setclocksegs”, {day=x,dusk=y,night=z}) |
Set season segments | Allows for setting the duration for the day, dusk, and night by season. (total values must NOT exceed 16) | TheWorld:PushEvent(“ms_setseasonclocksegs”, {summer={day=sx,dusk=sy,night=sz}, winter={day=wx,dusk=wy,night=wz}}) |
Set season lengths | Sets the duration of each season. | TheWorld:PushEvent(“ms_setseasonlength”, {season=”summer”, length=15}) |
Start Spring | Adjusts the season to spring. | TheWorld:PushEvent(“ms_setseason”, “spring”) |
Start Summer | Modifies the season to summer. | TheWorld:PushEvent(“ms_setseason”, “summer”) |
Start Autumn | Changes the season to autumn. | TheWorld:PushEvent(“ms_setseason”, “autumn”) |
Start Winter | Sets the season to winter. | TheWorld:PushEvent(“ms_setseason”, “summer”) |
Start Rain | Starts rain. | TheWorld:PushEvent(“ms_forceprecipitation”) |
Do Lightning Strike | Causes a lightning strike on your mouse cursor. Will hit a lightning rod instead if there is one near. | TheWorld:PushEvent(“ms_sendlightningstrike”, ConsoleWorldPosition()) |
Meteor Strike | Causes a meteor strike near your mouse cursor. Spawns different kinds of rocks randomly. | c_spawn(“shadowmeteor”, 1) |
Activate all Events | Activates all Events at the same time. Doesnt work if in world gen the events section is set to Auto. | 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 end |
Name | Description | Syntax |
Kick Player | Kicks a player out of the server. | TheNet:Kick(userid) |
Ban Player | Kicks and denies access to the server. | TheNet:Kick(userid) |
Regenerate a world shard | Regenerates specified items in a shard. | c_regenerateshard() |
Enable/Disable new player joining | Setting it to true is the default behavior (people can join). Setting it to false prevents anyone from joining. | TheNet:SetAllowIncomingConnections( true / false ) |
Make a server announcement | This allows you to announce server shutdowns/restarts so players do not just get disconnected without warning. | c_announce(“announcement”) |
With the ability to use admin commands, you can now manage the perfect server to avoid starving. From summoning items to help defeat bosses to spawning items to remain alive, and even activating super god mode for the ultimate protection. Where will you start first? Find out when you try Don’t Starve Together admin commands on your own server today!