• For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Begin your search for Journey's End information here and here. Please report bugs and issues for Journey's End here.
  • For issues you find with the Mobile 1.3 update, please follow this link and give as much detail as possible. This is the speediest way to get info to DR Studios to look at your issue. Also, some troubleshooting hints here.

Standalone [1.3] tModLoader - A Modding API

Please use the code tags so that we keep the formatting. Code displayed as normal text, without preserving the whitespace, is hard to read.

Your problem is that your SetupShop() function is not properly closed, so it "eats" the next few functions (TownNPCAttackStrength, TownNPCAttackCooldown, etc.). You open one brace for the function's content, then you open another brace for the if (spirit != null) conditions, and then you have a loooong list of vanilla items you add (well over 40, so you'll need a shop extender if you want all 84 items I've counted to be actually available, in vanilla merchants have only 40 shop slots, you may want to address that), and then you close one brace, but not two.

Also this looks very wrong to me:

I'm not a C# coder, but I'm familiar enough with a lot of other C-family language (C, C++, Java, JavaScript, Perl, and a few more obscure scripting languages) and from that experience I'm pretty sure your thing cannot work.

If you don't use curly braces after an if () condition, only the next instruction is run. That means that if you don't have, for example, Thorium loaded, then thorium is null, so the next instruction (which is Mod calamity = ModLoader.GetMod("CalamityMod")) isn't run, so when you check calamity it'll be null too even if Calamity is loaded. Worst case, the calamity variable will not even exist and you'll get a crash.

You should instead do something like
Mod thorium = ModLoader.GetMod("ThoriumMod");
Mod calamity = ModLoader.GetMod("CalamityMod");
Mod tremor = ModLoader.GetMod("Tremor");
Mod spirit = ModLoader.GetMod("SpiritMod");
No condition checks there. Keep your condition checks only for when you're going to actually reference them. The way you've got that shop set up, the merchant will sell vanilla items if all four mods are loaded, and nothing if any mod is missing. I haven't actually seen any of your mod references being used.

Another thing, not a bug but still worth addressing is this:
       public override string TownNPCName()
           switch (WorldGen.genRand.Next(4))
           case 0:
               return "Kimi";
           case 1:
               return "Kimi";
           case 2:
               return "Kimi";
               return "Kimi";
If you're just gonna use Kimi as your NPC name, why bother making it random?
       public override string TownNPCName()
           return "Kimi";
That's all you need.
Sorry. i wasn't on sooner. i already fixed it before reading this. sorry i didn't reply sooner.


I have been having trouble downloading running terraria with tmodloader, after running into the issue when installing the mods and click continue, it closes the game and opens up a wall of text. Has anyone else had the same problem, and if so, how did you deal with it?


So i was playing with a friend for a while, about 20 hours into our run we started running into an issue where any modded items thrown out of our inventories to eachother would despawn after about half of a second of airtime. In addition my friend cannot get loot bags from any bosses anymore. Not sure exactly what is going on here, some help would be greatly appreciated. Current mods, ignore the disabled part. Mods1.PNG Mods2.PNG
[doublepost=1562015849,1562015439][/doublepost]Nevermind, disregard. Friend made a new character and it solved the problem.


Hey so I've been having this issue where every time I open terraria with Tmodloader installed, the RELOGIC opening screen comes up, but then black... like nothing loads after that and I get the rainbow pinwheel of death (Im on a mac). Every 20th try the game actually loads, so its very frustrating trying to run this game. Any tips? Heres the line from the crash report in the client-crashlog.txt file in the MacOS folder.

7/2/2019 1:43:14 PM
System.TypeLoadException: Failure has occurred while loading a type.
at Terraria.Social.Steam.CoreSocialModule.Initialize () [0x00039] in <a17cf97a937a4fd393af9e423789daaf>:0
at Terraria.Social.SocialAPI.Initialize (System.Nullable`1[T] mode) [0x00053] in <a17cf97a937a4fd393af9e423789daaf>:0
at Terraria.Program.LaunchGame (System.String[] args, System.Boolean monoArgs) [0x000e2] in <a17cf97a937a4fd393af9e423789daaf>:0


Hi guys. I'm trying to make a custom difficulty mod but i'm having a lots of problems coding. The idea is very simple: I just want to drop all my MainInventory (not hotbar and items equipped) when I die.

This is the pseudo-code that I tried to code with TModLoader but my programming skills are so bad
If (Main.Normalmode) {
    If (player.die) {
    for (i=1; i=40; i++) {
Anyone could help me??

Thanks and sorry for my bad English
I need help. So I installed this since I just got the game, it worked at first, I started downloading a few mods then all of a sudden it crashed. But when I went to go back on the game it kept me in a black screen. So I deleted this tmodloader and all the game files, then I shutdown my computer reloaded and installed and download this and the game. But now it keeps putting me in a black screen and I tried everything. PLEASE help!

Side note: the game works when the tmodloader is not installed

Vlad Terrarian

The Destroyer
Please, help me. So in Github I saw Tmodloader 0.11.1v realese... so I downloaded it and I put all the files into the folder, where my terraria is installed. But when I try to run Tmodloader Terraria it not even giving me any problem, it's not even running... how can I solve this problem?.
Also in older Tmodloader version there were folder called "Modcompile" but in new one it's separately from Tmodloader.


Lol, how did you installed that? I had so much problems with installation
I haven't yet. I'm still running v0.10.1.5. As most mods are still built on that.
I did install the x64-bit version as well, but that required installing a fresh version of Terraria and putting the x64-bit the normal Terraria folder. with the x64 Package as well.
It was all in the readme file.
How do I update tModLoader? I have v0.10.1 and I would like to upgrade to v0.11.5
I have tModLoader in my Steam Terraria files (and it works fine) I downloaded v0.11.5 and replaced the old v0.10.1 files with the v.0.11.5 files, but when I run tModLoader, it says it's v0.10.5

Help would be greatly appreciated.


Hey guys! Got a question..
Is there a reason why the biggest mods arent loading anymore? It suddenly says, when reloading mods, "it looks like this mod is made for an older version of tmodloader (tremor)" and thorium isnt loading up anymore, too. It just write a few error lines and crashes. It worked all completely fine until some new day i started terraria. How does this come?
Top Bottom