tModLoader Official tModLoader Help Thread

Hi people, does someone know how to include a json file in a mod? If it's possible, where do we put the file?
(I saw a json file from HERO mod in the ModLoader folder)

Cause I'd like to save some variables for a mod :)

Edit : I just found a post, I'm reading.But if you have ideas to help me, I'd appreciate :)
 
Thank you for confirming that for me, I really appreciate it.
Just started having the same fps issues in single player, opening inventory makes it go back up to 60 fps. The fps drops are worse in multiplayer, dropped down to the 20's, in singleplayer its in the low 50's. Maybe I am using too many mods(over 30). :p
 
Just started having the same fps issues in single player, opening inventory makes it go back up to 60 fps. The fps drops are worse in multiplayer, dropped down to the 20's, in singleplayer its in the low 50's. Maybe I am using too many mods(over 30). :p
It happens for me without any mods enabled. The CPU useage just ramps up over time, no matter what.
 
It happens for me without any mods enabled. The CPU useage just ramps up over time, no matter what.
Down to 9 fps in multiplayer(by myself), around 60 fps in single player. The fps went up to 30 when I opened inventory, not the usual 60, I think 40 mods may be too much. :eek:
 
Last edited:
Hi, should the config files go in the main tmodloader folder, or the mods config folder? I have most of my configs in the main tmodloader folder, like boss health bars and loot bags. However, the reduced grinding config is in the mods config folder. When I look at my logs.txt, its spammed with:
Failed to read Reduced Grinding's config file! Recreating config...
Button Adding...
...Button Added
Button Adding...
...Button Added
Button Adding...
...Button Added
Failed to read Reduced Grinding's config file! Recreating config...

Is this something to worry about? Thanks.
 
Whenever I try to run terraria, from the "play game" button on steam, it shows me this message:

System.EntryPointNotFoundException: Unable to find an entry point named
'InitSafe' in DLL 'CSteamworks'.
at Steamworks.NativeMethods.SteamAPI_InitSafe()
at Steamworks.SteamAPI.Init()
at Terraria.Social.Steam.CoreSocialModule.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable`1 mode)
at Terraria.Program.LaunchGame(String[] args)


If you need more information, ask me.
 
Hi, should the config files go in the main tmodloader folder, or the mods config folder? I have most of my configs in the main tmodloader folder, like boss health bars and loot bags. However, the reduced grinding config is in the mods config folder. When I look at my logs.txt, its spammed with:
Failed to read Reduced Grinding's config file! Recreating config...
Button Adding...
...Button Added
Button Adding...
...Button Added
Button Adding...
...Button Added
Failed to read Reduced Grinding's config file! Recreating config...

Is this something to worry about? Thanks.
Config files are made by the mod, that's up to where they decide to put them.

Whenever I try to run terraria, from the "play game" button on steam, it shows me this message:

System.EntryPointNotFoundException: Unable to find an entry point named
'InitSafe' in DLL 'CSteamworks'.
at Steamworks.NativeMethods.SteamAPI_InitSafe()
at Steamworks.SteamAPI.Init()
at Terraria.Social.Steam.CoreSocialModule.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable`1 mode)
at Terraria.Program.LaunchGame(String[] args)


If you need more information, ask me.
Install this by following the readme.txt: https://github.com/bluemagic123/tModLoader/releases/tag/v0.9.2.3-for-v1.3.5
 
Do you know what the text in the log file means? Is this a problem for my game?
Button Adding...
...Button Added
Button Adding...
...Button Added
Button Adding...
...Button Added

is actually from cheatsheet i think, it's no problem.

I assume the others are no problem either.
 
My game crashed, and when I opened my game, my player's icon was invisible, said i had 0 mana, and it wouldn't let me press play. when I move the .tplr file, it lets me start, but my character doesn't have the mod armor in the icon, and when the world starts loading, it says Load Failed! No Backup Found. I've tried disabling my mods and reloading the mods. Please help.
 
Pls help, "DrawAnimation" is not a thing anymore and I dont know what they changed it to

Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace ProphecyOfNalulik.Items
{
    public class SoulOfNalulik : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Soul Of Nalulik";
            item.width = 20;
            item.height = 20;
            item.maxStack = 99;
            item.value = 10000;
            item.rare = 5;
            ItemID.Sets.ItemNoGravity[item.type] = true;
        }
        public override DrawAnimation GetAnimation()
        {
            return new DrawAnimationVerical(15, 2);
        }
        public override Color? GetAlpha(Color lightColor)
        {
            return lightColor.White;
        }
    }
}
 
Last edited:
My game crashed, and when I opened my game, my player's icon was invisible, said i had 0 mana, and it wouldn't let me press play. when I move the .tplr file, it lets me start, but my character doesn't have the mod armor in the icon, and when the world starts loading, it says Load Failed! No Backup Found. I've tried disabling my mods and reloading the mods. Please help.

It happened again! The first world and player had 5 hours, and I had to delete them. So I started another world with another player, and 5 hours in, it won't load! The character still works though...
 
It happened again! The first world and player had 5 hours, and I had to delete them. So I started another world with another player, and 5 hours in, it won't load! The character still works though...
thats happened to me, I renamed the file outside of terraria and restarted the game and it fixed it for a while.
 
How to make boss summon to only work in hell
this is my code



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

namespace KahanMod.Items.BossSummons
{
public class FoxPlushie : ModItem
{
public override void SetDefaults()
{
item.name = "Fox Plushie";
item.width = 17;
item.height = 44;
item.maxStack = 1;
AddTooltip("So cute!");
AddTooltip("Use in hell to summon Kumiho");
item.value = 100;
item.rare = 1;
item.useAnimation = 30;
item.useTime = 30;
item.useStyle = 4;
item.consumable = true;
}


public override bool CanUseItem(Player player)
{
return !NPC.AnyNPCs(mod.NPCType("Kumiho"));
}
public override bool UseItem(Player player)
{
int[] direction = { -1, 1 };
NPC.SpawnOnPlayer(player.whoAmI, mod.NPCType("Kumiho"));
Main.PlaySound(15, (int)player.position.X, (int)player.position.Y, 0);
return true;

}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Silk, 8);
recipe.AddIngredient(null, "MythicalFire", 8);
recipe.AddIngredient(ItemID.Hellstone,8);
recipe.AddTile(TileID.Loom );
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
 
can someone help, when i try to run it with mods, it gives me this

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Texture2D'.
at Microsoft.Xna.Framework.Helpers.CheckDisposed(Object obj, IntPtr pComPtr)
at Microsoft.Xna.Framework.Graphics.TextureCollection.set_Item(Int32 index, Texture value)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.RenderBatch(Texture2D texture, SpriteInfo[] sprites, Int32 offset, Int32 count)
at Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush()
at Microsoft.Xna.Framework.Graphics.SpriteBatch.End()
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)
 
Back
Top Bottom