Don’t Starve Together is a cooperative multiplayer version of the popular survival game Don’t Starve, and managing a server or taking control of the gameplay often requires the use of admin and console commands. Whether you’re looking to spawn items, control weather, or manage players, this guide will walk you through the essential commands for Don’t Starve Together (DST) and Don’t Starve.
What Are Console Commands?
Console commands are special codes you can enter in the game’s console to perform various tasks and operations. These commands help you modify the game world, spawn items, manage player stats, and handle server settings. In Don’t Starve Together, they’re especially useful for server admins who need to maintain control over the game.
How to Open the Console
Before you can use commands, you’ll need to open the in-game console:
- PC: Press
~
(tilde) to open the console. - Mac: Press
Command + ~
. - Linux: Use
Shift + ~
to access the console.
Now that your console is open, let’s dive into the most useful commands for Don’t Starve and Don’t Starve Together.
Essential Don’t Starve Commands
In the single-player Don’t Starve game, you can use commands to spawn items, change game settings, and alter your character’s stats. Here are some of the most commonly used commands:
Spawn Items
- c_spawn(“[item]”, [quantity]): Spawns the specified item at the player’s location. Example:scssКопіювати код
c_spawn("log", 10) // Spawns 10 logs.
Change Character Stats
- GetPlayer().components.health([value]): Sets the player’s maximum health. Example:scssКопіювати код
GetPlayer().components.health:SetMaxHealth(500) // Sets health to 500.
- GetPlayer().components.sanity([value]): Changes the player’s sanity to a certain percentage. Example:scssКопіювати код
GetPlayer().components.sanity:SetPercent(1) // Sets sanity to 100%.
Control Weather
- TheWorld(“ms_forceprecipitation”): Starts rain immediately.
- TheWorld(“ms_forceclear”): Clears the weather instantly.
Don’t Starve Together Admin Commands
For those managing multiplayer servers, Don’t Starve Together provides a range of admin commands that allow server operators to manage players, server settings, and world conditions.
Grant Admin Privileges
Before using admin commands, you must grant yourself administrative rights on the server. To do this, edit the adminlist.txt
file in your server directory, and add your Klei User ID to the list.
Player Management Commands
- AllPlayers[number](): Kicks a player from the server. Example:lessКопіювати код
AllPlayers[2]:Remove() // Removes the second player from the server.
- TheNet([KleiID]): Bans a player from the server. Use their KleiID to identify the player.
- TheNet([KleiID]): Unbans a previously banned player.
Give Items to Players
You can use admin commands to give items to specific players on your Don’t Starve Together server:
- c_give(“[item]”, [quantity], [player]): Spawns an item and gives it to the selected player. Example:scssКопіювати код
c_give("meat", 10, AllPlayers[1]) // Gives 10 pieces of meat to the first player.
Teleport Players
- c_goto([player_name]): Teleports you to another player’s location. Example:scssКопіювати код
c_goto("Wilson") // Teleports you to Wilson's location.
Change Server Time
- TheWorld(“ms_nextcycle”): Advances the game to the next day instantly.
- TheWorld(“ms_setphase”, “day”): Changes the game phase to day. Replace “day” with “dusk” or “night” to set a different phase.
Don’t Starve Together Console Commands
Don’t Starve Together also features powerful console commands for changing game parameters and player stats. Here are some must-know commands:
Basic Console Commands
- GetClock()(): Skips the current day and moves to the next.
- GetSeasonManager()(): Starts winter immediately in your game world.
- c_sethealth([value]): Sets your health to the specified value. Example:scssКопіювати код
c_sethealth(150) // Sets your health to 150.
Spawn Mobs
To spawn creatures or NPCs:
- c_spawn(“[creature]”): Spawns a creature at your current location. Example:scssКопіювати код
c_spawn("beefalo") // Spawns a beefalo at your location.
Don’t Starve Together Server Commands
If you’re running a Don’t Starve Together server, using server-specific commands will help you maintain and control your server. These commands let you handle game performance, player interactions, and more.
Server Management Commands
- c_shutdown(): Shuts down the server.
- c_reset(): Resets the server and starts a new world.
- c_save(): Forces a manual save of the server’s current state.
Set Server Password
- TheNet(“[password]”): Sets a password for the server. This is useful for keeping the server private or restricted to certain players.
Enable or Disable PvP
- TheNet(true): Enables PvP (player vs. player) combat on the server.
- TheNet(false): Disables PvP combat.
Tips for Using Admin and Console Commands
- Always Backup: Before making significant changes (e.g., resetting the server), it’s a good idea to back up your save data.
- Use with Caution: Some commands can drastically change your game world or player stats. Be careful when using commands that affect all players.
- Test Commands: Try commands in a solo world or test environment before using them in your main server to avoid unintended consequences.
Conclusion
Mastering Don’t Starve Together admin commands and console commands will give you more control over your server and the ability to create a customized gameplay experience. Whether you’re spawning items, managing players, or controlling the environment, these commands are essential tools for enhancing your Don’t Starve Together experience. Happy surviving!