On a Don’t Starve Together server, the most consistently reported way to let a player pick a different character is to despawn that player from the server console. First run c_listallplayers() to get the player’s console number, then run c_despawn(AllPlayers[n]), replacing n with that number. The player returns to character select and can choose again. Have them drop every item first: despawning removes the player’s carried items.
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
c_despawn removes the selected player from the current game session and sends that player back to the character-selection screen. It is the primary community-reported method for changing another person’s character on a Don’t Starve Together server. The command must be entered by an administrator with access to the dedicated server console.
As an Amazon Associate I earn from qualifying purchases.
Recommended Free Tools
This is a community-verified procedure rather than a command documented in official Klei documentation. Command behavior can therefore vary with the game build, server setup, or shard arrangement. Test it on your build before using it in an important world.
Prepare the world before changing anyone
Back up the world
Create a current world backup before issuing a despawn command. A backup gives you a recovery point if the wrong player is selected, the command errors, or your server’s build behaves differently from the reports on which this procedure is based.
#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.
Empty the player’s inventory
Ask the player to put every carried item on the ground before you run the command. The reported behavior is that despawning removes the player’s items. This includes equipment and anything in the player’s inventory, so do not use the command while the player is carrying irreplaceable resources unless you accept that loss.
Confirm console access
You need the server console, not merely the in-game scoreboard. On a dedicated server, run the command as an administrator. If you are hosting locally, use the host’s console or the console interface provided by your server setup. A regular player should not be expected to run this administrative command.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsFind the correct player number
Player numbers are supplied by the console command, not necessarily by the scoreboard. Ask everyone to remain connected long enough for you to identify the right entry, then enter:
c_listallplayers()
The command lists each connected player’s number, name, and current character. Match the name in that output, and write down the number shown for that player. Do not assume the scoreboard’s order or number is interchangeable with the value returned by the console; community reports say they do not match in every situation.
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.
For example, if the console output identifies a player named Rowan with number 2, the target expression is AllPlayers[2]. The number is an index into the server’s player list, so copy it exactly as displayed rather than substituting a name.
Change another player’s character
- Back up the world. Keep the backup from immediately before the change.
- Have the target player drop all items. Move tools, clothing, resources, and other carried objects onto the ground where the group can retrieve them.
- List the connected players. Run
c_listallplayers()in the server console. - Identify the target number. Match the player’s name and note the number printed by the command.
- Despawning the target. Run
c_despawn(AllPlayers[n]), replacingnwith the number from the list. For a player listed as number 2, the complete command isc_despawn(AllPlayers[2]). - Wait for the character screen. The selected player should be returned to character select. They can choose a character and re-enter the world through the normal join flow.
Use the parentheses exactly as shown. The command is a function call, so omitting them can produce a Lua error instead of changing the player.
Change the host’s own character
If you are the host and want to repick your own character, the reported self-targeting form is:
c_despawn(ThePlayer)
Run it from the host’s server console after placing your own items on the ground and making a backup. This form targets the player represented by ThePlayer, so it does not require you to look up your own entry with c_listallplayers().
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.
What the player should expect after despawning
A successful command does not silently transform the existing character in place. Instead, it returns that player to character selection. The player then chooses a replacement and joins again. Coordinate the change with the group: the player may be temporarily absent while selecting, and the items they dropped must remain undisturbed until they return.
Because the command removes the player from the active session, treat it as a reset of that player’s participation rather than a cosmetic edit. The world itself remains the same save, but the player’s former carried inventory is not preserved by the despawn operation.
Free tools Windows power users keep installed
One-click scans. No signup required.
Troubleshoot a failed or ineffective command
The command reports a syntax or Lua error
Check that you used both opening and closing parentheses and that the player reference is inside them:
c_despawn(AllPlayers[2])
Do not pass a bare name or an unwrapped number in place of the player object. Older forum discussions describe errors caused by incorrect call syntax, including a missing pair of parentheses.
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
The server says an input variable is undefined
A Klei bug-tracker discussion reported that c_despawn could fail when a string or number was supplied because an input variable was undefined. That discussion was reportedly marked fixed in 2021, with a later hotfix said to include the correction. If a current server still produces this error, update to the latest build available for your installation, restart the server, and test the object form shown above rather than passing a raw name or number.
The wrong person is selected
Run c_listallplayers() again immediately before despawning. Player lists can change as people join or leave, and the scoreboard is not a reliable substitute for the console’s number. Match both the displayed name and character before executing the command.
The player does not return to character select
Confirm that you entered the command in the server console with administrator privileges and that the target is currently connected to that server instance. Check the console log for a syntax error, then reconnect the player and obtain a fresh list before trying again. Do not repeatedly target guessed numbers.
The command worked, but items are missing
This is the expected risk of the procedure, not necessarily a second failure. Despawning removes carried items; use the world backup if you need to restore the previous state. For future changes, make dropping the full inventory a mandatory preparation step.
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.
Caves, shards, and clustered servers
Multi-shard arrangements require extra care. A third-party guide reports that commands may need to be run separately for each shard, but this behavior was not confirmed by a primary source. If your world has caves or another multi-shard configuration, identify which shard currently contains the player and run the command in that shard’s console. If the player can move between shards, repeat the verification with c_listallplayers() on the relevant shard rather than assuming one console’s numbering applies everywhere.
Because shard handling is not established by an official command reference, make a backup and test with a disposable world or a volunteer account first. If the command affects one shard but not another, stop rather than issuing commands against guessed indices; verify the active shard and connected-player list with the server operator.
Other methods and why they are uncertain
Celestial Portal route
One guide describes an in-game route: place Portal Paraphernalia on the Florid Postern to create a Celestial Portal, then offer a Moon Rock Idol to return to character select. This route is not corroborated by multiple sources in the available evidence, so treat it as an unverified alternative rather than the standard server-administration method. It also requires the player to reach and use the necessary in-game objects before changing characters.
The portal route carries the same practical inventory concern: do not attempt it while the player is carrying items that must be kept. If you test it, use a backup and confirm the result on your specific build.
c_swapcharacter
c_swapcharacter appears in a command reference for the original Don’t Starve, where a save-and-quit is required for the change to apply. No source in the available evidence confirms that this command works on a Don’t Starve Together dedicated server. Do not rely on it for DST character changes; use the despawn procedure unless you have independently verified the command on your exact server build.
A safe operating checklist
- Make a fresh world backup.
- Tell the player that despawning removes carried items.
- Have the player drop everything and verify the ground pile.
- Run
c_listallplayers()in the correct server or shard console. - Match the target’s name and console number.
- Use
c_despawn(AllPlayers[n])with the number in brackets. - For the host’s own character, use
c_despawn(ThePlayer). - Keep the console open long enough to confirm the player reaches character select.
- If anything behaves unexpectedly, stop and restore the backup instead of trying multiple unverified commands.
Bottom line for server administrators
For another player, the practical command is c_listallplayers() followed by c_despawn(AllPlayers[n]). Use the number from the console list, run it with administrator access, and remove the player’s inventory first. For yourself as host, use c_despawn(ThePlayer). Since this procedure is community-verified rather than officially documented by Klei, back up the world and validate it on the server’s current build, especially when caves or multiple shards are enabled.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Quick 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.




