The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
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.
On a Don’t Starve Together server, an administrator can send a player back to character selection with c_despawn(AllPlayers[n]). First run c_listallplayers() to identify the player number, and have that player drop every item because despawning removes the character’s inventory. The command is community-verified rather than documented by Klei, so test it on a backed-up copy and confirm it works on your current build.
Use the server console to repick a character
The most consistently reported DST method is to despawn the player from the server console. Despawning does not permanently delete the world or ban the player. It returns that player to the character-selection screen, where they can choose a different survivor and rejoin.
The complete command sequence is:
- Back up the world and, if the server uses shards, identify every shard that is running.
- Ask the affected player to move and drop all items they are carrying.
- As an administrator, run
c_listallplayers(). - Find the player’s number in the console output.
- Run
c_despawn(AllPlayers[n]), replacingnwith that number. - Have the player choose a new character and reconnect if necessary.
For example, if the console lists a player as number 2, enter c_despawn(AllPlayers[2]). Do not type the player’s name in place of the number unless your current build explicitly documents a different syntax.
Why the player must drop items first
According to the community reports describing this command, despawning removes the player’s carried items. That can include tools, weapons, food, armor, equipped clothing and items in personal containers. Ask the player to place everything in a chest, backpack on the ground or another agreed storage location before you run the command. If the character is in danger, move them to a safe location first so the dropped items are not destroyed by monsters, fire, seasonal effects or a rollback.
#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.
World structures and storage that have already been placed in the world are not the same as the player’s carried inventory. Nevertheless, a backup is prudent because console commands can behave differently after game updates, mods or shard configuration changes.
Step-by-step procedure for a dedicated server
1. Make a recoverable backup
Stop or pause the server using the control panel or service procedure supplied by your host, then copy the world save before changing the character. If your host provides automatic snapshots, create a manual snapshot with a recognizable date and time. A backup lets you restore the previous state if the command fails, removes more than expected or interacts badly with a mod.
Recommended Free Tools
2. Prepare the player
Tell the player exactly what will happen: they will leave the current character and return to character selection, and anything still in that character’s inventory may be lost. Have them empty their inventory and equipment slots, then verify that the items are visible in the world or in a chest. Do not rely on the scoreboard position to identify the player.
3. Open an administrator console
Use the dedicated server console, host control panel console or administrator command interface that your server provider exposes. The account issuing the command must have administrator privileges. A normal connected player generally cannot execute server console commands simply by opening the in-game chat box.
4. List players and characters
Run:
c_listallplayers()
The reported output includes each connected player’s number, name and current character. Match the name and character shown in the output to the person who requested the change. Use this console-generated number even when a scoreboard or lobby display shows a different order; community reports note that those numbers do not always correspond.
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.
5. Despawn the selected player
Insert the number from the list into this command:
c_despawn(AllPlayers[n])
For player number 2, the command is:
c_despawn(AllPlayers[2])
Keep the parentheses and square brackets exactly as shown. A missing pair of parentheses has been associated with Lua errors in older reports.
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 problems6. Let the player choose again
The player should be returned to character selection. They can select an available character and load back into the world. If the client remains at a loading screen, have the player leave and reconnect after the server confirms that the despawn completed. Do not issue the command repeatedly while the first request is still processing.
Changing the host’s own character
If you are the host or the player represented by the server’s ThePlayer object, the reported self-despawn form is:
c_despawn(ThePlayer)
Use the same preparation: put your inventory and equipment into world storage, make a backup, and ensure no dangerous event is about to destroy the dropped items. The host command does not require looking up another player’s index, but it still requires an administrator-capable console.
What to do when the command does not work
The console says the command is unknown
- Confirm that you are connected to the DST server console, not a console for the base game Don’t Starve.
- Check that you have administrator privileges and that command execution is enabled by the host.
- Verify spelling, capitalization and punctuation:
c_despawnhas an underscore, and the player reference uses square brackets. - Test on the current server build with a backup available. The procedure is based on community reports, not a current Klei command reference.
The wrong player is selected
Run c_listallplayers() immediately before despawning and match the displayed name and character. Do not infer the index from join order, the Steam lobby list or the scoreboard. If two players have similar names, ask the target player to change character or position briefly so you can confirm the identity in the console output.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.
You see an “input” variable or Lua error
A Klei bug-tracker discussion described an older failure in which c_despawn could fail because an input variable was undefined when a string or number was supplied. The discussion was reportedly marked fixed in 2021, with a later hotfix carrying the fix. If a current server still produces that error, record the exact game build, disable nonessential command-related mods for a test, restart from the backup and check whether the host has applied current updates. Do not improvise alternate argument formats on the live world without a rollback plan.
The command produced a syntax error
Older forum replies attributed some failures to omitted parentheses. Use the literal forms c_listallplayers(), c_despawn(AllPlayers[2]) or c_despawn(ThePlayer). Replace only the index number; do not remove the brackets or parentheses.
The player does not return to character selection
- Check the console for an error instead of issuing the command again.
- Ask the player to disconnect and reconnect only after the server has finished processing the command.
- Review the backup and server log if the character appears dead, stuck or unchanged.
- In a multi-shard installation, repeat the administrative check on the shard where the player is currently active.
Caves and multi-shard worlds
Community guidance says that caves and other shards may need to be handled separately, but this has not been confirmed by a primary Klei source. A player can be connected through one shard while the administrator is viewing another shard’s console. If the command appears ineffective in a cluster, identify the player’s active shard and run the player listing there. Treat each shard as a separate test environment, and keep the backup from before the change.
Because shard behavior is not established in the available official documentation, do not promise players that one command issued on the master shard will repick a character located in caves. Verify the result in the affected shard before restoring the player’s items.
Command method versus an in-game portal
One guide describes an in-game alternative: place Portal Paraphernalia on the Florid Postern to create a Celestial Portal, then offer a Moon Rock Idol to return to character selection. This route is reported by a single, unverified guide and is not confirmed as a reliable DST server procedure. It also requires the player to obtain the necessary world items and reach the portal safely.
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
| Method | What is established | Requirements | Main risk or limitation |
|---|---|---|---|
c_despawn(AllPlayers[n]) |
Multiple community reports describe it as the direct way to return a player to character selection. | Administrator access to the server console, the player number from c_listallplayers(), and a compatible build. |
Items carried by the player are removed unless dropped first; syntax and shard behavior can vary by build. |
c_despawn(ThePlayer) |
Reported form for despawning yourself as the host. | Host/admin console access and the same inventory precautions. | It is still a community procedure and can leave the host waiting for a reconnect. |
| Celestial Portal route | Described in one guide, without primary confirmation. | Portal Paraphernalia, a Florid Postern, a Moon Rock Idol and safe access to the portal. | Slow, item-dependent and not verified as a dependable dedicated-server method. |
c_swapcharacter |
Listed in a base-game Don’t Starve command reference. | Base-game command behavior and a save-and-quit cycle according to that reference. | No source confirms that it works on DST dedicated servers; do not rely on it for this task. |
Why c_swapcharacter is not the recommended DST solution
Some command lists show c_swapcharacter, but the cited reference concerns the original single-player Don’t Starve, not a DST dedicated server. That reference also says a save-and-quit is needed before the change applies. No available source confirms that the command handles connected players, inventories or shards in DST. Using it because it appears in a generic command list can produce an error or no visible change, so use the DST-specific despawn procedure instead.
Safe operating checklist
- Backup: Save the world before any console command.
- Authority: Confirm the console session has administrator rights.
- Inventory: Have the target player drop carried and equipped items.
- Identity: Obtain the index from
c_listallplayers(), not the scoreboard. - Syntax: Preserve the parentheses, brackets and underscore.
- Build: Test on the server’s actual current version, especially after an update.
- Mods: Consider a controlled test without nonessential mods if the command throws a Lua error.
- Shards: Locate the player’s active shard in a caves or cluster setup.
- Verification: Wait for the player-selection screen before restoring stored items.
Frequently encountered scenarios
A player chose the wrong character immediately after joining
Pause activity, move the player to safety, store their items, list players, and despawn the matching index. This is the cleanest use of the command because the player is present and easy to identify.
A player is offline when the administrator wants to change them
The reported command targets a connected player object such as AllPlayers[n]. There is no confirmed procedure in the available sources for changing an offline player’s character by editing the save. Wait until the player is connected, then identify them with the console listing.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →The player is dead or waiting at the respawn screen
Do not assume the scoreboard number is still valid. Run c_listallplayers() and use the current console output. If the player object is not listed, reconnecting may be necessary before the command can target it.
The player wants to keep the inventory
The documented community procedure does not provide an inventory-transfer safeguard. Move the items into world storage before despawning. If that is impossible because the player is disconnected, trapped or the server is unstable, restore the backup rather than experimenting on the only copy of the world.
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.
How to verify that the change succeeded
- Confirm that the original player is no longer controlling the old character.
- Ask the player to select the intended survivor.
- Wait until the new character appears in the world and can move.
- Check that the stored items remain where the player left them.
- In a shard cluster, confirm the player appears on the intended shard rather than only in the master console.
If any step fails, stop issuing commands, preserve the server log and use the pre-change backup. Since the command is community-verified rather than Klei-verified, the exact result can depend on the current game build, server configuration and mods.
Frequently Asked Questions
Can I change another player’s character without restarting the server?
Yes. An administrator can normally use c_listallplayers() followed by c_despawn(AllPlayers[n]); a full server restart is not part of the reported procedure.
Will the player keep items after using c_despawn?
No. Have the player drop carried and equipped items into world storage first, because despawning removes the inventory.
Which number should I use in AllPlayers[n]?
Use the number printed beside the player by c_listallplayers(). Do not substitute a scoreboard or join-order number.
Is this an official Klei-supported command?
No official Klei documentation confirming this DST procedure was found. It is supported by community reports, so test it on a backup and on your current build.
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.

