Skip to main content
Universal Modder
Menu

How to Mod Terraria with Universal Modder

To mod Terraria with AI, give your agent a small tModLoader project and one observable change. A new item with a name, recipe and simple behavior is a useful first target. Keep new enemies, large effects and boss fights for later, after you can build, load and remove your own mod reliably. If you need the agent setup first, follow the installation guide.

Can Universal Modder mod Terraria?

Yes, through the tModLoader API route for Terraria's XNA/FNA environment. The agent writes C# content classes such as ModItem and ModProjectile, then builds them through tModLoader. Universal Modder supplies investigation and asset tools around that process; it is not the loader itself.

Fal Arsenal, a working Windows single-player project, runs on Terraria 1.4.4.9 through a tModLoader 2026.07 GitHub build; its multiplayer behavior is untested. Game and loader updates can break mods, so record both versions before you start. Read the full Fal Arsenal build notes on GitHub.

For this first project, use single player and a disposable character and world. Read the compatibility FAQ if you are comparing other platforms or multiplayer setups.

If you are choosing a first game project, compare this C# item route with the single-block Minecraft exercise. For a C# project in a different engine, the Risk of Rain 2 guide explains the additional loader and API dependencies; Terraria's tModLoader classes do not transfer to that game.

What you need

RequirementWhat to establish before editing
Your own Terraria installationConfirm it launches normally and record its version
tModLoaderInstall the appropriate loader branch and record the Terraria version it actually runs
C# development toolsUse the SDK and editor required by that loader's current developer guide
Universal Modder in your agentConfirm the skill is available before asking it to change files
A separate test worldKeep original saves outside the experiment and make a recoverable backup
A small source projectWork in the loader's actual ModSources directory

The official basic modding guide requires the .NET 8 SDK; follow the version of that guide matching your loader branch. Add the free tModLoader Steam app to your Steam library; downloading its files alone does not satisfy that check.

You do not need image generation to change an item's behavior. The CLI reference becomes useful when you add sprite conversion, backups or recording to the project.

Step-by-step

1. Create a clean loader project

Launch tModLoader. In Workshop → Develop Mods → Create Mod, make a uniquely named skeleton. Use Open Sources to locate its real folder. Build the untouched skeleton with Build + Reload before changing it. These controls and the initial item workflow are documented in the loader guide.

Record the output, active loader branch and source path. A skeleton that cannot build is an environment problem; adding AI-generated features will make it harder to diagnose.

2. Ask the agent to inspect the project

Open the source project in your installed agent and use this suggested prompt:

text
Select code
Use Universal Modder to inspect this Terraria tModLoader project.
Read the installed loader version, target framework and generated item code.
Plan one original item with a simple recipe and no world-changing effects.
List the source files, build action, in-game check and removal steps first.
Use the current loader API and preserve the working skeleton.

You can select the code to copy it manually.

Check the plan yourself: it should identify your existing project rather than download an unrelated mod pack. Keep the version and backup record described in the first-mod tutorial.

3. Make one visible change

Have the agent change the skeleton item's name or tooltip and one simple numeric property. Ask it to point out the C# definition and corresponding localization entry. Review the diff, save the files, and rebuild.

Keep the existing texture during this first check. That lets you distinguish a code or localization failure from a texture-path or image-format failure. After the first change works, add an original texture as a separate revision.

4. Verify inside the practice world

Enter your disposable world with the new mod enabled. Obtain the item using its documented recipe or a test command that your project actually defines. Verify the name, tooltip and changed property; inspect the loader log for errors.

Write down what you observed. A build succeeding and an item appearing are two different checks. If your goal is a projectile, the next check must include firing it, its facing and its behavior on impact. Save a screenshot only after the visible result matches your intended change.

5. Prove that you can recover

Exit the test session, disable only this experiment, and start a fresh test world without it. Keep the source and build log. Do not use an important world containing modded items as the uninstall test; restore important saves with their original mod set from the pre-change backup.

Once this loop is repeatable, add one feature at a time. A recipe, a projectile and a sprite revision should each have their own check.

Example prompts for Terraria

Adapt these prompts to your own project:

text
Select code
Add one original craftable lantern item to this working tModLoader project.
Use a simple texture I provide. Explain its recipe and where I can obtain it.
Keep the change limited to this item and its localization.

You can select the code to copy it manually.

text
Select code
My projectile is visible but points the wrong way.
Inspect its texture, rotation and draw code before changing them.
Propose one correction and a before-and-after test in the same scene.

You can select the code to copy it manually.

The prompt collection has separate prompts for recon, assets and debugging. Use those stages independently so a failed build does not trigger an unrelated asset rewrite.

Mods people built for Terraria

Fal Arsenal adds five weapons, three enemies and a two-phase boss, and runs in single player. Its C# classes and sprite pipeline are a useful reference. The ported example compiles through several command-line routes; run the in-game Build + Reload path yourself before relying on the port.

Study its source on GitHub to study one relevant feature after your own skeleton works. The terrain-changing weapons need a practice world that can be restored. Reproducing the full arsenal is a separate project from learning the item workflow above.

Known issues and fixes

SymptomFirst check
tModLoader will not startConfirm the Steam library requirement and follow the loader's launch diagnostics
New code does not appearConfirm the source folder, saved edits, successful build and active mod
A type or hook cannot be foundCompare the code with documentation for the installed loader branch
The item is present but the new name is missingInspect the matching localization key and the actual built artifact
Sprite frames are cut upCompare sheet layout, frame count and draw code; Fal Arsenal's NPC sprites use vertical strips
Repeated tests change the worldRestore the practice world before comparing the same action again

Recording from inside the game's renderer causes problems. Leave capture out of the first feature test; when you add it, use an external capture route and check ffmpeg setup. If the agent or CLI itself is missing, start at troubleshooting before changing the mod.

Frequently asked questions

Do I need tModLoader to follow this Terraria guide?

Yes. This guide uses tModLoader's C# API and its source-project workflow. Universal Modder helps the agent use that route; installing the agent skill does not install the game loader.

Does the Fal Arsenal example prove my multiplayer mod will work?

No. Fal Arsenal runs in Windows single player; its multiplayer behavior is untested. Networking, server behavior and other players need separate tests.

Do I need a fal API key for my first item?

No. Start with the generated mod skeleton and a simple original texture if needed. Paid asset generation is optional and adds a separate image-processing step.