tModLoader Official tModLoader Help Thread

I have Windows 8.1 and Linux Mint 17.3. On Windows, I could get tModLoader to run just fine with the Tremor mod. On Linux, I got tModLoader working fine too, using the OP's instructions. Then there are two problems, one minor and one major.

1: When I click on the 'open mods folder' button in the mods section of the modded Terraria main menu, nothing happens. Adding mods works just fine if I navigate to the folder manually, but...

2: I got this error with the Tremor mod. It reads the mod, the bar is stuck in the middle for a while, and finally it complains that the mod cannot be loaded and that it will be disabled, producing two files in the logs folder.

Code:
The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModLoader.LoadMod (Terraria.ModLoader.IO.TmodFile modFile, Terraria.ModLoader.BuildProperties properties) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModLoader.LoadMods () [0x00000] in <filename unknown>:0

Code:
http://javid.ddns.net/tmodloader/listmods.php
  at System.Net.WebRequest.GetCreator (System.String prefix) [0x00000] in <filename unknown>:0
  at System.Net.WebRequest.Create (System.Uri requestUri) [0x00000] in <filename unknown>:0
  at System.Net.WebRequest.Create (System.String requestUriString) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.IO.UploadFile.UploadFiles (System.String address, IEnumerable`1 files, System.Collections.Specialized.NameValueCollection values) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.UI.UIModBrowser.OnActivate () [0x00000] in <filename unknown>:0
 
It may be because you are running windows 8.1. A friend of mine was running 8.1 and had issues similar to yours. You can try re-installing tModloader, updating to windows 10, or making a mod of your own. Should you choose the third option, I would be more that happy to help!
 
I have Windows 8.1 and Linux Mint 17.3. On Windows, I could get tModLoader to run just fine with the Tremor mod. On Linux, I got tModLoader working fine too, using the OP's instructions. Then there are two problems, one minor and one major.

1: When I click on the 'open mods folder' button in the mods section of the modded Terraria main menu, nothing happens. Adding mods works just fine if I navigate to the folder manually, but...

2: I got this error with the Tremor mod. It reads the mod, the bar is stuck in the middle for a while, and finally it complains that the mod cannot be loaded and that it will be disabled, producing two files in the logs folder.

Code:
The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModLoader.LoadMod (Terraria.ModLoader.IO.TmodFile modFile, Terraria.ModLoader.BuildProperties properties) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModLoader.LoadMods () [0x00000] in <filename unknown>:0

Code:
http://javid.ddns.net/tmodloader/listmods.php
  at System.Net.WebRequest.GetCreator (System.String prefix) [0x00000] in <filename unknown>:0
  at System.Net.WebRequest.Create (System.Uri requestUri) [0x00000] in <filename unknown>:0
  at System.Net.WebRequest.Create (System.String requestUriString) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.IO.UploadFile.UploadFiles (System.String address, IEnumerable`1 files, System.Collections.Specialized.NameValueCollection values) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.UI.UIModBrowser.OnActivate () [0x00000] in <filename unknown>:0
we're hoping problem 2 is solved by something we did in the next update, but we've not figured out problem 1. seems to behave differently on different linux flavors.
 
What would you recommend reading for starters? I'm pretty good at C#, but it's a little bit hard to understand some things.
Stuff like: how do I make the .csproj file, what are these files (http://puu.sh/ndXf9/78525337e0.png) for, where do I put tiles etc. - it just isn't all that obvious to me. And instead of asking endlessly here, I'd rather read something.
 
What would you recommend reading for starters? I'm pretty good at C#, but it's a little bit hard to understand some things.
Stuff like: how do I make the .csproj file, what are these files (http://puu.sh/ndXf9/78525337e0.png) for, where do I put tiles etc. - it just isn't all that obvious to me. And instead of asking endlessly here, I'd rather read something.
If you know c#, you should know what the .CS files do/are. As far as the .csproj file goes: that's a file that's generated upon creating a project in Microsoft Visual Studio (this file is NOT necessary in a mod).
 
If you know c#, you should know what the .CS files do/are. As far as the .csproj file goes: that's a file that's generated upon creating a project in Microsoft Visual Studio (this file is NOT necessary in a mod).
It's not? Oh, I was worried. I knew I should've made a project, but that seemed otherworldly to me as to why this file would be important. Good to know that it's not!
 
I was just wondering how to make a projectile shoot where the mouse cusor is/was? It would help me if it was in "Public override void AI()" so i can learn the basics :p
 
Last edited:
What does NPCFrameCount and ExtraFrameCout mean and what about AttackAverageChance?
I don't know, but I would suppose this:
NPCFrameCount is basically how many frames are made for your NPC. Moving, standing.
ExtraFrameCount is how many misc frames are made for your NPC. I'd suppose this is for sitting, talking and attacking.
AttackAverageChance is a chance for your NPC to attack. I noticed that NPC doesn't attack at sight and immediately, but rather it has some sort of randomized interval betwixt each attack.
 
So, what are these things?
http://puu.sh/ndXf9/78525337e0.png
They were in the Example Mod. Do I need something like that in my mod too?
Both the RecipeHelper.cs and ExamplePlayer.cs are optional, meaning you don't really need them. The "ExampleMod.cs" is what binds the whole mod together because it extends the "Mod" class file that allows for mods to work, this doesn't have to be called "ExampleMod.cs" but should be your mod's name like this "MyMod.cs". The csproj is just a file to tell Visual Studios that that folder is a cs project and all of it's contents should be considered as part of it.
 
Both the RecipeHelper.cs and ExamplePlayer.cs are optional, meaning you don't really need them. The "ExampleMod.cs" is what binds the whole mod together because it extends the "Mod" class file that allows for mods to work, this doesn't have to be called "ExampleMod.cs" but should be your mod's name like this "MyMod.cs". The csproj is just a file to tell Visual Studios that that folder is a cs project and all of it's contents should be considered as part of it.
Soooooo, I can just copy the ExampleMod.cs and rename it?
Also, do you maybe know what other cs's do? If they add new features, maybe I could use them too.
 
Soooooo, I can just copy the ExampleMod.cs and rename it?
Also, do you maybe know what other cs's do? If they add new features, maybe I could use them too.
"ExamplePlayer.cs" extends the ModPlayer class file, which allows you to use any of the ModPlayer hooks in the tModLoader documentation for ModPlayer. Things you can do with ModPlayer includes setting player visual effects and setting what a newly created player starts with and more. "RecipeHelper.cs" is really not necessary, it is only there to help assign recipes to items and does not extend any mod class files, it's just for personal use.
 
"ExamplePlayer.cs" extends the ModPlayer class file, which allows you to use any of the ModPlayer hooks in the tModLoader documentation for ModPlayer. Things you can do with ModPlayer includes setting player visual effects and setting what a newly created player starts with and more. "RecipeHelper.cs" is really not necessary, it is only there to help assign recipes to items and does not extend any mod class files, it's just for personal use.
Interesting. Where can I read more about this?
 
Im sorry if im stupid but the projectile just sits in place when i fire it with "aistyle 0" so i tried making it in the AI() but it still doesnt work for me the only thing that works is my dust :p
Maybe try another styles? Try aistyle 1. Or 2. Or 3.
 
Back
Top Bottom