tModLoader Official tModLoader Help Thread

All the code works and it builds but now when i try to reload it i get this:
Missing texture DeadpoolMod/Items/Armor_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)

I have all my png files in the mod folder and i cant figure out the problem
 
I tried reformatting my folders by now i just get:
Missing texture DeadpoolMod/Items/Armor/Deadpoolsmask_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)
 
K, you have an extra layer of folders: You have

Mod Sources\DeadpoolMod\DeadpoolMod\Items\Armor\

it should be:

Mod Sources\DeadpoolMod\Items\Armor\

I'd just cut paste everything in "Mod Sources\DeadpoolMod\DeadpoolMod" to "Mod Sources\DeadpoolMod" and manually change the .csproj if you are using it to change the lines like "<Compile Include="DeadpoolMod\Items\Armor\DeadpoolsShirt.cs" />" to "<Compile Include="Items\Armor\DeadpoolsShirt.cs" />"
 
So i got past the error about the mask but theres another about the legs:
Missing texture DeadpoolMod/Items/Armor/Deadpoolspants_Legs
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)
 

Attachments

  • Mod Sources.zip
    40.3 KB · Views: 119
Nvm I see where I messed up
So i got past the error about the mask but theres another about the legs:
Missing texture DeadpoolMod/Items/Armor/Deadpoolspants_Legs
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)
 
Hello everyone. I have not done any modding work, but I got an idea for a mod and would like to work on it. However while doing research I was unable to figure out if it would be possible to have a mod listen in on an IRC channel to, lets say spawn an enemy when a command is given. My initial thoughts would be to create a new thread for the IRC listener with a queue the mod would be able to pull from but, here's the issue, I'm not really sure how I would go about having the mod side of it read from the queue and then execute the command. Every example I saw only had things such as chat messages and keyboard inputs to trigger events, so I'm not sure how I would have the mod read from the queue periodically, every frame for instance, and do it's business.

Any help would be appreciated.
 
Long time no updates.. but today I got some spare time to do a slight bit of work. Pretty much all found here

Added:

  • Info about custom yoyo's (Snippet)
    • (How to make a custom yoyo + yoyo projectile)
  • How to work with 'Global' classes (Guide)
  • How-to create a custom DUST (ModDust)
  • How-to-TROLL create a BOSS
  • How-to create a custom BUFF (ModBuff)
Changed/updated:
  • How-to create a custom ITEM (ModItem)
  • How to use and the uses of the Terraria.ID namespace (Guide)
  • Full dust chart (Snippet)
I also updated the OP a slight bit.
I guess ModNPC, ModSound as well as ModPlayer are next.
 
How would i make an item behave like a soul? I mean how gravity affects it. If i use the "update" and write gravity = 0f; it flies away :p
 
How would i make an item behave like a soul? I mean how gravity affects it. If i use the "update" and write gravity = 0f; it flies away :p
For one you can add the following code to the SetDefaults function of your item:
Code:
ItemID.Sets.ItemNoGravity[item.type] = true;
 
Hi I was wondering if anyone could tell me where I'm going wrong, the mod compiles and runs without error but the item doesn't appear on any crafting menus no matter what I do.

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

namespace ExampleSword.Items.Weapons
{
    public class ExampleSword : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Crescent Rose";
            item.damage = 35;
            item.melee = true;
            item.width = 64;
            item.height = 56;
            item.toolTip = "Crescent Rose";
            item.useTime = 30;
            item.useAnimation = 30;
            item.useStyle = 1;
            item.knockBack = 6;
            item.value = 10000;
            item.rare = 2;
            item.useSound = 1;
            item.autoReuse = true;
            item.useTurn = true;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(this,ItemID.DirtBlock);
            recipe.AddTile(18);
            recipe.SetResult(this, 1);
            recipe.AddRecipe();
        }
    }
}
 
Hi I was wondering if anyone could tell me where I'm going wrong, the mod compiles and runs without error but the item doesn't appear on any crafting menus no matter what I do.

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

namespace ExampleSword.Items.Weapons
{
    public class ExampleSword : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Crescent Rose";
            item.damage = 35;
            item.melee = true;
            item.width = 64;
            item.height = 56;
            item.toolTip = "Crescent Rose";
            item.useTime = 30;
            item.useAnimation = 30;
            item.useStyle = 1;
            item.knockBack = 6;
            item.value = 10000;
            item.rare = 2;
            item.useSound = 1;
            item.autoReuse = true;
            item.useTurn = true;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(this,ItemID.DirtBlock);
            recipe.AddTile(18);
            recipe.SetResult(this, 1);
            recipe.AddRecipe();
        }
    }
}
Look at this post and the answer I gave.
 
Hi I was wondering if anyone could tell me where I'm going wrong, the mod compiles and runs without error but the item doesn't appear on any crafting menus no matter what I do.

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

namespace ExampleSword.Items.Weapons
{
    public class ExampleSword : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Crescent Rose";
            item.damage = 35;
            item.melee = true;
            item.width = 64;
            item.height = 56;
            item.toolTip = "Crescent Rose";
            item.useTime = 30;
            item.useAnimation = 30;
            item.useStyle = 1;
            item.knockBack = 6;
            item.value = 10000;
            item.rare = 2;
            item.useSound = 1;
            item.autoReuse = true;
            item.useTurn = true;
        }

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

To add a vanilla item as an ingredient you shouldn't pass any mod since it's not from a mod. (actually passing 'this' will have it pass itself, a ModItem)
So do it just like this:
Code:
            recipe.AddIngredient(ItemID.DirtBlock);

Apart from that, as Eldrazi said, you probably need to change the namespace and class name unless you are directly editing this from ExampleMod.
 
hey can someone help me with this problem ive got? the mount that i made (skateboard) floats in the air when i use it. is there a way to prevent that? thanks alot!
upload_2016-3-19_23-2-19.png
 
hey can someone help me with this problem ive got? the mount that i made (skateboard) floats in the air when i use it. is there a way to prevent that? thanks alot!
View attachment 101014
thanks for the help i reduced the y values for the mount and its no longer floating but my player still floats in the air, i have tried changing the height boost values but it the player still floats. any help would be apprieciated
 
thanks for the help i reduced the y values for the mount and its no longer floating but my player still floats in the air, i have tried changing the height boost values but it the player still floats. any help would be apprieciated
You have a for loop where array[l] = 20; or something, right? You'll want to up tha value.
 
Back
Top Bottom