Debug commands

From Terraria Wiki
Jump to navigation Jump to search
Desktop version
Desktop-Only Content: This information applies only to the Desktop version of Terraria.

Debug commands are commands used for testing and debugging certain Terraria features. It is initially disabled, and requires modifying Terraria's program to enable it.[1]

When debug commands are enabled, pressing F5 during world generation enters the Debug world generation.[2]

List

Information taken from the Desktop version Desktop 1.4.5.4 source code, class ToolkitDebugCommands in Terraria.Testing.ChatCommands.cs. There may be inaccuracies, as the current Desktop version Desktop version is 1.4.5.6.

Command Usage Requirement Description Response[a] Error response[b] Notes
hh/hhClientOpens a list of all the debug commandsn/an/aOpens the debug command list UI.
Clicking a command in the list automatically inputs it into chat.
memo/memo <custom-command-name>ClientCreates a shortcut command with a given name. Opens the file to write in. One command per line. Accepts arg substitions ({0}, {1}, etc)n/an/aOpens the corresponding .txt file.
File is stored at Windows %USERPROFILE%\Documents\My Games\Terraria\MemoCommands.
memonum/memonum <0-9>ClientCreates a memo for a numpad key (0-9). Shorthand for /memo numpad{i}n/aInvalid numpad key numberOpens the corresponding .txt file.
File is stored at Windows %USERPROFILE%\Documents\My Games\Terraria\MemoCommands.
setserverping/setserverping <ms>Multiplayer RPCSets a target ping for all players on the server. Clients will automatically adjust /latency to achieve it.Target ping set {0}msn/aValid ping: 1–9999ms (inclusive)
latency/latency <ms>Multiplayer clientAdds latency to incoming and outgoing packets sent by this client.Latency set to {0}msn/a
setdrawwait/setdrawwait <delay in ms>ClientSets a fixed waiting period to occur during each engine draw call.Draw wait time set to {0}msn/aValid delay: 1–99ms (inclusive)
setupdatewait/setupdatewait <delay in ms>ClientSets a fixed waiting period to occur during each engine update call.Update wait time set to {0}msn/aValid delay: 1–99ms (inclusive)
toggleinactivewait/toggleinactivewaitClientToggles main thread sleeping when window is unfocused (this setting is saved).Inactive CPU throttling enabled
Inactive CPU throttling disabled
n/a
quickload/quickload [stop]ClientAutomatically rejoin this world/server with this player whenever the game is launched. Executes /onquickload memo when joining the world. Will relaunch all local clients when used with Host & PlayQuick Load configuration set. Hold shift while loading to clear it.
Quick Load configuration cleared.
n/aAccepts stop, disable, clear, cancel, or exit as parameter for clearing configuration.
quickload-regen/quickload-regenSingleplayerAutomatically regenerate this world whenever the game is launched. Executes /onquickload memo when joining the worldQuick Load configuration set. Hold shift while loading to clear it.n/a
light/lightClientToggles the lighting system between active and fullbright.Lighting enabled
Lighting disabled
n/a
nolimits/nolimitsClientNo border restrictionsNo limits enabled
No limits disabled
n/a
save/saveClientSave the player (and the world if single player)Player and world saved!
Player saved!
n/a
reload/reloadSingleplayerReloads the last saveReloaded in {0}msn/a
quit/quitClientExit world without savingn/a
reloadpacks/reloadpacksClientReloads resource packs.Resource Packs Reloaded.n/a
frame/frameClientResets all frame dataWorld frame data clearedn/a
hash/hashAny authorityPrints out the hash of all saved (non-volatile) tile dataTile data hash: {0:X8}n/a
snapshot/snapshotAny authorityCreates a snapshot of the current tile state for the world.Tile Snapshot Created.n/a
snapclear/snapclearAny authorityClears previously created snapshot.Tile Snapshot Cleared.n/a
snapsave/snapsave <name>Any authoritySaves a snapshot in dev-snapshots.Tile Snapshot Saved to dev-snapshots/<name>.gensnapshotSnapshot name requiredFile is stored at Windows %USERPROFILE%\Documents\My Games\Terraria\dev-snapshots
snapload/snapsave <name>Any authorityLoads a snapshot in dev-snapshots.Tile Snapshot Loaded. Use /swap or /restore to apply.Snapshot name required
File not found: dev-snapshots/<name>.gensnapshot
restore/restoreAny authorityRestores the world's tiles to the previously created snapshot.Tile snapshot restored in {0}msNo snapshot to restore
Tile snapshot does not match current world size
swap/swapAny authoritySwaps the world's tiles with the previously created snapshot.Tile snapshot swapped in {0}msNo snapshot to restore
Tile snapshot does not match current world size
snapshotdiff/snapshotdiffSingleplayerFinds differences between the current map and saved snapshot. Use /next to skip through them.n/aNo snapshot to compare
Tile snapshot does not match current world size
Addes a Map Ping on minimap at found tile.
find/find <tile id>ClientIterates through all instances of a tile in the world. Use /next to skip through themTile <Tile name> found at {X:<x>, Y:<y>}
Tile <Tile name> scan complete.
n/a
findwall/findwall <wall id>ClientIterates through all instances of a wall in the world. Use /next to skip through themWall #<wall id> found at {X:<x>, Y:<y>}
Wall #<wall id> scan complete.
n/a
next/nextClientFinds the next instance of a tile/wall/object. Requires calling /find, /findwall or /snapshotdiff first(See /find, /findwall, or /snapshotdiff)Scan not started. Nothing to find.
showsections/showsectionsClientToggles net section overlay.n/an/aDraws net section (world "chunks") as rectangular areas in world and on minimap.
nopause/nopauseSingleplayerMakes the game not pause when focus is lostPause on focus loss enabled
Pause on focus loss disabled
n/a
map/map [pretty]ClientReveals the full map for the world.n/an/aDraws each minimap tile at full brightness by default.
If with pretty parameter, tiles are drawn at reduced brightness if there is wall at the tile, if the tile is below surface, or if the tile is surrounded by other tiles.[3]
clearmap/clearmapClientDeletes the full map for the world.n/an/aResets the player's minimap to fully dark.
hideall/hideallClientStops tiles, walls, and water from drawingEverything is hidden
Everything is shown
n/aOnly leaves entities and background visible.
hidetiles/hidetilesClientStops tiles from drawing on the screenTiles are hidden
Tiles are shown
n/a
hidetiles2/hidetiles2ClientStops non-solid tiles from drawing on the screenSecondary tiles are hidden
Secondary tiles are shown
n/a
hidewalls/hidewallsClientStops walls from drawing on the screenWalls are hidden
Walls are shown
n/a
hidewater/hidewaterClientStops water from drawing on the screenWater is hidden
Water is shown
n/aToggles the drawing of all liquids.
showunbreakablewalls/showunbreakablewallsClientForces unbreakable walls to be visible even when covered by tilesUnbreakable walls are shown
Unbreakable walls are hidden
n/aOnly affects the drawing of the unobtainable Unbreakable Wall.
showlinks/showlinksClientDraws gamepad link points as an interface overlayGamepad link points are shown
Gamepad link points are hidden
n/a
shownetoffset/shownetoffsetClientDraws dust for debugging netOffsetnetOffset dust shown
netOffset dust hidden
n/a
fakenetoffset/fakenetoffset <dx> <dy>ClientSets the netOffset for all entities to a given value (in pixels).netOffset set to (<x>, <y>)n/a
nodamagevar/nodamagevarClientRemoves damage variation (the inherent +/- 15% from damage). Useful for gathering specific data on true damage.No Damage Vars: On
No Damage Vars: Off
n/a
hurtdummies/hurtdummiesClientAllows projectiles to aim at target dummies.Aim At Dummies: Enabled
Aim At Dummies: Disabled
n/aAllows homing projectiles, minions, and sentries to target the Target Dummy.
practice/practiceSingleplayerToggles practice mode, which resets boss fights when you would take lethal damage.Practice Mode enabled
Practice Mode disabled
n/aTriggered when the player dies if any boss are alive or hostile events are active. It has the following effects:[4]
  • Resets the player to maximum health.
  • Clears all debuffs inflicted to the player, except debuffs not removed by the Nurse.
  • Makes the player immune to all remaining debuffs after clearing.
  • Removes all existing hostile projectiles.
  • Removes all active enemies.
  • Outputs a message in chat: "Lethal damage dealt by <damage source>" (unknown source if cannot find a source).
showdebug/showdebugMultiplayer RPC
or
Local server
Toggles command reporting.Command reporting enabled
Command reporting disabled
/showdebug can only be toggled by the host or server console.

References

  1. Information taken from the Desktop version Desktop 1.4.5.5 source code, field enableDebugCommands in Terraria.Testing.DebugOptions.cs. There may be inaccuracies, as the current Desktop version Desktop version is 1.4.5.6.
  2. Information taken from the Desktop version Desktop 1.4.5.5 source code, method Update() in Terraria.GameContent.UI.States.UIWorldLoad.cs. There may be inaccuracies, as the current Desktop version Desktop version is 1.4.5.6.
  3. Information taken from the Desktop version Desktop 1.4.5.4 source code, method UnlockMapTilePretty() in Terraria.Map.WorldMap.cs. There may be inaccuracies, as the current Desktop version Desktop version is 1.4.5.6.
  4. Information taken from the Desktop version Desktop 1.4.5.4 source code, method PracticeModeReset() in Terraria.Testing.DebugUtils.cs. There may be inaccuracies, as the current Desktop version Desktop version is 1.4.5.6.
  1. Command response with valid input.
  2. Command response with invalid input.