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!
| Command | Description | Syntax |
|---|---|---|
| Spawn Prefab | Summons the given amount of a prefab under your cursor. | c_spawn("prefab", amount) |
| Give Item | Gives you the given amount of a prefab in your inventory. | c_give("prefab", amount) |
| Go Adventuring | Gives you a set of starting items. | c_goadventuring() |
| Run a Scenario | Applies a scenario script and runs it. | c_doscenario(scenario) |
| Set Your Health | Sets your health to the given percentage. Use a fraction, so 0.90 equals 90 percent. | c_sethealth(percent) |
| Set Your Sanity | Sets your sanity to the given percentage. Use a fraction, so 0.80 equals 80 percent. | c_setsanity(percent) |
| Set Your Hunger | Sets your hunger to the given percentage. Use a fraction, so 0.70 equals 70 percent. | c_sethunger(percent) |
| Set Your Moisture | Sets your wetness to the given percentage. Use a fraction, so 0.60 equals 60 percent. | c_setmoisture(percent) |
| Set Your Temperature | Sets your body temperature to the given value in degrees. Body temperature runs from -20 to 90, so pick a value in the middle of that range for a comfortable level. | c_settemperature(degrees) |
| God Mode | Stops sanity, hunger, and health from draining while active. Stat commands stop working while god mode is on. Use the same command again to disable it. | c_godmode() |
| Super God Mode | Works like god mode, but also sets every stat to maximum. Disable it with the same command; your stats stay at maximum after you do. | c_supergodmode() |
| Maintain Your Health | Keeps your health constantly regenerating. Cancel it with c_cancelmaintaintasks(ThePlayer). |
c_maintainhealth(ThePlayer) |
| Maintain Your Sanity | Keeps your sanity constantly regenerating. Cancel it with c_cancelmaintaintasks(ThePlayer). |
c_maintainsanity(ThePlayer) |
| Maintain Your Hunger | Keeps your hunger constantly regenerating. Cancel it with c_cancelmaintaintasks(ThePlayer). |
c_maintainhunger(ThePlayer) |
| Maintain Your Temperature | Keeps your temperature at a comfortable level. Cancel it with c_cancelmaintaintasks(ThePlayer). |
c_maintaintemperature(ThePlayer) |
| Maintain Your Moisture | Keeps your moisture at a comfortable level. Cancel it with c_cancelmaintaintasks(ThePlayer). |
c_maintainmoisture(ThePlayer) |
| Maintain All Stats | Keeps every stat above constantly regenerating or comfortable. Cancel it with c_cancelmaintaintasks(ThePlayer). |
c_maintainall(ThePlayer) |
| Mob Invisibility | Stops most mobs from targeting you in combat. It doesn’t work in every situation, including some boss fights. | c_makeinvisible() |
| Set Your Running Speed | Sets your movement speed multiplier. The default is 1; set it to 2 to run exactly twice as fast. At 12 or higher, you can walk through walls and over water. | c_speedmult(multiplier) |
| Command | Description | Syntax |
|---|---|---|
| Creative Mode | Lets you craft anything for free, including items you wouldn’t normally have access to. Enter the command again to turn it off. | c_freecrafting() or GetPlayer().components.builder:GiveAllRecipes() |
| Set Maximum Health | Changes your character’s maximum health. | ThePlayer.components.health:SetMaxHealth(value) |
| Set Maximum Sanity | Changes your character’s maximum sanity. | ThePlayer.components.sanity:SetMax(value) |
| Set Maximum Hunger | Changes your character’s maximum hunger. | ThePlayer.components.hunger:SetMax(value) |
| Pause Hunger | Stops your character from starving. | ThePlayer.components.hunger:Pause(true) |
| List All Players | Displays every player’s username and player number in the chat. | c_listallplayers() |
| Get a Certain Player | Targets a specific player by number, as shown on the scoreboard. AllPlayers[1] targets you if you’re the host; run c_listallplayers() first if a number looks wrong. |
AllPlayers[number] |
| Apply a Command to All Players | Runs a command against every player at once. Replace command with the command you want to run, using v in place of AllPlayers[number]. |
for k,v in pairs(AllPlayers) do command end |
| Kill a Player | Instantly kills the targeted player. | AllPlayers[number]:PushEvent('death') |
| Resurrect a Player | Brings the targeted player back to life. | AllPlayers[number]:PushEvent('respawnfromghost') |
| Give Creative Mode to a Player | Gives the targeted player creative mode. | AllPlayers[number].components.builder:GiveAllRecipes() |
| Teleport to a Player | Teleports you to the targeted player. | c_goto(AllPlayers[number]) |
| Werebeaver | Turns Woodie into the Werebeaver, or back again. Set the value to 1 for the Werebeaver, or 0 to revert to Woodie. | c_setbeaverness(percentage) |
| Command | Description | Syntax |
|---|---|---|
| Teleport to Prefab | Teleports you to the first instance of the named prefab. If more than one exists, later instances log to the console so you can jump to each in turn. | c_gonext("prefab") |
| Delete Item Under Mouse | Deletes the item under your cursor. Use c_select():Remove() on a dedicated server; ConsoleWorldEntityUnderMouse():Remove() only works in single-player. |
c_select():Remove() |
| Delete All of a Prefab | Deletes every instance of the named prefab. Useful for clearing clutter from 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 straight to the next phase of the day cycle. | TheWorld:PushEvent("ms_nextcycle") |
| Skip Days | Skips the number of days you set. Large values can cause lag. | c_skip(x) |
| Skip Time | Skips x days of time. Large values can cause noticeable lag. |
TheWorld.net.components.clock:OnUpdate(16*30*x) |
| Skip Time Units | Skips X time units and runs the world’s LongUpdate function. There are 30 time units per segment, so use LongUpdate(X*16*30) to skip whole days, with X as the number of days. |
LongUpdate(X) |
| Speed Up Simulation | Speeds up the world simulation. Some in-game events are timed, so this can trigger them earlier. | c_speedup() |
| Set Simulation Speed | Sets the simulation’s time scale. The default value is 1; setting it to 0 pauses the simulation. | TheSim:SetTimeScale(X) |
| Skip Phase | Skips the current day cycle phase. | TheWorld:PushEvent("ms_nextphase") |
| Set Day Cycle Segments | Sets how many segments make up day, dusk, and night. The total can’t exceed 16. | TheWorld:PushEvent("ms_setclocksegs", {day=x,dusk=y,night=z}) |
| Set Seasonal Segments | Sets day, dusk, and night segments separately for summer and winter. The total for each season can’t exceed 16. | TheWorld:PushEvent("ms_setseasonclocksegs", {summer={day=sx,dusk=sy,night=sz}, winter={day=wx,dusk=wy,night=wz}}) |
| Set Season Length | Sets how many days a given season lasts. | TheWorld:PushEvent("ms_setseasonlength", {season="summer", length=15}) |
| Start Spring | Changes the season to spring. | TheWorld:PushEvent("ms_setseason", "spring") |
| Start Summer | Changes the season to summer. | TheWorld:PushEvent("ms_setseason", "summer") |
| Start Autumn | Changes the season to autumn. | TheWorld:PushEvent("ms_setseason", "autumn") |
| Start Winter | Changes the season to winter. | TheWorld:PushEvent("ms_setseason", "winter") |
| Start Rain | Starts rain. | TheWorld:PushEvent("ms_forceprecipitation") |
| Trigger a Lightning Strike | Strikes lightning at your cursor. It hits a nearby lightning rod instead, if one is in range. | TheWorld:PushEvent("ms_sendlightningstrike", ConsoleWorldPosition()) |
| Trigger a Meteor Strike | Drops a meteor near your cursor, spawning a random assortment of rocks. | c_spawn("shadowmeteor", 1) |
| Activate All Events | Activates every seasonal event at once. Doesn’t work if the world’s events setting was left on Auto at world generation. | 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 |
| Command | Description | Syntax |
|---|---|---|
| Kick a Player | Removes a player from the server. | TheNet:Kick(userid) |
| Ban a Player | Permanently blocks a player from rejoining the server. | TheNet:Ban(userid) |
| Regenerate a World Shard | Regenerates specified items in a shard. | c_regenerateshard() |
| Enable or Disable New Players Joining | Set to true, the default, to let new players join. Set to false to block everyone from joining. |
TheNet:SetAllowIncomingConnections(true/false) |
| Make a Server Announcement | Announces a shutdown or restart so players aren’t 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!
Don’t Starve Together Admin Commands – Introduction
- How to Become a Don’t Starve Together Admin
- Using the Console for Don’t Starve Commands
- Don’t Starve Together Commands List
- Simple Commands
- Player Commands
- World Commands
- Server Commands
Begin Using Don’t Starve Commands Today