Standalone [1.3] tModLoader - A Modding API

Hey. I'm having a small issue, and I'm not even sure it has to do with mods, but I'll post it anyways. I've been playing with a few mods turned on, and I can play all nice and normal for the spam of 10 minutes, give or take. Then, out of nowhere, Terraria stops working without giving any crash screen/log (I've checked both tModLoader and Terraria folders, and there aren't any crash logs related to these particular cases). I've monitored the RAM usage while I play, and it was stable the entire time. I tried doing different actions in game, but that didn't affect it either. Any clues to what might be happening?
 
Can someone help me?
I'm trying to make a simple headpiece and, what I understand, Tmodloader doesn't recognize the sprite
Code:
Missing mod: Headband/Armor/Headband_Head
   at Terraria.ModLoader.ModLoader.GetTexture(String name)
   at Terraria.ModLoader.Mod.AddEquipTexture(EquipTexture equipTexture, ModItem item, EquipType type, String name, String texture, String armTexture, String femaleTexture)
   at Terraria.ModLoader.Mod.AddEquipTexture(ModItem item, EquipType type, String name, String texture, String armTexture, String femaleTexture)
   at Terraria.ModLoader.Mod.AutoloadItem(Type type)
   at Terraria.ModLoader.Mod.Autoload()
   at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
What does that mean?
I have a file called "Headband_Head.png" in the correct folder and it seems like I didn't do any typos
 
I'm trying to add a tabi / shield of cthulhu effect to my armor set bonus, could anyone help me with that? (i'm also trying to add extra jump height)
 
So, is the Linux server working? We are having issues with it still, I'm not finding much information on how to get it to work on Linux.
 
So, I managed to get past most of the errors I encountered by just directly copypasting everything from the ExampleMod
But now I got this error code
Code:
c:\Users\Samu\Documents\My Games\Terraria\ModLoader\Mod Sources\Random_Mod\Items\Armor\Headband.cs(38,25) : error CS0103: The name 'ItemID' does not exist in the current context
The piece of code the error code refers to is identical to the one on the ExampleMod
Here's the code:
Code:
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;

namespace Random_Mod.Items.Armor
{
    public class Headband : ModItem
    {
        public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
        {
            equips.Add(EquipType.Head);
            return true;
        }

        public override void SetDefaults()
        {
            item.name = "Headband";
            item.width = 18;
            item.height = 18;
            item.toolTip = "A headband";
            item.value = 10000;
            item.rare = 2;
            item.defense = 20;
        }


        public override void UpdateArmorSet(Player player)
        {  
            player.meleeDamage *= 0.8f;
            player.thrownDamage *= 0.8f;
            player.rangedDamage *= 0.8f;
            player.magicDamage *= 0.8f;
            player.minionDamage *= 0.8f;       
        }
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.DirtBlock);            (The problem is here, all text within these brackets is not part of the code)
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
 
So, I managed to get past most of the errors I encountered by just directly copypasting everything from the ExampleMod
But now I got this error code
Code:
c:\Users\Samu\Documents\My Games\Terraria\ModLoader\Mod Sources\Random_Mod\Items\Armor\Headband.cs(38,25) : error CS0103: The name 'ItemID' does not exist in the current context
The piece of code the error code refers to is identical to the one on the ExampleMod
Here's the code:
Code:
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;

namespace Random_Mod.Items.Armor
{
    public class Headband : ModItem
    {
        public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
        {
            equips.Add(EquipType.Head);
            return true;
        }

        public override void SetDefaults()
        {
            item.name = "Headband";
            item.width = 18;
            item.height = 18;
            item.toolTip = "A headband";
            item.value = 10000;
            item.rare = 2;
            item.defense = 20;
        }


        public override void UpdateArmorSet(Player player)
        { 
            player.meleeDamage *= 0.8f;
            player.thrownDamage *= 0.8f;
            player.rangedDamage *= 0.8f;
            player.magicDamage *= 0.8f;
            player.minionDamage *= 0.8f;      
        }
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.DirtBlock);            (The problem is here, all text within these brackets is not part of the code)
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
using Terraria.ID; at the top.
[doublepost=1475095176,1475095134][/doublepost]
Can someone help me?
I'm trying to make a simple headpiece and, what I understand, Tmodloader doesn't recognize the sprite
Code:
Missing mod: Headband/Armor/Headband_Head
   at Terraria.ModLoader.ModLoader.GetTexture(String name)
   at Terraria.ModLoader.Mod.AddEquipTexture(EquipTexture equipTexture, ModItem item, EquipType type, String name, String texture, String armTexture, String femaleTexture)
   at Terraria.ModLoader.Mod.AddEquipTexture(ModItem item, EquipType type, String name, String texture, String armTexture, String femaleTexture)
   at Terraria.ModLoader.Mod.AutoloadItem(Type type)
   at Terraria.ModLoader.Mod.Autoload()
   at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
What does that mean?
I have a file called "Headband_Head.png" in the correct folder and it seems like I didn't do any typos
Check all the folder spellings, I guess.
[doublepost=1475095193][/doublepost]
When I try to run installer it says: "Could not find place to install to"
Then do the manual install.
 
I can't update my mod onto the mod browser, the game just freezes for a bit and then I get this error:
The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at Terraria.ModLoader.IO.UploadFile.UploadFiles(String address, IEnumerable`1 files, NameValueCollection values)
at Terraria.ModLoader.UI.UIModSourceItem.Publish(UIMouseEvent evt, UIElement listeningElement)
 
using Terraria.ID; at the top.
[doublepost=1475095176,1475095134][/doublepost]
Check all the folder spellings, I guess.
[doublepost=1475095193][/doublepost]
Then do the manual install.
upload_2016-9-29_16-46-13.png

So I managed to bring my ugly headband to life, it's my first piece of equipment that I bothered to create new sprites for.
And it's animated, when I walk the loose ends of the headband move.
How do I make it so it doesn't make my hair disappear?
 
View attachment 141927
So I managed to bring my ugly headband to life, it's my first piece of equipment that I bothered to create new sprites for.
And it's animated, when I walk the loose ends of the headband move.
How do I make it so it doesn't make my hair disappear?
On your ModItem:
Code:
public override void DrawHair(ref bool drawHair, ref bool drawAltHair)
{
    drawHair = drawAltHair = true;
}
 
Back
Top Bottom