The field guide / Universal Modder

Mod Terraria with AI: tModLoader, Melee and Isaac

Last updated: · By Jin Song

Original abstract workshop illustration for Terraria

The original Fal Arsenal and boss-agent reports are marked working. Two further notes explore Terraria as a mashup host or guest, with different verification limits. Each result below is attributed to its contributor.

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.

Mod Terraria: add a homing missile launcher and a tactical nuke that craters the world. Make the sprites with fal.

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.

Terraria in other games, other games in Terraria

A mashup can bring a guest engine into Terraria or put Terraria content in another host. The Melee project embeds a simulation under tModLoader; Binding of Terraria implements Terraria-themed encounters through Isaac’s own Lua API. See how to merge two games with AI for route selection.

These are personal projects using owned games. Game files and ripped assets must not be redistributed, under the contribution rules. Keep converted art, audio and game-derived engines local; neither summary is an extraction guide or a download source. Back up saves and use an offline single-player test environment.

Melee inside Terraria: an embedded engine

The in-progress report builds melee-pc, a PC port of the Melee decompilation, as a native library loaded through P/Invoke into tModLoader. Melee advances its fighters once per Terraria tick; Terraria draws the converted models and supplies world lighting. Named tools include mingw-w64, CMake, Ninja, HSDRaw, Slippi Dolphin and libmelee. This is an embedded engine, rather than two full games running through a live picture bridge. Compare mashup routes. Source note.

The setup records Terraria 1.4.4.9, tModLoader 2026.08.3.0, Windows 11, .NET 8.0.0 and FNA 23.10.0.0. The guest is Melee NTSC-U 1.02, with the note’s specified lab rules; Slippi Dolphin 3.6.4 is the offline reference. Every player needs their own owned copy. Source note.

Headless replays matched recordings across all fighters; real-game drawing covered only part of the roster. A recorded match also replayed inside Terraria, but the first integrated gameplay suite found real damage-accounting and other issues as well as faulty test checks. Physical pads, another machine, hot reload and several integrated features remain unverified. Synthetic or IL checks of input and lockout do not establish real-game coverage. No release has been attempted. Source note.

No pad button did anything.

Symptom → cause → reported fix: missing saved key bindings, Terraria consuming the pad and stacked dead zones interfered with input. The contributor read XInput directly, isolated Terraria’s pad handling while a fighter owned it and added a default-binding fallback. Later checks confirmed the button path synthetically; no physical pad was tested. Source note.

On slopes the model squashed and popped back.

Symptom → cause → proposed fixes: treating slopes as full blocks and recreating a displaced fighter could repeat its entry animation. The note describes real slope geometry, lifting spawns out of solid tiles and remapping collision lines, but says the competing explanations of this loop were not proven. Source note.

A recorded match replayed in Terraria agreed with the original for 55 s, then diverged.

Symptom → cause → reported fix: Terraria’s collision streaming replaced the recording’s stage collision. Locking collision during replay restored agreement in the reported replay run. Source note.

Unknown path

The note reports this libmelee error when its Dolphin folder name lacked the expected marker, netplay. Its lab setup used a folder name containing that marker. This is an offline reference-tool naming requirement. Source note.

Binding of Terraria: bosses and weapons inside Isaac

Isaac is the host, and Terraria supplies locally converted sprites and sounds without running. The working report uses the vanilla Repentance+ Lua API, without REPENTOGON, for boss replacement, weapons, minions and a keyboard hotbar. It names xnbcli and Pillow for local asset work and Universal Modder’s window/video tools for observation. Compare content-port mashups. Source note.

The recorded setup is Repentance+ v1.9.7.17.J460 on Steam, Windows 11, with Terraria 1.4.5.8 as the local content source. Screenshots and a recording show boss fights, room clears, hotbar changes and minions; the contributor also checked story-boss spawning and Mom and It Lives room outcomes. Controller hotbar input, several later endings and balance remained unverified. The Beast and Dogma were unchanged. Source note.

Boss spawns, health bar shows, nothing drawn, no log line.

Symptom → cause → reported fix: sprite paths were relative to the wrong folder. Naming the image relative to its animation file corrected that reference. Images that still failed needed to be re-saved with Pillow. Source note.

Sprite:HasAnimation is nil.

Symptom → cause → reported fix: the method was unavailable in vanilla Repentance+; it belonged to REPENTOGON. The contributor used animation playback directly. Source note.

Hotbar needed several presses.

Symptom → cause → reported fix: update-time key-trigger polling missed short presses. Polling pressed state during rendering and detecting the transition made the hotbar respond. Source note.

Game hangs at file select, no log line, right after “Loading GameState”.

Symptom → cause → reported fix: a completion-widget image override used an older layout, so the current animation cropped beyond its bounds. Keeping the Repentance+ image’s original size and layout fixed the hang. The note isolates it by disabling mods, then removing overrides individually; it was not a corrupt save. Source note.

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 how to merge two 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 routes do these Terraria projects use?

Fal Arsenal and the boss agent use tModLoader. The Melee project embeds a native engine library under tModLoader, while Binding of Terraria ports content into Isaac through its Lua API.

Is the Terraria RL agent single-player?

Yes. The note identifies it as a single-player project. This guide covers only offline single-player modding.

Is Melee inside Terraria finished?

No. It is in progress. Replay checks and particular real-game runs are reported, but physical controllers, other machines and several integrated features remain unverified or under repair; no release has been attempted.

Does Terraria run alongside Isaac in Binding of Terraria?

No. Terraria supplies local art and sound; Isaac hosts the Lua mod. The contributor reports boss fights and room-clear checks, with controller hotbar support and several endings unverified.

Does a successful build prove the mod works in game?

No. These notes distinguish builds, synthetic checks and actual gameplay. Check the recorded versions, back up saves and verify a small change in a test world first.