遊戲庫

用 Universal Modder 改 Terraria(泰拉瑞亞)

Universal Modder 就是從 Terraria 起步的。它的第一個完整示例 Fal Arsenal 加入了追蹤導彈發射器、能把世界炸出大坑的戰術核彈、鏈式閃電步槍、黑洞槍、三種新敵人和一個兩階段的無人機母艦 Boss,所有精靈圖都由 fal 生成。

更新於 2026-10-10

實戰筆記3
可用 / 已釋出2
引擎.NET / XNA / FNA
路線Mod 載入器 API, 反編譯 / 重編譯

Universal Modder 如何處理 Terraria

Terraria 執行在 .NET(XNA/FNA)上,所以路線是 tModLoader:Terraria 擁有者可在 Steam 上免費獲取。Agent 用 ILSpy 反編譯,弄清原版物品、彈幕和 NPC 的工作方式,編寫 C# Mod 類,並在一個可丟棄的世界裡驗證。精靈圖來自 fal,再用 um sprite 摳圖並縮放到 Terraria 的精確尺寸。

載入器 / 工具用途
tModLoader社群官方載入器,Terraria 擁有者可在 Steam 上免費獲取。

Agent 用到的工具: tModLoader 2026.08.3.0 · melee-pc (PC port of doldecomp/melee) · mingw-w64 GCC 13 (posix) in WSL Ubuntu 24.04 · CMake 3.28 + Ninja · Slippi Dolphin 3.6.4 · libmelee 0.47.3 · DolphinTool · HSDRaw (HSDLib) · FNA 23.10 · own PowerPC disassembler and interpreter · own read-only Dolphin RAM reader · Grok · ilspycmd · numpy · numba · PufferLib 3

可用的版本: Terraria 1.4.4.9 on tModLoader 2026.08.3.0 (Steam, Windows 11, .NET 8, FNA 23.10); guest: Super Smash Bros. Melee NTSC-U 1.02 (GALE01, revision 2) with Slippi's $Required codes, minus UCF | Terraria 1.4.5.8 (decompiled), tModLoader 1.4.4.9 base for the in-game agent | Terraria 1.4.4.9 via tModLoader 2026.07 (GitHub build), Steam; vanilla 1.4.5.8 decompiled for reference

在 GitHub 閱讀引擎手冊 →

開始一次 Terraria 會話

終端
um kb search "Terraria"
um scan "Terraria"
提示詞
給 Terraria 做個 Mod:加一個追蹤導彈發射器和一顆能把世界炸出大坑的戰術核彈。精靈圖用 fal 生成。
提示詞
給 Terraria 加一把迴旋鏢:在敵人之間彈跳四次後返回。

Terraria 實戰筆記(3)

摘要和踩坑記錄以英文原文引自 universal-modder 的 MIT 授權知識庫,每條都連結到完整筆記。

進行中反編譯 / 重編譯.NET / XNA / FNA

Super Smash Bros. Melee's decompiled engine inside Terraria: a native DLL under tModLoader, 3D fighters, its engine replayed bit-exact against Slippi Dolphin recordings

The Melee decompilation's PC port (`melee-pc`) is built as a headless x64 DLL with a small C API and loaded by P/Invoke into tModLoader. Melee's own code moves the fighters, one engine frame per Terraria tick, and Terraria draws them as 3D models, lit by the world. In a headless bench all 26 fighters replay their real-Melee recordings bit for bit (29…

版本
Terraria 1.4.4.9 on tModLoader 2026.08.3.0 (Steam, Windows 11, .NET 8, FNA 23.10); guest: Super Smash Bros. Melee NTSC-U 1.02 (GALE01, revision 2) with Slippi's $Required codes, minus UCF
反作弊
none. Terraria single player in a separate lab save folder; Melee runs only offline, in a lab copy of Slippi Dolphin used as the oracle, never on Slippi online or netplay
製作者
Claude Code and agents, Grok
日期
2026-10-10
記錄了 8 個坑
  • The user had been playing the old engine all along.
  • No pad button did anything.
  • On slopes the model squashed and popped back.
  • Fighters landed on Final Destination's ledge vertex instead of being pushed off it.
  • 10 of 116 beats (grabs and pushes) diverged in Terraria.
  • The first beats of every recording were lost and the whole truth shifted.
  • The truth wasn't vanilla Melee.
  • Slippi and libmelee plumbing.
在 GitHub 閱讀完整筆記 →
可用Mod 載入器 API.NET / XNA / FNA

An RL agent that beats the Eye of Cthulhu: decompiled boss AI to a simulator, then back into the real game

The Eye of Cthulhu fight was ported from Terraria's decompiled source into a vectorized simulator: boss AI, servants, player physics, gun and damage rules. A PufferLib PPO agent trained in it (99.7% win rate in the sim), and the policy was exported to C# and runs inside the real game through a tModLoader mod. Real traces were replayed against the sim…

版本
Terraria 1.4.5.8 (decompiled), tModLoader 1.4.4.9 base for the in-game agent
反作弊
none (single player)
製作者
Claude Code (Opus 5.5)
日期
2026-09-28
記錄了 6 個坑
  • Trace replay disagreed on every dash.
  • The numba sim slowly diverged from the numpy one.
  • The player moved faster in the real game than in the sim.
  • PufferLib 3.0.0's sdist wouldn't build.
  • Serverless training failed to start.
  • Recording from inside the mod leaked memory.
在 GitHub 閱讀完整筆記 →
可用Mod 載入器 API.NET / XNA / FNA

Fal Arsenal: missiles, a tactical nuke, new enemies and a boss for Terraria

Five weapons (homing missile launcher, a tactical nuke that craters the world, a chain-lightning rifle, a black-hole gun, an orbital strike), three new enemies and a two-phase Drone Mothership boss. All sprites were generated with fal. It's built as a tModLoader mod, tested in game, and recorded for an X video that got ~400k views. Code:…

版本
Terraria 1.4.4.9 via tModLoader 2026.07 (GitHub build), Steam; vanilla 1.4.5.8 decompiled for reference
反作弊
none (single player)
製作者
Claude Code (Opus 5.5)
日期
2026-09-28
記錄了 7 個坑
  • Recording from inside the game leaked 17 GB of memory in one take.
  • SDL_AUDIODRIVER=disk recorded nothing.
  • The recording's tail was lost.
  • Takes stopped matching.
  • tModLoader refuses to start.
  • The agent killed its own shell.
  • Sprites came out with grey fringes or a floor shadow.
在 GitHub 閱讀完整筆記 →

其他遊戲筆記中的 Terraria

可用Mod 載入器 APINative C++

The Binding of Isaac: Rebirth

Binding of Terraria: Terraria bosses, weapons, minions and a hotbar inside Isaac Repentance+

A vanilla Isaac Lua mod (no native hooks) that swaps every Isaac boss, story bosses included, for one of sixteen Terraria bosses at spawn time (custom themed boss rooms, versus screens and completion marks to match), puts 21 Terraria weapons and 12 summon staffs into the item pools with a 1-0 hotbar that replaces tears, and runs Terraria sprites and…

版本
Repentance+ v1.9.7.17.J460 (Steam, Windows 11); Terraria 1.4.5.8 (Steam) as the asset source
反作弊
none
製作者
Claude Code (Fable 5.1)
日期
2026-10-11
記錄了 8 個坑
  • Boss spawns, health bar shows, nothing drawn, no log line.
  • Still invisible after the path fix.
  • Sprite:HasAnimation is nil.
  • Console luamod and clearcache close the console
  • Console key on a UK keyboard is VK 0xDF (OEM_8)
  • MC_EXECUTE_CMD never fired for us on Repentance+ (v1.9.7.17).
  • Launching isaac-ng.exe directly with --luadebug blocks every later Steam launch.
  • Automation without --luadebug.
在 GitHub 閱讀完整筆記 →

常見問題

Terraria 適合作為 Universal Modder 的第一個遊戲嗎?

適合。tModLoader 很成熟,程式碼是易讀的 .NET,儲存庫裡還有一個完整示例可以學習。

Universal Modder 能改 Terraria 嗎?

能。Universal Modder 知識庫裡有 3 篇 Terraria 的實戰筆記,其中 2 篇(共 3 篇)標為可用或已釋出。用過的路線:Mod 載入器 API, 反編譯 / 重編譯。

哪些 AI Agent 改過 Terraria?

Claude Code, Claude Code and agents, Grok。Universal Modder 在 Claude Code、Codex、Cursor、Gemini CLI、Copilot 和 OpenCode 中的用法都一樣。

用 AI Agent 改 Terraria 安全嗎?

只在單機、離線模式或你自己架設的伺服器裡玩,先備份存檔(Agent 會執行 um backup),絕不釋出遊戲檔案。這個遊戲記錄的反作弊情況:none. Terraria single player in a separate lab save folder; Melee runs only offline, in a lab copy of Slippi Dolphin used as the oracle, never on Slippi online or netplay; none (single player)。