help with armor set

Urix

Official Terrarian
so, i got this error
c:\Users\Fooster\Documents\My Games\Terraria\ModLoader\Mod Sources\Foosterium\Items\Armor\GraniteMask.cs(26,24) : error CS0115: 'Foosterium.Items.Armor.GraniteMask.IsArmorSet(Foosterium.Items.Item, Foosterium.Items.Item, Foosterium.Items.Item)': no suitable method found to override

here's the code for all of my armors

the mask:

using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;

namespace Foosterium.Items.Armor
{
[AutoloadEquip(EquipType.Head)]
public class GraniteMask : ModItem
{
public override void SetStaticDefaults()
{
base.SetStaticDefaults();
DisplayName.SetDefault("Granite Mask");
Tooltip.SetDefault("Increases critical strike chance by 10%.");
}

public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = 10000;
item.rare = 2;
item.defense = 10;
}

public override bool IsArmorSet(Item head, Item body, Item legs) {
return body.type == mod.ItemType("GraniteBreastplate") && legs.type == mod.ItemType("GraniteLeggings");
}

public override void UpdateArmorSet(Player player)
{
player.allCrit += 1
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
r.AddIngredient(null, "GraniteBar", 25);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}

___________________________
the chestplate


using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Foosterium.Items.Armor
{
[AutoloadEquip(EquipType.Body)]
public class FoosteriumBreastplate : ModItem
{
public override void SetStaticDefaults()
{
base.SetStaticDefaults();
DisplayName.SetDefault("Granite Breastplate");
Tooltip.SetDefault("Increases all damage by 6%.");
}

public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = 10000;
item.rare = 2;
item.defense = 15;
}

public override void UpdateEquip(Player player)
{
player.allDamage += 0.6f;;
}

public override void AddRecipes()
{
ModRecipe r = new ModRecipe(mod);
r.AddIngredient(null, "GraniteBar", 35);
r.AddTile(TileID.Anvils);
r.SetResult(this);
r.AddRecipe();
}
}
}


______________________________
the leggings


using Terraria;
using Terraria.ModLoader;

namespace Foosterium.Items.Armor
{
[AutoloadEquip(EquipType.Legs)]
public class GraniteLeggings : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Granite Leggings");
Tooltip.SetDefault("Increases moving speed by 20%.");
}

public override void SetDefaults()
{
item.width = 18;
item.height = 18;
item.value = 10000;
item.rare = 2;
item.defense = 10;
}

public override void UpdateEquip(Player player)
{
player.moveSpeed += 2f;
}

public override void AddRecipes()
{
ModRecipe r = new ModRecipe(mod);
r.AddIngredient(null, "GraniteBar", 30);
r.AddTile(TileID.Anvils);
r.SetResult(this);
r.AddRecipe();
}
}
}




pls help
 

Neonite

Skeletron Prime
Try adding using Terraria.ID; to the top line of code for the mask. That probably might do something, I don't know really, but it's what I have with my helmet and it doesn't load without it. And maybe try it without using Terraria.Localization;
Here's the code to my helmet if you want to go through it and see what to add:
Code:
using Terraria.ID;
using Terraria.ModLoader;
using Terraria;
using Microsoft.Xna.Framework;

namespace Neosyris.Items.Armor
{
    [AutoloadEquip(EquipType.Head)]
    public class NeoniteHelmet : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Neonite Helmet");
            Tooltip.SetDefault("It pulses with a strange energy");
        }

        public override void SetDefaults()
        {
            item.width = 18;
            item.height = 18;
            item.value = 10000;
            item.rare = 2;
            item.defense = 30;
        }

        public override void ArmorSetShadows (Player player)
        {
            player.armorEffectDrawShadow = true; //Adds shadow trail, same as Shadow armor
            //player.armorEffectDrawShadowSubtle = true; //Don't know what this does, does nothing on it's own
            player.armorEffectDrawOutlines = true; //Adds pulsing, same as Hallowed armor
            //player.armorEffectDrawShadowLokis = true; //Adds shortened shadow trail
            //player.armorEffectDrawShadowBasilisk = true; //Don't know what this does, does nothing on it's own
            //player.armorEffectDrawOutlinesForbidden = true; //Same as armorEffectDrawOutlines, but slower
            //player.armorEffectDrawShadowEOCShield = true;
        }

        public override bool IsArmorSet(Item head, Item body, Item legs)
        {
            return body.type == mod.ItemType("NeoniteChestplate") && legs.type == mod.ItemType("NeoniteGreaves");
        }

        public override void UpdateArmorSet(Player player)
        {
            player.setBonus = "Increases Melee & Ranged Damage by 15%";
            player.meleeDamage += 0.15f;
            //player.thrownDamage *= 0.8f;
            player.rangedDamage += 0.15f;
            //player.magicDamage *= 0.8f;
            //player.minionDamage *= 0.8f;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.NeoniteBar, 50);
            recipe.AddTile(TileID.Anvils);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}

[doublepost=1556533631,1556533558][/doublepost]I've only just started making mods so I probably have no idea what I'm talking about, but hopefully this helps!
 

Urix

Official Terrarian
Try adding using Terraria.ID; to the top line of code for the mask. That probably might do something, I don't know really, but it's what I have with my helmet and it doesn't load without it. And maybe try it without using Terraria.Localization;
Here's the code to my helmet if you want to go through it and see what to add:
Code:
using Terraria.ID;
using Terraria.ModLoader;
using Terraria;
using Microsoft.Xna.Framework;

namespace Neosyris.Items.Armor
{
    [AutoloadEquip(EquipType.Head)]
    public class NeoniteHelmet : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Neonite Helmet");
            Tooltip.SetDefault("It pulses with a strange energy");
        }

        public override void SetDefaults()
        {
            item.width = 18;
            item.height = 18;
            item.value = 10000;
            item.rare = 2;
            item.defense = 30;
        }

        public override void ArmorSetShadows (Player player)
        {
            player.armorEffectDrawShadow = true; //Adds shadow trail, same as Shadow armor
            //player.armorEffectDrawShadowSubtle = true; //Don't know what this does, does nothing on it's own
            player.armorEffectDrawOutlines = true; //Adds pulsing, same as Hallowed armor
            //player.armorEffectDrawShadowLokis = true; //Adds shortened shadow trail
            //player.armorEffectDrawShadowBasilisk = true; //Don't know what this does, does nothing on it's own
            //player.armorEffectDrawOutlinesForbidden = true; //Same as armorEffectDrawOutlines, but slower
            //player.armorEffectDrawShadowEOCShield = true;
        }

        public override bool IsArmorSet(Item head, Item body, Item legs)
        {
            return body.type == mod.ItemType("NeoniteChestplate") && legs.type == mod.ItemType("NeoniteGreaves");
        }

        public override void UpdateArmorSet(Player player)
        {
            player.setBonus = "Increases Melee & Ranged Damage by 15%";
            player.meleeDamage += 0.15f;
            //player.thrownDamage *= 0.8f;
            player.rangedDamage += 0.15f;
            //player.magicDamage *= 0.8f;
            //player.minionDamage *= 0.8f;
        }

        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.NeoniteBar, 50);
            recipe.AddTile(TileID.Anvils);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}

[doublepost=1556533631,1556533558][/doublepost]I've only just started making mods so I probably have no idea what I'm talking about, but hopefully this helps!

thx, but i managed to fix it.
 
Top Bottom