调试命令
泰拉瑞亚本体
中文
rev 256755
调试命令是用来测试和调试各种《泰拉瑞亚》功能的命令。它初始是禁用的,需要修改《泰拉瑞亚》的程序来开启它。
若开启了调试命令,在世界生成期间按下 F5 会进入调试世界生成。
调试命令文本无法通过资源包进行本地化,因为它们是硬编码在源代码中的。
列表
信息来自
电脑版 1.4.5.8 源代码,Terraria.Testing.ChatCommands.cs 中的 ToolkitDebugCommands 类。
| 命令 | 用途 | 需求 | 描述 | 回复 | 错误回复 | 备注 |
|---|---|---|---|---|---|---|
hh | /hh | 客户端 | 打开包含所有 调试命令的列表 | 无 | 无 | 打开调试命令列表界面。 点击列表中的命令会自动将其输入到聊天中。 |
memo | /memo <自定义命令名称> | 客户端 | 用给定名称创建快捷命令。打开文件以写入,每行一个命令。可接受参数替代({0}、{1},等等) | 无 | 无 | 打开对应的 .txt 文件。 文件存储在 %USERPROFILE%\Documents\My Games\Terraria\MemoCommands。 |
memonum | /memonum <0-9> | 客户端 | 为一个小键盘按键(0-9)创建 memo。/memo numpad{i} 的简写。 | 无 | Invalid numpad key number | 打开对应的 .txt 文件。 文件存储在 %USERPROFILE%\Documents\My Games\Terraria\MemoCommands。 |
setserverping | /setserverping <毫秒> | 多人模式远程过程调用 | 为服务器中所有玩家设置目标延迟。客户端会自动调整 /latency 以达成这一点。 | Target ping set {0}ms | 无 | 有效延迟:1–9999 毫秒(闭区间) |
latency | /latency <毫秒> | 多人模式客户端 | 为此客户端发送和接收的数据包增加延迟。 | Latency set to {0}ms | 无 | |
setdrawwait | /setdrawwait <毫秒延迟> | 客户端 | 在每次引擎绘制调用期间设置固定的等待时间。 | Draw wait time set to {0}ms | 无 | 有效延迟:1–99 毫秒(闭区间) |
setupdatewait | /setupdatewait <毫秒延迟> | 客户端 | 在每次引擎更新调用期间设置固定的等待时间。 | Update wait time set to {0}ms | 无 | 有效延迟:1–99 毫秒(闭区间) |
toggleinactivewait | /toggleinactivewait | 客户端 | 切换窗口失去焦点时主线程休眠的开关(该设置会被保留)。 | Inactive CPU throttling enabled Inactive CPU throttling disabled | 无 | |
togglecore0pinning | /togglecore0pinning | 客户端 | 切换游戏线程是否固定在(CPU)0 号核心(该设置会被保存)。 | Core 0 pinning enabled Core 0 pinning disabled | Only supported on windows | 仅可在 游戏主线程默认被固定在 CPU 0 号核心。此命令会将其取消固定,允许主线程在所有核心上运行。 |
quickload | /quickload [stop] | 客户端 | 在游戏启动时自动用当前玩家重新加入当前世界/服务器。加入世界时会执行 /onquickload memo。在开服并开始游戏(Host & Play)中使用时,会重启所有本地客户端。 | Quick Load configuration set. Hold shift while loading to clear it. Quick Load configuration cleared. | 无 | 接受 stop、disable、clear、cancel、或 exit 作为清除配置的参数。 |
quickload-regen | /quickload-regen | 单人模式 | 在游戏启动时自动重新生成当前世界。加入世界时会执行 /onquickload memo。 | Quick Load configuration set. Hold shift while loading to clear it. | 无 | |
light | /light | 客户端 | 使光照系统在激活和完全点亮之间切换。 | Lighting enabled Lighting disabled | 无 | |
nolimits | /nolimits | 客户端 | 没有边界限制 | No limits enabled No limits disabled | 无 | |
save | /save | 客户端 | 保存玩家(若在单人模式下还会保存世界)。 | Player and world saved! Player saved! | 无 | |
reload | /reload | 单人模式 | 读取上个存档。 | Reloaded in {0}ms | 无 | |
quit | /quit | 客户端 | 退出世界但不保存。 | 无 | ||
reloadpacks | /reloadpacks | 客户端 | 重新加载资源包。 | Resource Packs Reloaded. | 无 | |
frame | /frame | 客户端 | 重置所有框架(frame)数据。 | World frame data cleared | 无 | |
hash | /hash | 任何授权 | 输出所有已保存的(非易失)的图格数据的 hash 值。 | Tile data hash: {0:X8} | 无 | |
snapshot | /snapshot | 任何授权 | 创建一个保存世界当前图格状态的快照。 | Tile Snapshot Created. | 无 | |
snapclear | /snapclear | 任何授权 | 清除此前创建的快照。 | Tile Snapshot Cleared. | 无 | |
snapsave | /snapsave <名称> | 任何授权 | 在 dev-snapshots 中保存快照 | Tile Snapshot Saved to dev-snapshots/<name>.gensnapshot | Snapshot name required | 文件存储在 %USERPROFILE%\Documents\My Games\Terraria\dev-snapshots |
snapload | /snapsave <名称> | 任何授权 | 读取 dev-snapshots 中的一个快照。 | Tile Snapshot Loaded. Use /swap or /restore to apply. | Snapshot name required File not found: dev-snapshots/<name>.gensnapshot | |
restore | /restore | 任何授权 | 将世界的图格恢复为此前创建的快照中的状态。 | Tile snapshot restored in {0}ms | No snapshot to restore Tile snapshot does not match current world size | |
swap | /swap | 任何授权 | 将世界的图格与此前创建的快照交换。 | Tile snapshot swapped in {0}ms | No snapshot to restore Tile snapshot does not match current world size | |
snapshotdiff | /snapshotdiff | 单人模式 | 比较当前地图与保存的快照之间的差异。使用 /next 来逐个浏览。 | 无 | No snapshot to compare Tile snapshot does not match current world size | 在小地图上找到的图格处放置一个地图标记。 |
find | /find <图格 ID> | 客户端 | 遍历世界中所有特定图格的实例。使用 /next 来逐个浏览。 | Tile <图格名称> found at {X:<x>, Y:<y>} Tile <图格名称> scan complete. | 无 | |
findwall | /findwall <墙 ID> | 客户端 | 遍历世界中所有特定墙的实例。使用 /next 来逐个浏览。 | Wall #<墙 ID> found at {X:<x>, Y:<y>} Wall #<墙 ID> scan complete. | 无 | |
next | /next | 客户端 | 寻找下一个图格/墙/物体的实例。需要先使用 /find、/findwall、或 /snapshotdiff | (见 /find、/findwall、或 /snapshotdiff) | Scan not started. Nothing to find. | |
showsections | /showsections | 客户端 | 切换网络区块的覆盖显示。 | 无 | 无 | 在世界中和小地图上将网络部分(世界“区块”)绘制为长方形区域。 |
map | /map [pretty] | 客户端 | 显示世界的整个地图。 | 无 | 无 | 默认将每个小地图图格以最大亮度绘制。 如果包含 pretty 参数,图格在有墙时、位于地表以下时、或被其他图格包围时会以更低的亮度绘制。 |
clearmap | /clearmap | 客户端 | 删除世界的整个地图。 | 无 | 无 | 将玩家的小地图重置为全黑。 |
hideall | /hideall | 客户端 | 停止绘制图格、墙、和水 | Everything is hidden Everything is shown | 无 | 仅留下实体和背景可见。 |
hidetiles | /hidetiles | 客户端 | 停止在屏幕上绘制图格 | Tiles are hidden Tiles are shown | 无 | |
hidetiles2 | /hidetiles2 | 客户端 | 停止在屏幕上绘制非实心图格 | Secondary tiles are hidden Secondary tiles are shown | 无 | |
hidewalls | /hidewalls | 客户端 | 停止在屏幕上绘制墙 | Walls are hidden Walls are shown | 无 | |
= | /= | 客户端 | 重复上个命令 | 无 | 无 | |
drawhitboxes | /drawhitboxes | 客户端 | 在屏幕上绘制碰撞框 | Hitboxes are on Hitboxes are hidden | 无 | |
drawaggro | /drawaggro | 客户端 | 在屏幕上显示仇恨 | Aggro is on Aggro is hidden | 无 | |
hidewater | /hidewater | 客户端 | 停止在屏幕上绘制水 | Water is hidden Water is shown | 无 | 切换所有液体的绘制。 |
showunbreakablewalls | /showunbreakablewalls | 客户端 | 使得不可破坏的墙强制可见,即使被图格覆盖。 | Unbreakable walls are shown Unbreakable walls are hidden | 无 | 仅影响无法获取的不可破坏的墙的绘制。 |
showlinks | /showlinks | 客户端 | 以界面叠加的形式绘制游戏摇杆连接点 | Gamepad link points are shown Gamepad link points are hidden | 无 | |
forcegamepad | /forcegamepad | 客户端 | 阻止键盘和鼠标输入覆盖手柄输入状态。仍然能通过键盘使用命令和聊天 | Gamepad input forced on Gamepad input normal | 无 | |
logitemuse | /logitemuse | 客户端 | 在本地聊天中报告 Player.ApplyItem/AnimTime 调用。 | 无 | 无 | |
shownetoffset | /shownetoffset | 客户端 | 显示供 netOffset 调试使用的尘埃 | netOffset dust shown netOffset dust hidden | 无 | |
fakenetoffset | /fakenetoffset <dx> <dy> | 客户端 | 将所有实体的 netOffset 设置为给定值(单位:像素)。 | netOffset set to (<x>, <y>) | 无 | |
nodamagevar | /nodamagevar | 客户端 | 移除伤害浮动(固定的伤害 +/- 15%)。适合用来获取真正伤害的特定数据。 | No Damage Vars: On No Damage Vars: Off | 无 | |
hurtdummies | /hurtdummies | 客户端 | 允许射弹瞄准训练假人。 | Aim At Dummies: Enabled Aim At Dummies: Disabled | 无 | 允许追踪射弹、仆从、和哨兵以训练假人为目标。 |
practice | /practice | 单人模式 | 切换练习模式,该模式会在你受到致命伤害时将你返回到上个检查点 | Practice Mode enabled Practice Mode disabled | 无 | 当开启时,立即使死亡的玩家重生,并通过 /checkpoint 命令保存检查点。当玩家被杀死时,会触发 Damage breakdown: <伤害百分比>% <伤害> <伤害来源> - <受击数> hits |
expandedbossdamage | /expandedbossdamage | 单人模式 | 切换扩展的 Boss 伤害,会将各伤害分离,并按来源列出击中次数。 | Boss Damage Expanded Sources enabled Boss Damage Expanded Sources disabled | 无 | |
pauseworld | /pauseworld | 客户端 | 暂停世界更新。使用 Numpad+/End/Mouse4 以步进 | World updates paused World updates resumed | 无 | |
checkpoint | /checkpoint | 单人模式 | 保存游玩检查点 | Checkpoint saved Checkpoint saved and replay discarded Replay now starts at update <next>/<count> | Cannot create checkpoint on last frame of replay | |
return | /return | 单人模式 | 返回上个检查点 | Checkpoint loaded Replay restarted Recording restarted | Use /checkpoint or /record to create a checkpoint or start recording | |
record | /record [stop] | 单人模式 | 创建检查点,并开始记录输入 | Recording gameplay Recording restarted Nothing to cancel Replay stopped Recording stopped | Cannot record a new replay while one is playing. /replay stop to exit | |
replay | /replay [stop] | 单人模式 | 将已录制的输入捕捉循环重放 | Replaying <count> updates on loop. /replay stop to exit Replay truncated <count> -> <next> updates Nothing to cancel Replay stopped Recording stopped | Use /record to create a replay first Already at start of replay | |
notimeouts-server | /notimeouts-server | 多人模式远程过程调用 | 切换服务器端超时 | Server timeouts for inactive clients: Off Server timeouts for inactive clients: On | 无 | |
notimeouts-client | /notimeouts-client | 多人模式客户端 | 切换客户端超时 | Client timeouts for inactive server: Off Client timeouts for inactive server: On | 无 | |
showdebug | /showdebug | 多人模式远程过程调用 或 本地服务器 | 切换命令报告。 | Command reporting enabled Command reporting disabled | /showdebug can only be toggled by the host or server console. | |
randomizeprojslots | /randomizeprojslots | 任何授权 | 切换射弹栏(whoAmI)的随机化。 | Projectiles now spawn in random slots Projectiles now spawn in order | /randomizeprojslots can only be toggled by the host or server console. | |
saveloadout | /saveloadout (名字) | 客户端 | 将配装保存到配装菜单。 | Loadout saved! <名字> | Usage: /saveloadout (name) | 这和物品栏中的配装是互相独立的。
见备注章节获取配装文件示例。
将当前状态保存为命令配装。 |
loadout | /loadout (名字) | 客户端 | 创建一套配装。 | Available loadouts: <name> | 无 | 见
/saveloadout 获取命令配装的细节。若未指定 |
loadouts | /loadouts | 客户端 | 打开所有配装的列表 | 无 | 无 | 见
/saveloadout 获取命令配装的细节。打开包含所有命令配装的 UI,类似于 /loadout <配装名字>。 |
备注
命令配装示例
以下为命令配装的示例。当在如下条件下保存配装时:保存后的命令配装看上去如下:
{
"DayTime": true,
"TimeOfDay": 27000,
"SelectedItem": 2,
"Life": 100,
"LifeMax": 100,
"Mana": 20,
"ManaMax": 20,
"Minions": [
{
"ItemType": 4269,
"ItemPrefix": 85
},
{
"ItemType": 4269,
"ItemPrefix": 85
},
{
"ItemType": 4758,
}
],
"Items_Inventory": [
{ "Type": "IronPickaxe", "Stack": 1 },
{ "Index": 1, "Type": "IronBroadsword", "Prefix": 81, "Stack": 1 },
{ "Index": 2, "Type": "Wood", "Stack": 250 },
{ "Index": 3, "Type": "None" },
//...
{ "Index": 9, "Type": "None" },
{ "Index": 54, "Type": "MusketBall", "Stack": 999 },
{ "Index": 55, "Type": "EndlessQuiver", "Stack": 1 },
{ "Index": 56, "Type": "None"},
{ "Index": 57, "Type": "None"},
],
"Items_Ammo": [],
"Items_Armor": [
{ "Type": "GoldHelmet", "Stack": 1 },
{ "Index": 1, "Type": "None" },
{ "Index": 2, "Type": "None" },
{ "Index": 3, "Type": "CloudinaBalloon", "Prefix": 68, "Stack": 1 },
{ "Index": 4, "Type": "None" },
//...
{ "Index": 19, "Type": "None" }
],
"Items_Equipment": [
{ "Type": "ZephyrFish", "Stack": 1 },
{ "Index": 1, "Type": "None" },
{ "Index": 2, "Type": "None" },
{ "Index": 3, "Type": "None" },
{ "Index": 4, "Type": "AmethystHook", "Stack": 1 }
],
"Buffs": [
{ "Type": "Ironskin", "Time": 18000 },
{ "Index": 1, "Type": "Ironskin", "Time": 60 }
]
}
历史
- 电脑版 1.4.5.7:
- 添加了以下命令:
togglecore0pinning、=、drawhitboxes、drawaggro、forcegamepad、logitemuse、expandedbossdamage、pauseworld、checkpoint、return、record、replay、notimeouts-server、notimeouts-client、randomizeprojslots、saveloadout、loadout、和loadouts - 更新了
practice的行为。此前,它会在玩家在有 Boss 存活或敌对事件激活时死亡时触发以下效果: - 移除了
nopause。其功能已被窗口失去焦点时暂停设置实现。
- 添加了以下命令:
- 电脑版 1.4.5.0:引入。
参考