tModLoader Official tModLoader Help Thread

I am trying to make a modded sword, but there are errors.

Missing mod: TutorialMOD/Items/CustomSword
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.ModItem.AutoStaticDefaults()
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)

The .png is named CustomSword, same as the .cs file and the Public Class

Here's my project files:

Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace TutorialMOD.Items
{
    public class CustomSword : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("CustomSword");
            Tooltip.SetDefault("This is a modded sword.");
        }
        public override void SetDefaults()
        {
            item.damage = 50;
            item.melee = true;
            item.width = 40;
            item.height = 40;
            item.useTime = 20;
            item.useAnimation = 20;
            item.useStyle = 1;
            item.knockBack = 6;
            item.value = 10000;
            item.rare = 2;
            item.UseSound = SoundID.Item1;
            item.autoReuse = true;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.DirtBlock, 10);
            recipe.AddTile(TileID.WorkBenches);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}

What do I do? Thanks in advance!
Do you have a .png that named CustomSword?
 
I am a beginner modder, and learning to use Tmodloader through the ExampleMod. Since I use a mac, I ended up having the error that kept the mod from building. So I used the guide at https://forums.terraria.org/index.p...der-a-modding-api.23726/page-526#post-1001200. I Followed the instructions, using Visual Studio, but when I pressed the test button on the MONO file,
ExampleModError.png
This was the only error that showed up. I am showing the entire screen just in case there is something I missed. Please Help!!! Thanks in advance.
 
I am a beginner modder, and learning to use Tmodloader through the ExampleMod. Since I use a mac, I ended up having the error that kept the mod from building. So I used the guide at https://forums.terraria.org/index.p...der-a-modding-api.23726/page-526#post-1001200. I Followed the instructions, using Visual Studio, but when I pressed the test button on the MONO file,View attachment 175597 This was the only error that showed up. I am showing the entire screen just in case there is something I missed. Please Help!!! Thanks in advance.
Do you need this line no things in my mod has this line and work
 
I am a beginner modder, and learning to use Tmodloader through the ExampleMod. Since I use a mac, I ended up having the error that kept the mod from building. So I used the guide at https://forums.terraria.org/index.p...der-a-modding-api.23726/page-526#post-1001200. I Followed the instructions, using Visual Studio, but when I pressed the test button on the MONO file,View attachment 175597 This was the only error that showed up. I am showing the entire screen just in case there is something I missed. Please Help!!! Thanks in advance.
You need to reference the file ReLogic.dll which can be found by decompiling tModLoader with a program like ILSpy.
 
Hello, I'm working on my tmodloader mod that features a gun expansion.
My M16 i've created is very off-positioned, as it looks like I'm holding the back tip of the gun, instead of holding it normally.
There are vanilla guns in terraria that do this, (i.e. Uzi(photo), and Sniper rifle)
Anyone know a fix so the gun can be held normally? Or atleast slightly better?
Is this too complicated for anyone to help me?

Thanks.
 

Attachments

  • m4.jpg
    m4.jpg
    165.4 KB · Views: 247
I am a beginner modder, and learning to use Tmodloader through the ExampleMod. Since I use a mac, I ended up having the error that kept the mod from building. So I used the guide at https://forums.terraria.org/index.p...der-a-modding-api.23726/page-526#post-1001200. I Followed the instructions, using Visual Studio, but when I pressed the test button on the MONO file,View attachment 175597 This was the only error that showed up. I am showing the entire screen just in case there is something I missed. Please Help!!! Thanks in advance.

You need to reference ReLogic.dll in your solution. The simplest way to get it is to head to the tModLoader source repo (at Github) and download the source. You'll find it in the References folder.
 
I'm working on a mount mod, and I was wondering how one would be able to hide the player arms behind the mount. I would really appreciate any help.
 
I beleive I have successfully built mono.csproj, and windows.csproj, (only 8 warnings???) and using the https://forums.terraria.org/index.p...der-a-modding-api.23726/page-526#post-1001200 guide, I have ended up not able to find some Dll files, as you can see in the pictures below. Thanks!!! ( sorry if this post is strangely big, I'm still trying to figure out the forums!!!) Screen Shot 2017-07-08 at 8.18.03 PM.png Screen Shot 2017-07-08 at 8.12.24 PM.png Screen Shot 2017-07-08 at 8.12.04 PM.png
Screen Shot 2017-07-08 at 8.18.03 PM.png
Screen Shot 2017-07-08 at 8.12.24 PM.png
Screen Shot 2017-07-08 at 8.12.04 PM.png

[doublepost=1499559768,1499559712][/doublepost]
You need to reference the file ReLogic.dll which can be found by decompiling tModLoader with a program like ILSpy.
Thanks! I'm almost done now!
 
I'm just starting using this tool. I'm making the first sword. I cannot seem to change the size of the weapon in-game? (With item.width and item.height.)
All my other changes are loading fine. Thanks.
 
I have a problem: My terraria close without any error (with calamity and boss checlist mods, terraria version is 1.5.3.2 , tmodloader version is 0.10.0.2).
It is a problem of mods or tmodloader?
 
Umm I have this problem when I try to load up tmodloader as soon as i open the game i can't even get into the home menu here's my problem


Field not found: 'Terraria.Item.toolTip'.
at CrystiliumMod.Items.Accessories.DiamondRing.SetDefaults(Item item)
at Terraria.ModLoader.ItemLoader.SetDefaults(Item item, Boolean createModItem)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
 
Umm I have this problem when I try to load up tmodloader as soon as i open the game i can't even get into the home menu here's my problem


Field not found: 'Terraria.Item.toolTip'.
at CrystiliumMod.Items.Accessories.DiamondRing.SetDefaults(Item item)
at Terraria.ModLoader.ItemLoader.SetDefaults(Item item, Boolean createModItem)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
You can hold shift to bypass mods loading. Did you update the mod though? The code that causes this error was only on older versions of crystilium.
 
Can you add a button "Save",without exit (to tmodloader of course)
I want to save my progress after beating bosses and find cool loot.
Add it please ,if you can.
 
Can anyone help me with this problem, i get this message everytime i try to load a mod with custom music like Tremor. This problem occurred ever since i updated tmodloader to v0.10.0.2. I am unable to play as it disable the mod.

The mp3 sound file at Sounds/Music/Snow2.mp3 failed to load
at Terraria.ModLoader.Mod.Autoload()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
 
Back
Top Bottom