tModLoader Official tModLoader Help Thread

Is there any sort of up-to-date guide for fully custom multiplayer synchronization? I've made a tModLoader mod which I believe should in theory fully support multiplayer... but in practice, the game never progresses beyond "Receiving Tile Data: Complete!" when using the Host & Play option with the mod enabled. The source code of the mod can be found here, as it's probably relevant for this question: ~Link~
 
hey guys,i have been having this crash everytime i try to create a world https://imgur.com/a/imbnJSC

it doesn't even get to the stage of having the bar on screen,it says it's reseting games tiles or something,it's the text that appears right before the bar appears and that usually goes by really fast,but it gets up to 60% and crashes.

and while i have up to 38 mods,i only have like 5 big ones,the list is with the crash image. i'm trying to create a large world with corruption on expert.

Edit : i removed the crystal mod and it seems to work,but once when i pick the base i want and the timer on the bottom ends it just closes and gives this error :

System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.ValueCollection.Enumerator.MoveNext()
at Terraria.ModLoader.ModHooks.ModifyTransformMatrix(SpriteViewMatrix& Transform)
at Terraria.Main.do_Draw(GameTime gameTime)
at Terraria.Main.DoDraw(GameTime gameTime)
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.DrawFrame()
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs)

Edit 3 : so after a lot of mod being deleted i was able to resolve both problems,has to let go of calamity though,but considering the utter bs that is the ''supreme'' bosses..i think i won't miss it that much.
 
Last edited:
In mod Browser you could sort mods after download count. This also includes the update count or?
If so, could you include some new statistic about the total owner count which does not increase if someone only updates a mod?
Some mods add some additional mod options in game main game menu. How about adding some menu interface for a standardized format?. E.g. main menu only has one extra slot named e.g. "mod options" in there each mod can have his own slot with mod options.
 
Hello Fellow Terrarians! Quick little bug I'm seeing with TModLoader. I don't know if it's been posted yet, or if there's a fix, but the FAQ says to disable the mods to see if the problem persists. I'm only using 1 mod, and that's the Magic Storage mod by blushiemagic. Taking this mod out does nothing for me, because it's the WORLD that has the problem. The last time I was on the world, I remember building a housing unit for 8 different NPCs and a nice little outside facade. Reloading into the world today, I see that none of that progress has been made, and that the world has been completely reset aside from the map. None of the trees have been cut down, no other NPCs have spawned, and removing the mod doesn't do anything to help.

I think there might be a bug here somewhere, or maybe someone can offer me a solution?

Edit for update: Even TEdit doesn't see the changes that I know I made.
 
Last edited:
Hello Fellow Terrarians! Quick little bug I'm seeing with TModLoader. I don't know if it's been posted yet, or if there's a fix, but the FAQ says to disable the mods to see if the problem persists. I'm only using 1 mod, and that's the Magic Storage mod by blushiemagic. Taking this mod out does nothing for me, because it's the WORLD that has the problem. The last time I was on the world, I remember building a housing unit for 8 different NPCs and a nice little outside facade. Reloading into the world today, I see that none of that progress has been made, and that the world has been completely reset aside from the map. None of the trees have been cut down, no other NPCs have spawned, and removing the mod doesn't do anything to help.

I think there might be a bug here somewhere, or maybe someone can offer me a solution?

Edit for update: Even TEdit doesn't see the changes that I know I made.
Sounds more like a problem with the world file itself. Or maybe you somehow managed to quit without saving. Has any further changes that you've made to your world been saved?
 
Sounds more like a problem with the world file itself. Or maybe you somehow managed to quit without saving. Has any further changes that you've made to your world been saved?
Actually, a twitch streamer ( whycantieventhinkofanamee ) let me know that they had the same problem and to just reinstall the loader. I reinstalled th mod just to make sure, and it works now. I wish it worked the first time though xD
 
Actually, a twitch streamer ( whycantieventhinkofanamee ) let me know that they had the same problem and to just reinstall the loader. I reinstalled th mod just to make sure, and it works now. I wish it worked the first time though xD
I take that back. After a PC log-on from it shutting down and reloading everything, the world is back to square 1 again.
 
I take that back. After a PC log-on from it shutting down and reloading everything, the world is back to square 1 again.
So changes are saved when you exit and re-enter your world, but lost when you reset your PC entirely? That's very strange, I've not heard of that before. Does the same thing happen if you create a new world?
 
Win 10, steam user coming through!

Ok, i got tModLoader, got two mods (Spirit and Joost FYI) and i got it and i tried to pull it up, said an error message and pulled up a github explaning how to fix it. I had to install the loader, so i double clicked on the installer, and it said choose which app to open with. I dont know what to do, so could someone please help me?
 
Win 10, steam user coming through!

Ok, i got tModLoader, got two mods (Spirit and Joost FYI) and i got it and i tried to pull it up, said an error message and pulled up a github explaning how to fix it. I had to install the loader, so i double clicked on the installer, and it said choose which app to open with. I dont know what to do, so could someone please help me?
Sounds like you don't have java, just read the readme and do it manually, don't run the installer.
 
I have done everything the error message has told me to do but it still pops up with this message.
 

Attachments

  • tmodloader error.png
    tmodloader error.png
    10.2 KB · Views: 179
is there a way to move my player and world to the tmodloader?
Sure. Terraria saves all of it's stuff in \MyDocuments\My Games\Terraria\. Your Vanilla worlds and players are saved in \Terraria\Worlds and \Terraria\Players. Just copy your world and player files to the corresponding folders in \Terraria\ModLoader\.
 
All right i'm making a mod and i keep getting : error CS1061: but it's different all the time here's my log :
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\BossName.cs(42,21) : warning CS0114: 'Phycozsmod001.NPCs.Boss.BossName.BossLoot(ref string, ref int)' hides inherited member 'Terraria.ModLoader.ModNPC.BossLoot(ref string, ref int)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Boss\BossName.cs(42,21) : warning CS0114: 'Phycozsmod001.NPCs.BossName.BossLoot(ref string, ref int)' hides inherited member 'Terraria.ModLoader.ModNPC.BossLoot(ref string, ref int)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\Items\ItemName.cs(29,13) : warning CS0162: Unreachable code detected
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\BossName.cs(15,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\BossName.cs(16,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'displayName' and no extension method 'displayName' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\BossName.cs(32,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'soundHit' and no extension method 'soundHit' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\BossName.cs(33,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'soundKilled' and no extension method 'soundKilled' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\BossName.cs(45,127) : error CS1026: ) expected
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\ElementalDrone.cs(13,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\ElementalDrone.cs(14,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'displayName' and no extension method 'displayName' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\ElementalDrone.cs(20,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'soundHit' and no extension method 'soundHit' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\ElementalDrone.cs(21,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'soundKilled' and no extension method 'soundKilled' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Boss\BossName.cs(15,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Boss\BossName.cs(16,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'displayName' and no extension method 'displayName' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Boss\BossName.cs(32,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'soundHit' and no extension method 'soundHit' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Boss\BossName.cs(33,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'soundKilled' and no extension method 'soundKilled' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Worm\WormBody.cs(14,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'displayName' and no extension method 'displayName' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Worm\WormBody.cs(15,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Worm\WormBody.cs(47,21) : error CS1502: The best overloaded method match for 'Terraria.NetMessage.SendData(int, int, int, Terraria.Localization.NetworkText, int, float, float, float, int, int, int)' has some invalid arguments
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Worm\WormBody.cs(47,53) : error CS1503: Argument 4: cannot convert from 'string' to 'Terraria.Localization.NetworkText'
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Worm\WormHead.cs(18,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Worm\WormHead.cs(19,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'displayName' and no extension method 'displayName' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Worm\WormTail.cs(14,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'displayName' and no extension method 'displayName' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Worm\WormTail.cs(15,17) : error CS1061: 'Terraria.NPC' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'Terraria.NPC' could be found (are you missing a using directive or an assembly reference?)
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Worm\WormTail.cs(46,21) : error CS1502: The best overloaded method match for 'Terraria.NetMessage.SendData(int, int, int, Terraria.Localization.NetworkText, int, float, float, float, int, int, int)' has some invalid arguments
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\NPCs\Worm\WormTail.cs(46,53) : error CS1503: Argument 4: cannot convert from 'string' to 'Terraria.Localization.NetworkText'
c:\Users\bbutl\Documents\My Games\Terraria\ModLoader\Mod Sources\Phycozsmod001\Projectiles\StickyVirus.cs(15,24) : error CS1061: 'Terraria.Projectile' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'Terraria.Projectile' could be found (are you missing a using directive or an assembly reference?)

Sorry if thats too long but i need help
.CS Files Attached
BossName.png
BossName_Head_Boss.png
Boss Model
ElementalDrone.png
Boss summon/Enemy
ItemName.png
Summon for boss
ProBoss.png
Boss Projectile
 

Attachments

  • BossName.cs
    3.5 KB · Views: 169
  • ElementalDrone.cs
    1.4 KB · Views: 155
  • WormBody.cs
    3.9 KB · Views: 190
  • WormHead.cs
    14.5 KB · Views: 178
  • WormTail.cs
    3.8 KB · Views: 175
  • WormBody.png
    WormBody.png
    1.3 KB · Views: 149
  • WormHead.png
    WormHead.png
    1.2 KB · Views: 154
  • WormTail.png
    WormTail.png
    1.2 KB · Views: 147
  • ProBoss.cs
    1.5 KB · Views: 153
  • StickyVirus.cs
    1.4 KB · Views: 151
  • StickyVirus.png
    StickyVirus.png
    375 bytes · Views: 139
  • ItemName.cs
    1.5 KB · Views: 144
  • itemthatstartsitall.cs
    865 bytes · Views: 137
  • itemthatstartsitall.png
    itemthatstartsitall.png
    774 bytes · Views: 126
I had 2 general questions.

1 - Is there a way for a weapon (or projectile) to have a random damage value? For example, any damage between 50-100 is possible.

2 - With a throwing weapon like a Shuriken, is there a way to throw more than 1 at a time, but using 1 ammo per throw still?
 
How to cap item, and especially all sort of weapon use speed to at least 1 time per frame globally? Some modded modifiers and accessories make fastest weapons to stop being used and only sound plays.
 
How do i edit the hp of an npc?

I tried this and it doesnt work... What did i do wrong?


using Terraria;
using Terraria.ModLoader;
namespace slimehealther
{
public class slime1 : GlobalNPC
{
public override void SetDefaults(NPC npc)
{
if(npc.type == -3)
{
npc.lifeMax = 2000;
}
}
}
}
 
Last edited:
Back
Top Bottom