The field guide / Universal Modder
Mod Terraria with AI: tModLoader content and a boss agent
Last updated:
Two working contributor reports use the tModLoader route for single-player Terraria. They describe different projects and verification methods; neither has been tested by this site.
Fal Arsenal: weapons, enemies and a boss
Fal Arsenal added weapons, enemies and a Drone Mothership boss through tModLoader C# content classes. The note records Terraria 1.4.4.9 via tModLoader 2026.07 (GitHub build) on Steam, Windows, and vanilla 1.4.5.8 as reference material. Its tools include ilspycmd, fal (flux/dev), um sprite, ffmpeg gfxcapture and ProcLoopback. Sprites were generated with fal. Source: fal-arsenal-tmodloader.md.
The contributor reports in-game screenshots and load logs, reproducible showcase scenes and successful command-line builds. In-game Build + Reload was not re-run for the ported example. The destructive showcase changed the world, so restoring a pristine world between takes was necessary. Source: fal-arsenal-tmodloader.md.
The README Terraria prompt asks for the launcher, world-cratering weapon and fal sprites; it is an attributed starting example rather than a guarantee. Source: README Try it.
tModLoader refuses to start.
Symptom → cause → reported fix: the tModLoader app was not in the Steam library. Adding the app resolved the ownership check; this guide offers no substitute for that requirement. Source: fal-arsenal-tmodloader.md.
Recording from inside the game leaked 17 GB of memory in one take.
Symptom → cause → reported fix: repeated D3D11 backbuffer reads allocated staging textures. Capture the game window externally instead. Missing recording audio had a separate cause: Windows FAudio used WASAPI directly, so the note used process-loopback capture. Source: fal-arsenal-tmodloader.md.
Eye of Cthulhu reinforcement-learning agent
The contributor rebuilt one boss fight as a simulator, trained a policy, then ran it as C# through a tModLoader mod. This is a single-player agent. The report compares Terraria 1.4.5.8 reference code with tModLoader’s 1.4.4.9 base. It names ilspycmd, numpy, numba, PufferLib 3.0.0, PyTorch, Python 3.12 and fal serverless training. Verification used real-game fights and frame-by-frame trace replay; the simulator’s win rate is not a measured real-game win rate. Expert mode, other bosses and the unevaluated LLM coach remain open. Source: eye-of-cthulhu-rl-agent.md.
Trace replay disagreed on every dash.
Symptom → cause → reported fix: the simulator applied each recorded action a frame early. Align actions with the following frame. Separate drift between simulators needed float32 literals; faster movement in the game came from a sunflower buff and was resolved by blocking that buff in the arena. Source: eye-of-cthulhu-rl-agent.md.
Serverless training failed to start.
Symptom → cause → reported fix: the model-API key lacked serverless permissions. The contributor used the approved device-flow login. This is not the same as setting FAL_KEY for model calls; the note supplies the training-specific context. Source: eye-of-cthulhu-rl-agent.md.
How to start your own mod
Install Universal Modder, then use the engine-research template with your owned Terraria installation and exact version. Back up saves and configuration before changes; keep gameplay work single-player and use a separate test save. Adapt the item or weapon template for one small slice, then ask for an observable in-game test and a record of what remains unverified. These are planning templates, not promises that the reported mod will work on another setup. Source: README rules and Try it.
Read merge games with AI before choosing a port or simulation, and use troubleshooting to compare the exact symptom with a named report.
Frequently asked questions
What route do these Terraria projects use?
Both reports use tModLoader for the in-game mod. Fal Arsenal adds C# content; the boss agent runs a policy trained in a simulator.
Is the Terraria RL agent single-player?
Yes. The note identifies it as a single-player project. This guide covers only that scope.
Does a successful build prove the mod works in game?
No. The reports also use load logs, screenshots, real fights and trace replay. The ported Fal Arsenal example's in-game Build + Reload was not re-run.
Can I assume the reported versions work on my installation?
No. Check your game and loader versions against the named notes, use backups and a test world, and verify one small change first.