Use the server console command c_despawn(AllPlayers[n]) to send a specific player back to character selection, then have them choose a new survivor. First run c_listallplayers() to find that player’s console number, and make the player drop every item: despawning removes the character’s inventory and equipment. This is a community-verified procedure rather than a command documented by Klei, so test it on the server build you actually run and back up the world first.
Prefer not to run the server on your own PC? Godlike.Host offers hosted Don't Starve Together servers with free DDoS protection and up to three free backups a day.
What the command does
In Don’t Starve Together (DST), a player’s survivor is normally selected when that player joins the world. The reported server-console method does not transform the existing survivor in place. Instead, it despawns that player and returns the connection to the character-selection screen. The player can then select another available character and re-enter the world.
As an Amazon Associate I earn from qualifying purchases.
The command is aimed at an administrator operating the dedicated server console. It is not a normal chat command, and the syntax matters: use parentheses and pass the player object shown by the player-list command.
Before you change anyone’s character
Back up the world
Make a copy of the world save before running any despawn command. The procedure is reported by community guides and forum discussions, not confirmed in current official Klei documentation. A backup gives you a recovery point if the command targets the wrong player, removes valuable items, or produces an error on your build.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Have the player empty their inventory
Ask the player to place all carried items, worn equipment, tools, resources and other valuables on the ground or in a container before you run the command. Reports specifically warn that despawning removes the player’s items. Treat the inventory as lost unless it has been dropped somewhere that remains in the world.
Use the server console and administrator access
Run the command from the dedicated server’s console with administrator privileges. The player does not need to type the command themselves. If you host locally, the self-targeting form described below is the relevant option; access and console setup vary by how the server was created.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Change another player’s character: exact procedure
- Back up the world save. Do this before asking the server to despawn anyone.
- Ask the player to drop everything. Confirm that no important item remains in their inventory or equipped slots.
- List the connected players. In the server console, enter
c_listallplayers()and submit it. The reported output includes each player’s number, name and current character. - Identify the console number. Use the number printed by
c_listallplayers(), not a number copied from the in-game scoreboard. Community reports caution that scoreboard numbering may not match the console list in every situation. - Despawns the selected player. Replace
nwith the number from the console output and runc_despawn(AllPlayers[n]). For example, if the list identifies the intended player as number 2, the command isc_despawn(AllPlayers[2]). - Let the player return to character selection. The reported result is a return to the character-select screen. The player can choose a different survivor and join again.
Do not type the brackets literally as [n]; they represent the player number. Do not omit the parentheses. A command such as c_despawn(AllPlayers[2]) is the complete form for player number 2.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Change the host’s own character
For the host or console operator, the reported self-targeting command is:
c_despawn(ThePlayer)
As with another player’s despawn, drop your items first and keep a world backup. This form targets the player represented by ThePlayer rather than an entry in the AllPlayers list.
Command reference
| Purpose | Command | What to substitute | Reported result |
|---|---|---|---|
| Show connected players | c_listallplayers() |
Nothing | Lists each player’s number, name and character. |
| Despawn another player | c_despawn(AllPlayers[n]) |
n is the number returned by c_listallplayers() |
Sends that player back to character selection. |
| Despawn yourself as host | c_despawn(ThePlayer) |
Nothing | Sends the host back to character selection. |
How to avoid targeting the wrong player
Run c_listallplayers() immediately before the despawn, especially when players have joined or left. Match the displayed name and current character to the person who requested the change, then use the associated console number. The number shown on a scoreboard is not guaranteed to be the same identifier used by AllPlayers[n].
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
- Confirm the player’s name verbally or in server chat.
- Check the character shown in the console output.
- Copy the number from the console output exactly.
- Read the completed command once before submitting it.
What happens to items and the world
The important side effect is item loss. Community instructions say that despawning removes the player’s items, which is why dropping everything is a required preparation step rather than an optional precaution. Place items in a chest, other container or clearly marked location before running the command, and make sure the player can find them after selecting a new character.
The reports do not establish a universal rule for every object carried by a player, every equipped slot or every modded item. For that reason, treat all inventory and equipment as at risk and test first on a copy of the world when the items are valuable.
Dedicated servers, caves and multi-shard worlds
The core command is described for a server console. A third-party guide reportedly says that caves and other multi-shard clusters must be handled one shard at a time, but that behavior is not confirmed by a primary source. If your world uses caves or multiple shards, identify which shard currently owns the player and be prepared to run the relevant console operation separately on each shard. Make a backup and test the arrangement before using it on an important world.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Do not assume that a command entered on one shard automatically changes a player represented on another shard. The available evidence does not establish that cross-shard behavior.
Free tools Windows power users keep installed
One-click scans. No signup required.
Troubleshooting errors and unexpected results
The command says a variable is undefined
A Klei bug-tracker discussion reported that c_despawn could fail when a string or number was passed because an input variable was undefined. The thread was later described as fixed in 2021, with a subsequent hotfix reportedly shipping the correction. If a current server still produces this error, verify the game build and update status, then test the exact object syntax shown above rather than passing a bare name or number.
You receive a Lua error after a character update
Older forum reports describe a Lua error following a major character update. A reply attributed the problem to call syntax, particularly missing parentheses. Re-enter the command exactly as c_listallplayers(), c_despawn(AllPlayers[n]) or c_despawn(ThePlayer). Do not remove the parentheses after the function name.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
The wrong survivor is selected
Stop and restore the backup if the wrong player was despawned or if the operation removed items that cannot be recovered. The usual cause to check is a mismatch between scoreboard numbering and the number printed by c_listallplayers(). Always use the console list as the authority for AllPlayers[n].
The player does not return to character selection
Confirm that you are using the dedicated server console with administrator access, that the player is connected, and that the command includes the player object and parentheses. Re-run c_listallplayers() to obtain a fresh number. If the command still fails, record the exact error and test the operation on a copy of the world rather than repeatedly altering the live save.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Alternative methods and their limits
| Method | Requirements | Evidence and trade-offs |
|---|---|---|
c_despawn(AllPlayers[n]) |
Administrator access to the server console; the number from c_listallplayers() |
Fastest reported method and the only one supported by multiple community references. It removes the player’s items unless they are dropped first. |
c_despawn(ThePlayer) |
Host or console operator access | Reported form for changing your own character. The same item-loss warning applies. |
| Celestial Portal route | Portal Paraphernalia placed on the Florid Postern to create a Celestial Portal, plus a Moon Rock Idol offered to that portal | One guide describes this in-game route, but it is not confirmed by a primary source for current DST servers. It requires the player to obtain the necessary items and still carries item-loss risk unless valuables are dropped first. |
c_swapcharacter |
Command reference for the base Don’t Starve game | The cited reference says a save-and-quit is needed for the change to apply. No supplied source confirms that it works on a DST dedicated server, so do not rely on it for this procedure. |
Why the portal and swap commands should not be your first choice
The Celestial Portal instructions come from a single unverified guide. They may describe a workable in-game sequence, but the available evidence does not establish that the route is supported on every DST version, server configuration or shard layout. It is slower than a console operation because the player must have the required portal materials and reach the portal.
c_swapcharacter is more problematic for a DST server guide because the cited command reference is for the base game. A base-game command name is not proof that the same function exists or behaves the same way in DST. Use the documented community procedure instead, and treat c_swapcharacter as unsupported unless you have verified it on a disposable copy of your exact build.
Safe operating checklist
- Back up the world before every test or live use.
- Ask the player to drop all inventory and equipped items.
- Run
c_listallplayers()from the server console. - Match the player’s name and character, then copy the console number.
- Use
c_despawn(AllPlayers[n])for another player orc_despawn(ThePlayer)for yourself. - Keep the parentheses and replace only
n. - Wait for the character-selection screen before asking the player to choose again.
- If caves or multiple shards are enabled, test the command on each relevant shard.
- Restore the backup if the wrong player is affected or the server reports an unrecoverable error.
What is and is not confirmed
Multiple community references agree on the basic sequence: list players, use the player number with c_despawn(AllPlayers[n]), and let the player select again. Community reports also agree that items should be dropped first because despawning removes them. The procedure has not been confirmed in official Klei documentation supplied for this guide, so behavior can vary with game version, server setup, mods and shard configuration.
The old undefined-input bug was reportedly fixed in 2021, but the age of that report means it should be treated as historical troubleshooting context, not a guarantee for every current build. The portal sequence and c_swapcharacter route have weaker evidence and should not replace a backed-up console test.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




