tModLoader Official tModLoader Help Thread

Okay the OnHitPvp hook didn't seem to work so I tried a ModifyHitPvp which I think will eventually work. The only problem is right now it causes a desync where when I attack another player with my modded sword, they recieve no knockback on my client but recieve full knockback on their side of the client. Then on my screen when I stop attacking, they teleport to where they were actually knocked back to on the server. Would this require a modpacket to fix? Or is it just a problem that's always existed in pvp?
 
15b819aef39a1c7507c587742a97d46b.png


what does this mean? I get this error whenever i try to log in with tmodloader enabled, i have tried reinstalling terraria and tmodloader, and running as admin, and changing my folder to not be read-only. I would like to continue playing this game with my friends, please help
 
Hi, i have a problem.
I Want to do so that a drop from a boss only drops if a specific weapon was used to kill him.
(Pls post example code)
 
I speak for mac players. we kinda cant really update our terraria because a lot of us don't know where the "Install Directory" is for terraria. if we cant find it we cant enable tmodloader and terraria wont open.

the commands we want to use are:
chmod +x tModLoaderServer
chmod +x Terraria
 
I speak for mac players. we kinda cant really update our terraria because a lot of us don't know where the "Install Directory" is for terraria. if we cant find it we cant enable tmodloader and terraria wont open.

the commands we want to use are:
chmod +x tModLoaderServer
chmod +x Terraria
Step 1 of the readme tells you how to find it:

1. Go to the Terraria install folder (the one containing Terraria.exe, not the Saves folder). For most people, this will be "Library/Application Support/Steam/steamapps/common/Terraria/Terraria.app/Contents/MacOS". To enter your hidden Library folder, in the Finder open the "Go" menu, then hold down the "Alt" key. The hidden Library will become visible. To enter the Terraria.app folder, right-click it then click on "Show Package Contents". If you can't find it, view this video:
 
heyo does anyone know how to code a summon weapon that is like the stardust dragon staff in the way that it attacks and etc.
[doublepost=1568139012,1568138845][/doublepost]
heyo does anyone know how to code a summon weapon that is like the stardust dragon staff in the way that it attacks and etc.
or a summon weapon in general
 
Examplemod has a minion
And for a stardust dragon staff type minion, you can copy and adjust the relevant AI code by decompiling the game files. To make the weapon actually increase the amount of segments on use, that's a different story, because the game hardcodes this behavior in multiple places so it is hard to replicate
 
People i need help Visual Studio says the code is perfectly fine, though when running in terraria, it comes up with this:
An error ocurred while building MemeologistsHolyGrail.XNAdll fails with 2 errors and C:\Users\myname\OneDrive\Documents\My Games\Terraria\ModLoader\Mod Sources\MemeologistsHolyGrail\Tiles\DankiteOre.cs(17,35) : error CS0029: Cannot implicitly convert 'bool'to 'int' warnings.

Oh and heres the code (im attempting to make a tile)

Tile Code

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;

namespace MemeologistsHolyGrail.Tiles
{
public class DankiteOreBlock : ModTile
{


public override void SetDefaults()
{
Main.tileSolid[Type] = true;
Main.tileMergeDirt[Type] = true;
Main.tileBlockLight[Type] = true;
Main.tileLighted[Type] = true;
Main.tileSpelunker[Type] = true;
Main.tileShine[Type] = true;
Drop = mod.ItemType("DankiteItem");
AddMapEntry(new Color(444, 222, 435));
}
}
}

Item Code

using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace MemeologistsHolyGrail.Items.Placeables
{
public class DankiteItem : ModItem
{



public override void SetDefaults()
{
DisplayName.SetDefault("Dankite");
item.width = 12;
item.height = 12;
item.maxStack = 999;
Tooltip.SetDefault("Emanating with pure dankness...");
item.useTurn = true;
item.autoReuse = true;
item.useAnimation = 15;
item.useTime = 10;
item.useStyle = 1;
item.consumable = true;
item.createTile = mod.TileType("DankiteOreBlock");
}

}
}

Idk whats up with that lol
 
I honestly have very little knowledge about computers or tModLoader, and could really use a lot of help. I tried installing tModLoader today and colossally messed up, almost destroying my vanilla game permanently. I was lucky to get it back and still don't know what I did or didn't do right.

I'm on a MacBook Air with Mojave, and downloaded tModLoaderInstaller from the link on these forums. After following the instructions on where to put files, I downloaded Java to use tModLoaderInstaller. I got an error when trying to use Java, the description of which I forget, but basically it said it couldn't access the file. So, I tried to install it manually using the ReadMe. I followed all the instructions up to the point where it told me "You need to give execute permissions to 2 files. Open a terminal in the install directory and run the following 2 commands:
chmod +x tModLoaderServer
chmod +x Terraria"

I have no idea how to open Terminal in the "install directory," since I am not sure where or what that is. After gaining no information on this, even through searching on these forums, Reddit, etc., I gave up and had to delete the tModLoader files to get Terraria working properly. I clearly deleted some of the wrong ones as it wasn't working, and finally I added a couple files back which apparently made Terraria open and run properly again. I have no idea which file or files that I added back made this work again.

Not really sure how anyone here can help, but basically I'd love advice on what to do about the Java error or, alternatively, how to execute the step in the ReadMe that I quoted above. Also, what do I do with the original Terraria file and other related files to make sure that (a) they aren't overwritten, (b) I can tell they're not a part of tModLoader and (c) I don't delete them? Sorry that I'm so dumb, I just really want to play Terraria with mods and can't figure anything out.
 
Is there a way of making Terraria draw a projectile on tModLoader? I need that to make my companions be able to use weapons like spears, without only showing up the shader.
 
Is there a way of making Terraria draw a projectile on tModLoader? I need that to make my companions be able to use weapons like spears, without only showing up the shader.
I would take a look at the WeaponOut open source mod. Definitely seems like something that would help you, as it does a lot of custom drawing. It certainly is possible.
 
I would take a look at the WeaponOut open source mod. Definitely seems like something that would help you, as it does a lot of custom drawing. It certainly is possible.
Actually I found out how to do that, but forgot to update my post.
Thanks anyway.
 
EDIT: NEVERMIND, apparently he...had HamstarHelpers in his mod folder for some reason? And deleting that file fixed it?? I have no idea how that happened, but...well, it apparently works now, so...yeah.

Friend of mine is trying to install tModLoader for the first time, but he's running into a problem that I never had, and I can't figure it out. Whenever he tries to open the Mod Browser, the game crashes out with the following error:

Code:
9/27/2019 5:22:17 PM
System.Exception: !ModHelpers.BeginModBrowserPopulateCheck.IsModBrowserListPopulated - Invalid modList
   at HamstarHelpers.Internals.Menus.ModTags.ModBrowserTagsMenuContext.BeginModBrowserPopulateCheck(UIState modBrowserUi)
   at HamstarHelpers.Internals.Menus.ModTags.ModBrowserTagsMenuContext.Show(UIState ui)
   at HamstarHelpers.Services.Menus.MenuContextServiceManager.LoadUI(UIState ui)
   at HamstarHelpers.Services.Menus.MenuContextServiceManager.Update()
   at HamstarHelpers.Services.Menus.MenuContextServiceManager._Update(GameTime gametime)
   at System.Action`1.Invoke(T obj)
   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_()

He hasn't had a chance to install any mods yet since he can't even get into the Mod Browser in the first place -- which just makes me even more confused by the references to HamstarHelpers. Similar problem when opening the Mods menu -- game becomes unresponsive or crashes. Tried verify, deleting config.json, reinstalling Terraria.

Thanks in advance.
 
Last edited:
Can I compile a mod that didnt have the source in when i extracted it but the dlls are there
 
Last edited:
So, I just updated tmodloader from 10.5 to 11.4, and whenever I go to the Mod Browser, Terraria closes and I get this error:

System.Exception:
!ModHelpers.BeginModBrowserPopulateCheckisModBrowserListPopula ted - Invalid modList at

HamstarHelpers.Internals.Menus.ModTags.ModBrowserTagsMenuConte xt.BeginModBrowserPopulateCheck(UIState modBrowserUi) at

HamstarHelpersinternals.Menus.ModTags.ModBrowserTagsMenuConte xt.Show(UlState ui) at

HamstarHelpers.Services.Menus.MenuContextSetviceManager.LoadUI(U1 State ui) at

HamstarHelpers.Services.Menus.MenuContextSetviceManager.Updatel) at

HamstarHelpers.Services. Menus. Menu ContextServiceManager _Update( GameTime gametime) at

System.Actiorelinvokeff obj) at

Terraria.Main.Draw(GameTime gameTime) at

Microsoft.Xna.Framework.Game.DrawFramel) at

Microsoft.Xna.Framework.Game.TickQ at

Microsoft.Xna.Framework.Game.Hostldle(Object sender, EventArgs e) at

Microsoft.Xna.Framework.GameHost.Onldlel) at

Microsoft.Xna.Framework.WindowsGameHost.RunOneFramel) at

Microsoft.Xna.Framework.WindowsGameHost.Applicationldle(Object sender, EventArgs e) at

System.Windows.Forms.Application.ThreadContext.System.Windows.Fo rms.UnsafeNativeMethods.1MsoComponent.FDoldle(Int32 grfidlef) at

System.Windows.Forms.Application.ComponentManager.System.Windo ws.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessa geLoop(IntPtr dwComponentlD, Int32 reason, Int32 pvLoopData) at

System.Windows.Forms.Application.ThreadContext.RunMessageLoopin ner(Int32 reason, ApplicationContext context) at

System.Windows.Forms.Application.ThreadContext.RunMessageLoop(In t32 reason, ApplicationContext context) at

System.Windows.Forms.Application.Run(Form mainForm) at Microsoft.Xna.Framework.WindowsGameHost.RunQ at

Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun) at

Terraria.Program.LaunchGame_Q

How do I fix this?
 
Back
Top Bottom