Not in mods list, go to the mod browser and there is will have an update button.
Aaaand where do you see that?
Not in mods list, go to the mod browser and there is will have an update button.
Aaaand where do you see that?
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace WandEMod.Items //We need this to basically indicate the folder where it is to be read from, so you the texture will load correctly
{
public class CustomSpinningWeapon : ModItem
{
public override void SetDefaults()
{
item.name = "Split Scythe";
item.damage = 102;
item.melee = true;
item.width = 80;
item.height = 80;
item.toolTip = "It radiates light and dark energy all at once.";
item.toolTip2 = "It has a color pattern of Black, Blue, Purple, Yellow";
item.useTime = 10;
item.useAnimation = 10;
item.channel = true;
item.useStyle = 100;
item.knockBack = 8f;
item.value = Item.buyPrice(0, 10, 0, 0);
item.rare = 11;
item.shoot = mod.ProjectileType("MysteriousProjectile");
item.noUseGraphic = true;
}
public override bool UseItemFrame(Player player)
{
player.bodyFrame.Y = 3 * player.bodyFrame.Height;
return true;
}
}
}
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace WandEMod.Projectiles //We need this to basically indicate the folder where it is to be read from, so you the texture will load correctly
{
public class SpinningWeaponProj : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Unknown Magic"; //Name of the projectile, only shows this if you get killed by it
projectile.width = 220; //Set the hitbox width
projectile.height = 220; //Set the hitbox height
projectile.friendly = true; //Tells the game whether it is friendly to players/friendly npcs or not
projectile.penetrate = -1; //Tells the game how many enemies it can hit before being destroyed. -1 = never
projectile.tileCollide = false; //Tells the game whether or not it can collide with a tile
projectile.ignoreWater = true; //Tells the game whether or not projectile will be affected by water
projectile.melee = true; //Tells the game whether it is a melee projectile or not
}
public override void AI()
{
//-------------------------------------------------------------Sound-------------------------------------------------------
projectile.soundDelay--;
if (projectile.soundDelay <= 0)//this is the proper sound delay for this type of weapon
{
Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 15); //this is the sound when the weapon is used
projectile.soundDelay = 45; //this is the proper sound delay for this type of weapon
}
//-----------------------------------------------How the projectile works---------------------------------------------------------------------
Player player = Main.player[projectile.owner];
if (Main.myPlayer == projectile.owner)
{
if (!player.channel || player.noItems || player.CCed)
{
projectile.Kill();
}
}
Lighting.AddLight(projectile.Center, 1f, 0.6f, 0f); //this is the projectile light color R, G, B (Red, Green, Blue)
projectile.Center = player.MountedCenter;
projectile.position.X += player.width / 2 * player.direction; //this is the projectile width sptrite direction from the playr
projectile.spriteDirection = player.direction;
projectile.rotation += 0.3f * player.direction; //this is the projectile rotation/spinning speed
if (projectile.rotation > MathHelper.TwoPi)
{
projectile.rotation -= MathHelper.TwoPi;
}
else if (projectile.rotation < 0)
{
projectile.rotation += MathHelper.TwoPi;
}
player.heldProj = projectile.whoAmI;
player.itemTime = 2;
player.itemAnimation = 2;
player.itemRotation = projectile.rotation;
int dust = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Fire); //this is the dust that this projectile will spawn
Main.dust[dust].velocity /= 1f;
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) //this make the projectile sprite rotate perfectaly around the player
{
Texture2D texture = Main.projectileTexture[projectile.type];
spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, new Vector2(texture.Width / 2, texture.Height / 2), 1f, projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f);
return false;
}
}
}
namespace TGilded.Items
{
class BoomerangInABottle : ModItem
{
bool dJumpEffectBoomerang;
bool BoomerangJump = true;
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Boomerang in a Bottle");
Tooltip.SetDefault("How did you get it in there");
}
public override void SetDefaults()
{
item.accessory = true;
item.rare = 3;
item.damage = 13;
item.width = 20;
item.height = 26;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
if (player.controlJump && player.justJumped && BoomerangJump)
{
this.dJumpEffectBoomerang = true;
player.velocity.Y = (float)(-5.01f * player.gravDir);
player.jump = 45;
player.releaseJump = true;
}
}
}
}
Help! My mod does this when i try to build it!
c:\Users\Pixel\Documents\My Games\Terraria\ModLoader\Mod Sources\WandEMod\Items\SplitScythe.cs(12,18) : error CS1061: 'Terraria.Item' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'Terraria.Item' could be found (are you missing a using directive or an assembly reference?)
c:\Users\Pixel\Documents\My Games\Terraria\ModLoader\Mod Sources\WandEMod\Items\SplitScythe.cs(17,18) : error CS1061: 'Terraria.Item' does not contain a definition for 'toolTip' and no extension method 'toolTip' accepting a first argument of type 'Terraria.Item' could be found (are you missing a using directive or an assembly reference?)
c:\Users\Pixel\Documents\My Games\Terraria\ModLoader\Mod Sources\WandEMod\Items\SplitScythe.cs(18,18) : error CS1061: 'Terraria.Item' does not contain a definition for 'toolTip2' and no extension method 'toolTip2' accepting a first argument of type 'Terraria.Item' could be found (are you missing a using directive or an assembly reference?)
c:\Users\Pixel\Documents\My Games\Terraria\ModLoader\Mod Sources\WandEMod\Projectiles\MysteriousProjectile.cs(14,24) : error CS1061: 'Terraria.Projectile' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'Terraria.Projectile' could be found (are you missing a using directive or an assembly reference?)
Here's the code for the files mentioned (SplitScythe.cs and MysteriousProjectile.cs)
SplitScythe.cs:
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace WandEMod.Items //We need this to basically indicate the folder where it is to be read from, so you the texture will load correctly
{
public class CustomSpinningWeapon : ModItem
{
public override void SetDefaults()
{
item.name = "Split Scythe";
item.damage = 102;
item.melee = true;
item.width = 80;
item.height = 80;
item.toolTip = "It radiates light and dark energy all at once.";
item.toolTip2 = "It has a color pattern of Black, Blue, Purple, Yellow";
item.useTime = 10;
item.useAnimation = 10;
item.channel = true;
item.useStyle = 100;
item.knockBack = 8f;
item.value = Item.buyPrice(0, 10, 0, 0);
item.rare = 11;
item.shoot = mod.ProjectileType("MysteriousProjectile");
item.noUseGraphic = true;
}
public override bool UseItemFrame(Player player)
{
player.bodyFrame.Y = 3 * player.bodyFrame.Height;
return true;
}
}
}
MysteriousProjectile.cs:
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace WandEMod.Projectiles //We need this to basically indicate the folder where it is to be read from, so you the texture will load correctly
{
public class SpinningWeaponProj : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Unknown Magic"; //Name of the projectile, only shows this if you get killed by it
projectile.width = 220; //Set the hitbox width
projectile.height = 220; //Set the hitbox height
projectile.friendly = true; //Tells the game whether it is friendly to players/friendly npcs or not
projectile.penetrate = -1; //Tells the game how many enemies it can hit before being destroyed. -1 = never
projectile.tileCollide = false; //Tells the game whether or not it can collide with a tile
projectile.ignoreWater = true; //Tells the game whether or not projectile will be affected by water
projectile.melee = true; //Tells the game whether it is a melee projectile or not
}
public override void AI()
{
//-------------------------------------------------------------Sound-------------------------------------------------------
projectile.soundDelay--;
if (projectile.soundDelay <= 0)//this is the proper sound delay for this type of weapon
{
Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 15); //this is the sound when the weapon is used
projectile.soundDelay = 45; //this is the proper sound delay for this type of weapon
}
//-----------------------------------------------How the projectile works---------------------------------------------------------------------
Player player = Main.player[projectile.owner];
if (Main.myPlayer == projectile.owner)
{
if (!player.channel || player.noItems || player.CCed)
{
projectile.Kill();
}
}
Lighting.AddLight(projectile.Center, 1f, 0.6f, 0f); //this is the projectile light color R, G, B (Red, Green, Blue)
projectile.Center = player.MountedCenter;
projectile.position.X += player.width / 2 * player.direction; //this is the projectile width sptrite direction from the playr
projectile.spriteDirection = player.direction;
projectile.rotation += 0.3f * player.direction; //this is the projectile rotation/spinning speed
if (projectile.rotation > MathHelper.TwoPi)
{
projectile.rotation -= MathHelper.TwoPi;
}
else if (projectile.rotation < 0)
{
projectile.rotation += MathHelper.TwoPi;
}
player.heldProj = projectile.whoAmI;
player.itemTime = 2;
player.itemAnimation = 2;
player.itemRotation = projectile.rotation;
int dust = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Fire); //this is the dust that this projectile will spawn
Main.dust[dust].velocity /= 1f;
}
public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) //this make the projectile sprite rotate perfectaly around the player
{
Texture2D texture = Main.projectileTexture[projectile.type];
spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, new Vector2(texture.Width / 2, texture.Height / 2), 1f, projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f);
return false;
}
}
}
Hope you can help!
Sorry I am so ignorant with coding :/
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Boomerang in a Bottle");
Tooltip.SetDefault("How did you get it in there");
}
it is not finding the file for your projectile texture, in set defaults for your projectile define a width and height for your png size and name your original png after the cs file,Yes, I've read this half a dozen times and checked just as many. I sort of know what I'm up against, which is why I'm confused and posted here.
Is there possibly any other cause for that error?
Are you trying to use sqlite? I don't think there is a completely managed sqlite dll, is there?The process cannot access the file 'C:\Users\jacke\OneDrive\Documents\My Games\Terraria\ModLoader\Mod Sources\TGilded\.vs\TGilded\v15\sqlite3\storage.ide' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
at Terraria.ModLoader.ModCompile.Build(BuildingMod mod, IBuildStatus status)
at Terraria.ModLoader.ModCompile.Build(String modFolder, IBuildStatus status)
at Terraria.ModLoader.ModLoader.<>c.<BuildMod>b__65_0(Object _)
i have tried restarting every process, but because of this my mod refuses to compile so i cant test solutions, anyone know a potential fix?
thanks for directing me towards the build.txt.Are you trying to use sqlite? I don't think there is a completely managed sqlite dll, is there?
Anyway, it's complaining about that file being open somewhere. you should use build.txt's buildIgnore to ignore ".vs\*" among other folders like "bin\*" and "obj\*"
It's because the formatting was changed a bit. Why, I do not know, but I got some code that might work for you give your item a name. As of right now, I don't know how to create a custom tool tip for an item.Help! My mod does this when i try to build it!
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace WandEMod.Items
{
public class CustomSpinningWeapon : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Split Scythe");
///I don't know how to make a custom tool tip for an item, but I think it goes somewhere in this section.
}
public override void SetDefaults()
{
item.damage = 102;
item.melee = true;
item.width = 80;
item.height = 80;
item.useTime = 10;
item.useAnimation = 10;
item.channel = true;
item.useStyle = 100;
item.knockBack = 8f;
item.value = Item.buyPrice(0, 10, 0, 0);
item.rare = 11;
item.shoot = mod.ProjectileType("MysteriousProjectile");
item.noUseGraphic = true;
}
public override bool UseItemFrame(Player player)
{
player.bodyFrame.Y = 3 * player.bodyFrame.Height;
return true;
}
}
}
You can put either /n or \n (I forget which) nto a string to create a new line.It's because the formatting was changed a bit. Why, I do not know, but I got some code that might work for you give your item a name. As of right now, I don't know how to create a custom tool tip for an item.
Code:using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace WandEMod.Items { public class CustomSpinningWeapon : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("Split Scythe"); ///I don't know how to make a custom tool tip for an item, but I think it goes somewhere in this section. } public override void SetDefaults() { item.damage = 102; item.melee = true; item.width = 80; item.height = 80; item.useTime = 10; item.useAnimation = 10; item.channel = true; item.useStyle = 100; item.knockBack = 8f; item.value = Item.buyPrice(0, 10, 0, 0); item.rare = 11; item.shoot = mod.ProjectileType("MysteriousProjectile"); item.noUseGraphic = true; } public override bool UseItemFrame(Player player) { player.bodyFrame.Y = 3 * player.bodyFrame.Height; return true; } } }
By the way, how does one go about making a custom tool tip for an item? And I am talking about a custom tool tip that uses multiple lines. Not just one. Not everything I need to say about an item can fit on one line.
your image didnt come up, can you repost your problem.Hi , I have this problem.pls help me bros.
its \nYou can put either /n or \n (I forget which) nto a string to create a new line.
The namespace is wrong. It should be ModName.Projectiles.Hi i have a trouble with a custom projectile can you say whats wrong with my code?
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Projectile_1.Projectiles
{
public class Projectile_1 : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Projectile_1";
projectile.width = 20; //projectile width
projectile.height = 28; //projectile height
projectile.friendly = true; //make that the projectile will not damage you
projectile.melee = true; //
projectile.tileCollide = true; //make that the projectile will be destroed if it hits the terrain
projectile.penetrate = 2; //how many npc will penetrate
projectile.timeLeft = 200; //how many time this projectile has before disepire
projectile.light = 0.75f; // projectile light
projectile.extraUpdates = 1;
projectile.ignoreWater = true;
}
public override void AI() //this make that the projectile will face the corect way
{ // |
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
}
}