If you’ve never coded but have a cool idea for a Terraria mod, this guide is for you. In this guide, we’ll show you what you need to get started, generate the files for your first mod, make your first changes, and then what tools you can utilize to continue your journey.
Here’s a checklist of things you will need to get started:
Things you will need to finish your project:
We’ll be coding our mod in C#, so some knowledge of the language will also help. If you don’t know any C# but would like to learn to give life to your idea, this type of project is perfect! There are tons of resources for learning C# for tModLoader that we will highlight later in this guide. For now, check out either of the guides below to familiarize yourself with some of the basic terms used to describe C# code, as we’ll be using some of those terms on this page.
First, we need to create the foundational files for our mod. tModLoader will do this for us in a few steps.
The skeleton for your mod should now reside in the Mod Sources box as show below.
To view the files in your mod, press the “Open Sources” button at the bottom. This will take you to the file explorer. Double click on the folder with the name of your mod to view the files tModLoader created.
Everything we need to start building what we want is now in place. We’ll test this by creating the sword generated with our project files in-game.
You should now have a sword with the same name you picked before generating your mod’s skeleton. Let’s change some of its attributes by changing some code.
The sword you made will reflect the changes you made in the different files. If you want, you can continue messing around with the different values or even looking up how others make custom weapons to add your own twists to it. The next section will tell you a little bit about how to go about doing that.
If you’ve never made a mod, there are a ton of resources to start learning exactly what you want to learn. Because there are so many options for what you can make, it won’t necessarily be helpful to list how to do specific tasks as there are a lot of things you won’t want to do.
There are going to be three main resources you will want to look at:
With these four resources in your hands, you can make anything you put your mind to.
Before you publish your mod for the public, make sure you read this guide on the tModLoader GitHub. This will give you a final checklist of absolutely everything you should do before putting it on the workshop.
If you’re interested in a guide that dives a little further into the specifics of C# terms, I’d also recommend checking out the official tutorial in the tModLoader GitHub. If you scroll through, you can see that the guide has much more information than this guide, however, a lot of the information can be hard to parse for a true beginner.
The GitHub also has written guides on specific topics here.
For a glimpse at why I chose to keep my guide broad instead of diving into specific topics, take a peek at the Easy guides on the GitHub.