Standalone [1.3] tModLoader - A Modding API

Hey World, I Am DesertStar, And I Have A Little Problem, I Know People Have Had This Problem before But i Am Confused about IT.

The Error
Missing mod: MOD/Items/Thinskin
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)

The Code
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;

namespace MOD.Items
{
    public class Thinskin : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Thinskin";
            item.damage = 50;
            item.melee = true;
            item.width = 512;
            item.height = 512;
            item.toolTip = "This is a modded sword.";
            item.useTime = 20;
            item.useAnimation = 20;
            item.useStyle = 1;
            item.knockBack = 6;
            item.value = 10000;
            item.rare = 2;
            item.useSound = 1;
            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();
        } 
    }
}
 
Hey World, I Am DesertStar, And I Have A Little Problem, I Know People Have Had This Problem before But i Am Confused about IT.

The Error
Missing mod: MOD/Items/Thinskin
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)

The Code
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;

namespace MOD.Items
{
    public class Thinskin : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Thinskin";
            item.damage = 50;
            item.melee = true;
            item.width = 512;
            item.height = 512;
            item.toolTip = "This is a modded sword.";
            item.useTime = 20;
            item.useAnimation = 20;
            item.useStyle = 1;
            item.knockBack = 6;
            item.value = 10000;
            item.rare = 2;
            item.useSound = 1;
            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();
        }
    }
}
I think it may mean your texture and code files don't have the same name.

how can i make dust trail after a projectile and be opaque. like the terra blade
And we're is a place that can help me with the dust coding? Plz
edit: finally found some code from the example mod to steal and put in my mod as the dust projectile stuf
 
Last edited:
Because I want to make them craftable. For instance I want the Meowmere but you can only get it from Moon Lord, but I don't want to defeat the Moon Lord yet, so I want to make recipes for them.
oh, just make a recipe in Mod.AddRecipes.

Something like

ModRecipe recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.Wood, 999);
recipe.SetResult(ItemID.Meowmere);
recipe.AddRecipe();
 
Hi @jopojelly @bluemagic123, could you please do me a favor if possible and remove PokeModRed 0.4 from the mod browser? After the security update I needed to publish under a new mod, but it seems they are getting mixed up with each other and won't update properly.

Oh EDIT: I just found a bug I think, it looks like ModItem saveCustomData() is only called for items in the player's inventory. If you put the ModItem in a chest it doesn't save.
 
Last edited:
Hi @jopojelly @bluemagic123, could you please do me a favor if possible and remove PokeModRed 0.4 from the mod browser? After the security update I needed to publish under a new mod, but it seems they are getting mixed up with each other and won't update properly.

Oh EDIT: I just found a bug I think, it looks like ModItem saveCustomData() is only called for items in the player's inventory. If you put the ModItem in a chest it doesn't save.
Done, it has been removed.
 
Capture.PNG
 
Hi @jopojelly @bluemagic123, could you please do me a favor if possible and remove PokeModRed 0.4 from the mod browser? After the security update I needed to publish under a new mod, but it seems they are getting mixed up with each other and won't update properly.

Oh EDIT: I just found a bug I think, it looks like ModItem saveCustomData() is only called for items in the player's inventory. If you put the ModItem in a chest it doesn't save.

Thanks @bluemagic123, really, you are a gem. Btw just in case you missed my edit: I just found a bug I think, it looks like ModItem saveCustomData() is only called for items in the player's inventory. If you put the ModItem in a chest it doesn't save.
 
Last edited:
so uuh, i posted here a small while ago about a mod that breaks TCF's modding rules (no adding in removed or unobtainable weapons from the game), however said mod was never removed which is somewhat annoying.

Also i have recently noticed 3 new mods on the mod browser, one directly copying the name of one of the largest mods here: tremor remastered, i find it highly unlikely that its just a coincidence, and its going to confuse people unless the mod author changes the name.
 
Any ideas why Terraria is crashing every time I access the modbrowser? I've re-installed Terraria and re-installed Tmodloader over it twice now, ran as administrator and made it an exception in all my anti-viruses and firewalls.
 
Any ideas why Terraria is crashing every time I access the modbrowser? I've re-installed Terraria and re-installed Tmodloader over it twice now, ran as administrator and made it an exception in all my anti-viruses and firewalls.
Sometimes the Mod Browser doesn't work for some amounts of time. It'll start working again later.
 
If there are 2 or more players on a PC, all players’ modPlayer custom data in the form of arrays will be the same as the last one.
 
If there are 2 or more players on a PC, all players’ modPlayer custom data in the form of arrays will be the same as the last one.
This is because the default behavior is to clone new ModPlayer instances from an existing instance. With arrays, this means that the value of the array is copied and all instances will share the same array, unless you fix it.

You can either override the CloneNewInstances bool and use a constructor or use the Initialize hook to initialize the array to a new array.
 
Back
Top Bottom