Home - tModLoader/tModLoader GitHub Wiki
Looking for install instructions? Click here! (Steam and non-steam)
I don't want to contribute to tModLoader, I want to play mods
I don't want to contribute to tModLoader, I want to create mods
Welcome to the tModLoader wiki!
This place serves as a center for guides related to tModLoader. These guides help to teach basic concepts regarding tModLoader modding and should prove as a useful resource to modders. Please feel free to contribute guides for topics not yet covered, but please refrain from editing well established guides without consulting the developers first.
The automatically generated documentation documents classes and members of Terraria and the tModLoader API. It can be consulted to learn about specific methods and fields, but modders should start with the learning resources on this wiki and in ExampleMod. The documentation has separate pages corresponding to the various available versions of tModLoader.
You can navigate through the pages through the links in one of the sidebars on the right.
If you have suggestions, tips, or have found things such as spelling errors or grammar mistakes, please notify us in our discord server, the forum thread or open an issue thread to suggest a change.
A list of useful resources can be found here.
Below is a structured list of wiki pages that you can use to learn more about the API.
If you wish to contribute, please view our contribution guide beforehand.
Informative pages
These pages tend to describe certain files or folders.
- Information about build.txt
- Information about description.txt
- The tModLoader development pipeline (Learn about how tModLoader is built)
- Contribute translations to mods or tML
- Information about the Workshop (How to publish and update your mod)
- Licensing information (Among other things: how to license your mod, about tML's license)
Getting started
- tModLoader guide for players -- Learn tModLoader if you want to play mods
- tModLoader guide for developers -- Learn how to work with tModLoader to create mods
- tModLoader guide for contributors -- Learn how to contribute to tModLoader
- Basic tModLoader Usage Guide -- Learn the basics of using tML
- Basic tModLoader Usage FAQ -- Find fixes to common usage issues and bugs
- Basic tModLoader Modding Starter Guide - Start here if you want to make a mod.
- Basic tModLoader Modding FAQ
- Running a modded server -- Learn how to setup a modded server
- Debugging Multiplayer Usage Issues
Development
These pages aim to aid you to learn how to develop mods properly, how to setup your developing environment, etc.
- Developing with Visual Studio -- Recommended, but Windows only.
- Developing with Visual Studio Code -- Lightweight, cross-platform, lacks a few features.
- Developing with Rider -- Cross-platform, costs money unless student or open source license requested.
- Why Use an IDE -- Learn how Visual Studio and other IDEs help modders make mods more easily.
- Learn How To Debug -- Debugging is how we find and fix errors and bugs.
- Update Migration Guide -- Contains info on code updates required for updating (aka porting) mods to each new tModLoader release.
Easy guides
These guides are easy and should be used if you are new to the tModLoader API. Their goal is to get you familiar with tModLoader and help you learn how to make various types of content.
- Basic Guide Prerequisites
- Spriting
- Basic Ammo Guide
- Basic Autoloading Guide
- Basic Coordinates Guide
- Geometry
- Basic Glowmasks Guide
- IEntitySource
- Localization
- Basic Logging Guide
- Basic Minion Guide
- Basic ModConfig Guide
- Basic ModDust Guide
- Basic ModItem Guide
- Basic ModProjectile Guide
- Basic Recipe Guide
- Basic ModTile Guide
- Basic ModTileEntity Guide
- Basic Netcode Guide
- Basic NPC Drops and Loot Guide
- Basic NPC Spawning Guide
- Basic Sound Guide
- Basic Time and Timers Guide
- Basic UI Element Guide
- Wall Guide
- Conditions
Intermediate guides
The following guides are more advanced than the easy ones, but not advanced or expert level.
- Intermediate Guide Prerequisites
- Intermediate Git & mod management Guide
- Intermediate Modding with C#6 Guide
- Intermediate Modding with C#7 Guide
- Intermediate Netcode Guide
- Intermediate Recipe Guide: RecipeGroups, RecipeFinder/RecipeEditor
- Intermediate Saving and loading Guide
- Assets -- Accessing and Loading textures and shaders
Advanced guides
The following guides are considered advanced, and should only be attempted if the intermediate level is mastered.
- Advanced Guide Prerequisites
- Advanced Angular velocity and Linear velocity Guide
- Advanced Custom UI Guide
- Advanced Fixing Mod Not Fully Unloaded Guide
- Advanced Vanilla Code Adaption Guide
- Advanced Detouring Guide
- World Generation
- Reflection -- Accessing and modifying
private
andinternal
members of tModLoader and other mods.
Expert guides
Expert-level guides are not necessarily harder than advanced guides, but they more often cover a particular (difficult) subject. Expert guides should be followed if you are interested in learning about complicated topics or improving your mod's quality.
- Expert Guide Prerequisites
- Expert Cross Mod Content Guide -- Call, weakReferences, modReferences, recipes
- Expert IL Editing -- Patching the game using MonoMod
- Expert IL Editing Another Mod
- Expert IL Editing with HookEndpointManager
- Expert Shader Guide -- Armor dyes and screen shaders
Vanilla References
Guides / Value References / Changes
- BannerToNPC Conversions
- Player Item Animation
- Useful Vanilla Fields
- Useful Vanilla Methods
- Vanilla Content IDs -- ItemID, ProjectileID, TileID, NPCID, TileID, WallID, BuffID, SoundID, etc.
- Vanilla Interface Changes
- Vanilla Interface layers values
- Vanilla Item Field Values
- Vanilla NPC Field Values
- Vanilla Projectile Field Values
- Vanilla Recipes
- Vanilla World Generation Steps
IDs / Names
Class Documentation
- Item Class Documentation
- NetMessage Class Documentation
- NPC Class Documentation
- Projectile Class Documentation
Other pages
These are pages that we have so far failed to categorize or simply do not belong in one.