BenGallegos
Skeletron
thx it workedUgh, I'm sooo bad!
This should be the correct line:
BModProjInfo info = (BModProjInfo)projectile.GetModInfo(mod, "BModProjInfo");
thx it workedUgh, I'm sooo bad!
This should be the correct line:
BModProjInfo info = (BModProjInfo)projectile.GetModInfo(mod, "BModProjInfo");
just added a credits area in my mod and credited you for the debuff mob script(btw my mod isnt released yet)Ugh, I'm sooo bad!
This should be the correct line:
BModProjInfo info = (BModProjInfo)projectile.GetModInfo(mod, "BModProjInfo");
Hi,how can I adjust the position of a weapon? Every time I use my gun I was like holding the gunstock by superpower.
You've got the lifesteal code, you basically want to override the OnNPCHit function of your ModItem and put that code there.How to add lifesteal to a sword?
it doesnt work with melee weaponsYou've got the lifesteal code, you basically want to override the OnNPCHit function of your ModItem and put that code there.
using System;
using Terraria;
using Terraria.ModLoader;
namespace KnifeMod.items
{
public class WoodKnife : ModItem
{
public override void SetDefaults()
{
item.name = "Wood Knife";
item.damage = 4;
item.melee = true;
item.width = 26;
item.height = 26;
item.toolTip = "FYI I am spy";
item.useTime = 10;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 0;
item.value = 300;
item.rare = 1;
item.useSound = 1;
item.autoReuse = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Wood, 10);
recipe.AddTile(18);
recipe.SetResult(this, 1);
recipe.AddRecipe();
}
}
}
did you copy it in reg notepad or notepad++ or none of the above? cause it doesnt have the tabbed parts ima try to fix it real quickSo, I've been working on coding a weapon, but no matter what I do, nothing works. I've tried video tutorials and copied the code from those and edited it for my mod and it still did nothing. Any help?
Thanks!
notepaddid you copy it in reg notepad or notepad++ or none of the above? cause it doesnt have the tabbed parts ima try to fix it real quick
using System;
using Terraria;
using Terraria.ModLoader;
namespace KnifeMod.items
{
public class WoodKnife : ModItem
{
public override void SetDefaults()
{
item.name = "Wood Knife";
item.damage = 4;
item.melee = true;
item.width = 26;
item.height = 26;
item.toolTip = "FYI I am spy";
item.useTime = 10;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 0;
item.value = 300;
item.rare = 1;
item.useSound = 1;
item.autoReuse = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Wood, 10);
recipe.AddTile(18);
recipe.SetResult(this, 1);
recipe.AddRecipe();
}
}
}
Thanks! Is t all good to go?Also if you dont have notepad++ or something recommended for coding terraria mods you should since notepad cant do this correctly with copying inCode:using System; using Terraria; using Terraria.ModLoader; namespace KnifeMod.items { public class WoodKnife : ModItem { public override void SetDefaults() { item.name = "Wood Knife"; item.damage = 4; item.melee = true; item.width = 26; item.height = 26; item.toolTip = "FYI I am spy"; item.useTime = 10; item.useAnimation = 20; item.useStyle = 1; item.knockBack = 0; item.value = 300; item.rare = 1; item.useSound = 1; item.autoReuse = true; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.Wood, 10); recipe.AddTile(18); recipe.SetResult(this, 1); recipe.AddRecipe(); } } }
[doublepost=1459645894,1459645818][/doublepost]also
item.value = Item.buyPrice(0,1,10,0);
makes doing a value easier which in that you set the buy price which it goes (plat,gold,silver,copper)
it should beThanks! Is t all good to go?
Thanks! Is t all good to go?
It is not craftableWhat exactly doesn't work? Can you not use it? Is it not craftable? Does it not do any damage?
error CS0103: The name 'ItemID' does not exist in the current context
It is not craftable
[doublepost=1459646524,1459646365][/doublepost]@BenGallegos I'm getting this error:
Code:error CS0103: The name 'ItemID' does not exist in the current context
weirdIt is not craftable
[doublepost=1459646524,1459646365][/doublepost]@BenGallegos I'm getting this error:
Code:error CS0103: The name 'ItemID' does not exist in the current context
The mod cs file is what I'm having trouble with, any help on that? I have zero idea on how to code itAdd using Terraria.ID; to the top of your code.
Also, make sure that your mod class (probably KnifeMod.cs in your case) either has Autload set to true or manually loads the knife in the Load method.
The mod cs file is what I'm having trouble with, any help on that? I have zero idea on how to code it
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace KnifeMod
{
public class KnifeMod : Mod
{
public override void SetModInfo(out string name, ref ModProperties properties)
{
name = "Knife Mod";
properties.Autoload = true;
properties.AutoloadGores = true;
properties.AutoloadSounds = true;
}
public override void Load()
{
}
public override void Unload()
{
}
}
}