tModLoader Official tModLoader Help Thread

If you want to return "MoonBall", just put MoonBall in the quotes. If you want to return the entire thing, try removing the curly brackets AND the quotes, if you get an error, you are missing a namespace.
I'm trying return "Moon Ball" translated in the language of the mod user's choice. The example mod kind has an example of this: link, but I think it links to a vanilla translation. There are examples of pointing to the translation within the translation file, but I don't think they're being used: link.
 
Easy, you messed up the $ in between the curly bracket and the quote, it should be:
DisplayName.SetDefault("${Mods.ReducedGrinding.ItemName.MoonBall}"); instead of DisplayName.SetDefault("{$Mods.ReducedGrinding.ItemName.MoonBall}");
 
Easy, you messed up the $ in between the curly bracket and the quote, it should be:
DisplayName.SetDefault("${Mods.ReducedGrinding.ItemName.MoonBall}"); instead of DisplayName.SetDefault("{$Mods.ReducedGrinding.ItemName.MoonBall}");
I tried { before $ then built reloaded and it still didn't work.
 
hey there hi. I have a resource pack on tmodloader that's loaded and is supposed to replace an NPC. The sprites and map icon and all work without problem, but the name, dialogue and such is nonexistent as of now. i've looked up text replacement not working for tmodloader and haven't found anything so far. is there anything i could do?
 
How to run 2 tModLoader servers for 1.4 currently? I can't figure it out, was easier with 1.3

EDIT: Figured it out, -savedirectory command line allows you to run more than one instance.
 
Last edited:
Hi! First time user on the forums. I have downloaded Calamity and Fargos for 1.4, but I am unable to load them up as those (and other) mods were indicated to be built for "tModLoader v2022.5.103.32" while I am using "tModLoader v2022.6.86.0". Does not seem I can revert to a prior version to play these mods. Any surface-level advisement? Thank you :)

Edit: Shoutout to Discord- to solve the above issue:
1. Go to Steam.
2. Go to tModLoader and select the gear icon.
3. Select Properties / Betas / None.
 
Last edited:
I have this problem in tmodloader 1.4 where whenever i die, the timer counts down from 3 to 1, but at 1 it freezes. the game still works fine as you can interact with the settings and stuff still, but you can't respawn and you have to leave the world then rejoin it. i tried looking up this problem for a solution, but couldnt find anyone who had the same problem in tmodloader or terraria, does anyone know how to fix this?
 
System.TypeInitializationException: The type initializer for 'Microsoft.Xna.Framework.FNAPlatform' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at Microsoft.Xna.Framework.SDL2_FNAPlatform.ProgramInit(LaunchParameters args)
at Microsoft.Xna.Framework.FNAPlatform..cctor()
--- End of inner exception stack trace ---
at Microsoft.Xna.Framework.Game..ctor()
at Terraria.Main..ctor()
at Terraria.Program.LaunchGame_()

I've been getting this since I updated 64 bit tmodloader to the latest release. I don't know what's causing it at this point. I can launch standard tmodloader through steam, but not 64 bit. Version that I get in the error box is 0.11.8.9 for reference.
 
Hello, Tmodloader programming noob here. Is there a way to create an afterimage on a NPC, such as giving a custom boss a Shield of Cthulhu dash-style afterimage?

Edit: I figured it out. You can override the NPC predraw method to manually draw the afterimages.
 
Last edited:
Hello! I have a small suggestion or rather a request.
Terraria's 1.4 update added support for Razer Chroma devices with dynamic lighting changes for biomes, bosses and even HP level (which were very helpful to use potion after the debuff ends) and I really want to have this support in the new TModLoader. So, is it possible for you to add it in one of the future updates?
And thanks for considering my request.
 
Hello! Tmodloader programming noob here. I've created a boss which works perfectly in singleplayer, but runs into a plethora of issues on multiplayer:
  • If I hit the boss, it instantly disappears. It seems to completely despawn, as its boss music stops playing.
  • Even if I don't hit the boss, it occasionally despawns. This seems to happen at random and without any warning.
I'm almost certain this is due to some syncing issue in multiplayer, since the boss works fine in singleplayer. I don't think I've got any non-deterministic code that would cause a desync that despawns the boss. How do I not make the boss despawn in multiplayer?

Boss despawning when hit:

Edit: I think I've figured it out. Apparently, servers can't handle "Main.NewText(...)". You have to make sure the netMode is not the server or Main.NewText breaks everything.
 
Last edited:
1657818357302.png

could anybody help me with this? i reinstalled tmodlauncher over 3 times now, after checking integrity of files everything seems fine(and yes im using windows 7 dont judge me)
update:i found out that terraria has one file integrity :red:ed up, after uninstalling terraria and installing it once again its still there
 
Last edited:
Fresh re-install and still getting the same error. Any help would be appreciated.


[19:37:30] [Main Thread/INFO] [TerrariaSteamClient]: Working Directory: D:\Steam\steamapps\common\tModLoader
[19:37:30] [Main Thread/INFO] [TerrariaSteamClient]: Args: D:\Steam\steamapps\common\tModLoader\tModLoader.dll -terrariasteamclient 1448
[19:37:30] [Main Thread/INFO] [TerrariaSteamClient]: Setting steam app id to 105600
[19:37:30] [Main Thread/INFO] [TerrariaSteamClient]: SteamAPI.Init()
[19:37:30] [Main Thread/FATAL] [TerrariaSteamClient]: Unhandled error
System.EntryPointNotFoundException: Unable to find an entry point named 'SteamAPI_ISteamClient_GetISteamGameSearch' in DLL 'steam_api64'.
at Steamworks.NativeMethods.ISteamClient_GetISteamGameSearch(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, UTF8StringHandle pchVersion)
at Steamworks.SteamClient.GetISteamGameSearch(HSteamUser hSteamuser, HSteamPipe hSteamPipe, String pchVersion)
at Steamworks.CSteamAPIContext.Init()
at Steamworks.SteamAPI.Init()
at Terraria.ModLoader.Engine.TerrariaSteamClient.Run() in D:\a\tModLoader\tModLoader\src\tModLoader\Terraria\ModLoader\Engine\TerrariaSteamClient.cs:line 114

Edit: Finally figured it out. Had to re-name a .DLL file in sys32.
 
Last edited:
How do I animate a sword

This is my current code

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

namespace Gradient.Items
{
public class Masamuree : ModItem
{
public override void SetStaticDefaults()
{
// DisplayName.SetDefault("Masamuree"); // By default, capitalization in classnames will add spaces to the display name. You can customize the display name here by uncommenting this line.
Tooltip.SetDefault("Great for impersonating devs!");
}

public override void SetDefaults()
{
Item.damage = 15000;
Item.DamageType = DamageClass.Melee;
Item.width = 40;
Item.height = 76;
Item.useTime = 11;
Item.useAnimation = 11;
Item.useStyle = 1;
Item.knockBack = 13;
Item.value = 0;
Item.rare = 9;
Item.UseSound = SoundID.Item1;
Item.autoReuse = false;
}

public override void AddRecipes()
{
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ModContent.ItemType<Items.SnackticalsHeart>(), 1);
recipe.AddTile(TileID.WorkBenches);
recipe.Register();
}
}
}

And this is the sprite I want to use
 

Attachments

  • Masamuree.png
    Masamuree.png
    5.6 KB · Views: 60
i was about to open tmodloader to play more calamity but it keeps saying Steam Api Mismatch, assumed pirated, eventhough i bought terraria on steam, what do i do to fix this?

edit: what error look like
 

Attachments

  • Untitled.png
    Untitled.png
    10.1 KB · Views: 68
Last edited:
So i have a tiny problem and i dont know how to fix it.

I play Calamity with a few other mods and i am unable to catch critter such as worms or grasshoppers with my bugnet.
The pickup text pops up as if i picked it up but when i look in my inventory there isnt anything. :/

thx in advance for the help!

edit: sometimes some items vanish after i pick them up. same thing with the pickup text like above. ( mined mutant statue with the blue star from fargo and only have star in inventory)
 
Last edited:
Back
Top Bottom