Michaelsoftman
Terrarian
Is there a way to increase damage for only a specific weapon rather than a damage class? For example, wearing a set of copper armor, the set bonus would be +10% damage to only the copper shortsword.
That public ModRecipe Recipe { get; private set; } part is something ive never seen before, probably for something extremely complex.I am writing code to make the slime staff craft able with 25 gel and 30 wood, but for some reason I keep getting errors no matter what I change. Here is the code currently,
C#:using Terraria.ID; using Terraria.ModLoader; namespace Xtreme { public class XTreme : Mod { public ModRecipe Recipe { get; private set; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(this); recipe.AddIngredient(ItemID.Gel, 20); recipe.AddIngredient(ItemID.Wood, 15); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.SlimeStaff, 1); recipe.AddRecipe(); } } }
When I go to build and reload the mod it says that “Sequence contains more than one matching element” I got this from example mod, just tweaking things for the recipe and for my mods Namespace. I have no Idea what’s going on, and I have tried basically everything. If you need a list of the full error I can post it.
using Terraria.ID;
using Terraria.ModLoader;
namespace Xtreme
{
public class XTreme : Mod
{
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.Gel, 20);
recipe.AddIngredient(ItemID.Wood, 15);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(ItemID.SlimeStaff, 1);
recipe.AddRecipe();
}
}
}
It keeps giving me the same error,That public ModRecipe Recipe { get; private set; } part is something ive never seen before, probably for something extremely complex.
so just
should work, btw, i would recommend making the slime staff much, MUCH more expensive, as it is insanely good for that recipe, but im not here to tell you how to make your mod.C#:using Terraria.ID; using Terraria.ModLoader; namespace Xtreme { public class XTreme : Mod { public override void AddRecipes() { ModRecipe recipe = new ModRecipe(this); recipe.AddIngredient(ItemID.Gel, 20); recipe.AddIngredient(ItemID.Wood, 15); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(ItemID.SlimeStaff, 1); recipe.AddRecipe(); } } }
using Terraria;
using Terraria.ModLoader;
namespace d.Prefixes
{
public class Lifesteal : ModPrefix
{
public override float RollChance(Item item)
=> 50f;
public override bool CanRoll(Item item)
=> true;
public override PrefixCategory Category
=> PrefixCategory.AnyWeapon;
public override void SetStats(ref float damageMult, ref float knockbackMult, ref float useTimeMult, ref float scaleMult, ref float shootSpeedMult, ref float manaMult, ref int critBonus)
{
damageMult = 0.6f;
}
}
}
using Terraria;
using Terraria.Localization;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
using Terraria.ID;
namespace LunaBlade.Items.Accessories
{
[AutoloadEquip(EquipType.Shield)]
public class 0WoodenShield : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("A wooden shield.");
}
public override void SetDefaults()
{
item.width = 24;
item.height = 28;
item.value = 3000;
item.rare = 2;
item.accessory = true;
item.defense = 1;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(9, 25);
recipe.AddTile(18);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
did you mean to put the 0 in theI'm trying to make a shield what am I doing wrong?
Code:using Terraria; using Terraria.Localization; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; using Terraria.ID; namespace LunaBlade.Items.Accessories { [AutoloadEquip(EquipType.Shield)] public class 0WoodenShield : ModItem { public override void SetStaticDefaults() { Tooltip.SetDefault("A wooden shield."); } public override void SetDefaults() { item.width = 24; item.height = 28; item.value = 3000; item.rare = 2; item.accessory = true; item.defense = 1; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(9, 25); recipe.AddTile(18); recipe.SetResult(this); recipe.AddRecipe(); } } }
public class 0WoodenShield : ModItem
Set theHow do I make it so that the set bonus for an armour set makes enemies take damage when they touch the player? (Like thorns). Any help is appreciated greatly.
player.thorns
variable to the appropriate value (0 is 0% damage, 1 is 100% damage)If you want it to have the same AI then add thisDoes anyone know how to make an EOC type boss?
is there a way to decompile terraria on mac?