2grufs
Skeletron Prime
keep getting this error
Items/Weapons/HerosBlade
at Terraria.ModLoader.Mod.GetTexture(String name)
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
here's code
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace ApocalypseMOD.Items.Weapons
{
public class HerosBlade : ModItem
{
public override void SetDefaults()
{
item.name = "HerosBlade"; //the name displayed when hovering over the Weapon ingame.
item.damage = 175;
item.melee = true;
item.width = 75;
item.height = 75;
item.toolTip = "blade of legends.";
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 10;
item.value = Item.buyPrice(0, 0, 0, 10); // How much the item is worth, in copper coins, when you sell it to a merchant. It costs 1/5th of this to buy it back from them. An easy way to remember the value is platinum, gold, silver, copper or PPGGSSCC (so this item price is 10gold)
item.rare = 10;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}
public override void AddRecipes()
{ //this is how to craft this item
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 50);
recipe.AddTile(TileID.WorkBenches); //this is where to craft the item ,WorkBenches = all WorkBenches Anvils = all anvils , MythrilAnvil = Mythril Anvil and Orichalcum Anvil, Furnaces = all furnaces , DemonAltar = Demon Altar and Crimson Altar , TinkerersWorkbench = Tinkerer's Workbench
recipe.SetResult(this);
recipe.AddRecipe();
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.Next(3) == 0)
{
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, mod.DustType("Sparkle"));
//Emit dusts when swing the sword
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.OnFire, 60);
}
}
}
sorry, i'm quite new to this
this code was taken and modified from the example mod.
Items/Weapons/HerosBlade
at Terraria.ModLoader.Mod.GetTexture(String name)
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
here's code
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace ApocalypseMOD.Items.Weapons
{
public class HerosBlade : ModItem
{
public override void SetDefaults()
{
item.name = "HerosBlade"; //the name displayed when hovering over the Weapon ingame.
item.damage = 175;
item.melee = true;
item.width = 75;
item.height = 75;
item.toolTip = "blade of legends.";
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 10;
item.value = Item.buyPrice(0, 0, 0, 10); // How much the item is worth, in copper coins, when you sell it to a merchant. It costs 1/5th of this to buy it back from them. An easy way to remember the value is platinum, gold, silver, copper or PPGGSSCC (so this item price is 10gold)
item.rare = 10;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}
public override void AddRecipes()
{ //this is how to craft this item
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 50);
recipe.AddTile(TileID.WorkBenches); //this is where to craft the item ,WorkBenches = all WorkBenches Anvils = all anvils , MythrilAnvil = Mythril Anvil and Orichalcum Anvil, Furnaces = all furnaces , DemonAltar = Demon Altar and Crimson Altar , TinkerersWorkbench = Tinkerer's Workbench
recipe.SetResult(this);
recipe.AddRecipe();
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.Next(3) == 0)
{
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, mod.DustType("Sparkle"));
//Emit dusts when swing the sword
}
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.OnFire, 60);
}
}
}
sorry, i'm quite new to this
this code was taken and modified from the example mod.