tModLoader Help making an armour set.

BigotedFox

Terrarian
So while I'm new to modding in Terraria I am experienced in coding elsewhere. I'm trying to make a mask with a few buffs but it keeps giving me this error:

c:\Users\User1\Documents\My Games\Terraria\ModLoader\Mod Sources\ArmourModOne\Items\Armor\BlackMask.cs(10,30) : error CS0115: 'ArmourModOne.Items.Armor.BlackMask.Autoload(ref string, ref string, System.Collections.Generic.IList<Terraria.ModLoader.EquipType>)': no suitable method found to override


I have no clue how to go about fixing it.

Code:

using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace ArmourModOne.Items.Armor
{
public class BlackMask: 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 = "Dwarven Mask";
item.width = 24;
item.height = 32;
item.toolTip = "";
item.toolTip2 = "25% movement speed, 25% increased damage, 15% decreased defence. Gives divine light.";
item.value = 10000;
item.rare = 11;
item.defense = 30;
}

public override void UpdateArmorSet(Player player)
{
player.meleeDamage *= 1.25f; // 25% melee damage
player.moveSpeed += 0.25f; // 25% move speed
player.defence -= 0.15f; //
player.AddBuff(BuffID.Shine, 2); //shine potion buff
}
public override void AddRecipes() //How to craft this item
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.MythrilBar, 20); //you need 20 mythril
recipe.AddTile(TileID.WorkBenches); //at work bench
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
 
So while I'm new to modding in Terraria I am experienced in coding elsewhere. I'm trying to make a mask with a few buffs but it keeps giving me this error:

c:\Users\User1\Documents\My Games\Terraria\ModLoader\Mod Sources\ArmourModOne\Items\Armor\BlackMask.cs(10,30) : error CS0115: 'ArmourModOne.Items.Armor.BlackMask.Autoload(ref string, ref string, System.Collections.Generic.IList<Terraria.ModLoader.EquipType>)': no suitable method found to override


I have no clue how to go about fixing it.

Code:

using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace ArmourModOne.Items.Armor
{
public class BlackMask: 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 = "Dwarven Mask";
item.width = 24;
item.height = 32;
item.toolTip = "";
item.toolTip2 = "25% movement speed, 25% increased damage, 15% decreased defence. Gives divine light.";
item.value = 10000;
item.rare = 11;
item.defense = 30;
}

public override void UpdateArmorSet(Player player)
{
player.meleeDamage *= 1.25f; // 25% melee damage
player.moveSpeed += 0.25f; // 25% move speed
player.defence -= 0.15f; //
player.AddBuff(BuffID.Shine, 2); //shine potion buff
}
public override void AddRecipes() //How to craft this item
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.MythrilBar, 20); //you need 20 mythril
recipe.AddTile(TileID.WorkBenches); //at work bench
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
sorry for being late af

error CS0115: 'ArmourModOne.Items.Armor.BlackMask.Autoload(ref string, ref string, System.Collections.Generic.IList<Terraria.ModLoader.EquipType>)': no suitable method found to override

here the fixed code

using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

[AutoloadEquip(EquipType.Head)]
namespace ArmourModOne.Items.Armor
{
public class BlackMask: ModItem
{
public override void SetStaticDefaults() {

DisplayName.SetDefault("insertname");
Tooltip.SetDefault("desc1\ndesc2);

}
public override void SetDefaults()
{
item.width = 24;
item.height = 32;
item.value = 10000;
item.rare = 11;
item.defense = 30;
}

public override void UpdateArmorSet(Player player)
{
player.meleeDamage *= 1.25f; // 25% melee damage
player.moveSpeed += 0.25f; // 25% move speed
player.defence -= 0.15f; //
player.AddBuff(BuffID.Shine, 2); //shine potion buff
}
public override void AddRecipes() //How to craft this item
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.MythrilBar, 20); //you need 20 mythril
recipe.AddTile(TileID.WorkBenches); //at work bench
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}

public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
equips.Add(EquipType.Head);
return true;
}
Its outdated

the new code is this
[AutoloadEquip(EquipType.Body)] (for a custom chestplate) in the texture put this [theres two] "name_Body" "armourname_Arms".

[AutoloadEquip(EquipType.Wings)] (for wings) "name_Wings"

[AutoloadEquip(EquipType.Head)] (for a custom helmet) "name_Head"

[AutoloadEquip(EquipType.Legs)] (for custom greaves) "name_Legs"

[AutoloadBossHead] (for this
cDGi00b.png
[for showing the head of the boss in the minimap]) "name_Head_Boss"
 
sorry for being late af

error CS0115: 'ArmourModOne.Items.Armor.BlackMask.Autoload(ref string, ref string, System.Collections.Generic.IList<Terraria.ModLoader.EquipType>)': no suitable method found to override

here the fixed code

using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

[AutoloadEquip(EquipType.Head)]
namespace ArmourModOne.Items.Armor
{
public class BlackMask: ModItem
{
public override void SetStaticDefaults() {

DisplayName.SetDefault("insertname");
Tooltip.SetDefault("desc1\ndesc2);

}
public override void SetDefaults()
{
item.width = 24;
item.height = 32;
item.value = 10000;
item.rare = 11;
item.defense = 30;
}

public override void UpdateArmorSet(Player player)
{
player.meleeDamage *= 1.25f; // 25% melee damage
player.moveSpeed += 0.25f; // 25% move speed
player.defence -= 0.15f; //
player.AddBuff(BuffID.Shine, 2); //shine potion buff
}
public override void AddRecipes() //How to craft this item
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.MythrilBar, 20); //you need 20 mythril
recipe.AddTile(TileID.WorkBenches); //at work bench
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}

public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
equips.Add(EquipType.Head);
return true;
}
Its outdated

the new code is this
[AutoloadEquip(EquipType.Body)] (for a custom chestplate) in the texture put this [theres two] "name_Body" "armourname_Arms".

[AutoloadEquip(EquipType.Wings)] (for wings) "name_Wings"

[AutoloadEquip(EquipType.Head)] (for a custom helmet) "name_Head"

[AutoloadEquip(EquipType.Legs)] (for custom greaves) "name_Legs"

[AutoloadBossHead] (for this
cDGi00b.png
[for showing the head of the boss in the minimap]) "name_Head_Boss"
Hi! Please don't necro old threads. :)
 
Hi! Please don't necro old threads. :)
Hey if it wasn't for Yeahfrick 'Necroing' this thread i would still be stuck. I :red:ing hate this bull:red: 'necroing' people are always on about, because if a problem has not been solved, or has changed in a way that makes the previous solution invalid, the thread isn't serving it's :red:ing purpose? DO YOU HAVE ANY IDEA HOW ANNOYING IT IS SEARCHING THROUGH 50 GODDAMNED THREADS TRYING TO SOLVE THE SAME PROBLEM?!?! DO YOU?!?! I'VE SPENT HOURS TRYING TO FIX EASILY EXPLAINABLE PROBLEMS BECAUSE OF THE ATTITUDE THAT PEOPLE SHOULDN'T "NECRO" QUESTIONS THAT STILL HAVE NOT BEEN ANSWERED!!!!!

Edit: :)
 
Hey if it wasn't for Yeahfrick 'Necroing' this thread i would still be stuck. I :red:ing hate this bull:red: 'necroing' people are always on about, because if a problem has not been solved, or has changed in a way that makes the previous solution invalid, the thread isn't serving it's :red:ing purpose? DO YOU HAVE ANY IDEA HOW ANNOYING IT IS SEARCHING THROUGH 50 GODDAMNED THREADS TRYING TO SOLVE THE SAME PROBLEM?!?! DO YOU?!?! I'VE SPENT HOURS TRYING TO FIX EASILY EXPLAINABLE PROBLEMS BECAUSE OF THE ATTITUDE THAT PEOPLE SHOULDN'T "NECRO" QUESTIONS THAT STILL HAVE NOT BEEN ANSWERED!!!!!

Edit: :)
Or you could learn the basics of C# and how to use Google. It's an easy language and Google is easy to use as well.
 
Last edited:
"Necroing" a thread with pertinent information is not a sin against the System. The point of keeping them around is that our questions, and the answers, persist. A question may be answered a year later, and this is not a bad thing. Substantive discussions can reach across the years.
 
Or you could the basics of C# and how to use Google. It's an easy language and Google is easy to use as well.
This isn't a default method of C#, this is a method of tmodloader. The reason it stopped working was because tmodloader scrapped the old method. If C# is so easy why haven't you figured out what the first few lines of code do yet? you know:
using Terraria.ModLoader;

While we're at it, why don't you the basics of English and how to use sentence structure.
 
This isn't a default method of C#, this is a method of tmodloader. The reason it stopped working was because tmodloader scrapped the old method. If C# is so easy why haven't you figured out what the first few lines of code do yet? you know:
using Terraria.ModLoader;

While we're at it, why don't you the basics of English and how to use sentence structure.
Of course it isn't a default method, but knowing even the basics should allow you to figure out what's wrong (if you put in the effort, that is). I'll admit you got me with the "why don't you the basics of English", I had just woken up and made the mistake of not reading over my message.

Could you please elaborate on "If C# is so easy why haven't you figured out what the first few lines of code do yet"? I'm a relatively experienced modder, so just kinda curious. Thanks. Scratch that, this likely isn't worth anyone's time. It all started because I told a dude not to necropost. Dumb argument. ¯\_(ツ)_/¯
 
Of course it isn't a default method, but knowing even the basics should allow you to figure out what's wrong (if you put in the effort, that is). I'll admit you got me with the "why don't you the basics of English", I had just woken up and made the mistake of not reading over my message.

Could you please elaborate on "If C# is so easy why haven't you figured out what the first few lines of code do yet"? I'm a relatively experienced modder, so just kinda curious. Thanks. Scratch that, this likely isn't worth anyone's time. It all started because I told a dude not to necropost. Dumb argument. ¯\_(ツ)_/¯
Just because I know the problem doesn't mean I know the solution. And I stand by my statement that "necroposting" isn't a bad thing.
 
Of course it isn't a default method, but knowing even the basics should allow you to figure out what's wrong (if you put in the effort, that is). I'll admit you got me with the "why don't you the basics of English", I had just woken up and made the mistake of not reading over my message.

Could you please elaborate on "If C# is so easy why haven't you figured out what the first few lines of code do yet"? I'm a relatively experienced modder, so just kinda curious. Thanks. Scratch that, this likely isn't worth anyone's time. It all started because I told a dude not to necropost. Dumb argument. ¯\_(ツ)_/¯
"Dumb argument. ¯\_(ツ)_/¯" yes
 
Back
Top Bottom