DevaVentus
Terrarian
I´m not really complaining, but does any 1 else have issues with v 0.8.2 getting detected as malware from windows defender?
I've been having the same issue. It also keeps deleting the modded Terraria.exe.
Same problem here. I deactivated the real time protection.I've been having the same issue. It also keeps deleting the modded Terraria.exe.
Does anybody else also get this error message when trying to run the example mod?
Missing mod: ExampleMod/Dusts/Bubble
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.AddDust(String name, ModDust dust, String texture)
at Terraria.ModLoader.Mod.AutoloadDust(Type type)
at Terraria.ModLoader.Mod.Autoload()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
hlp me plz
c:\Users\William\Documents\My Games\Terraria\ModLoader\Mod Sources\TheElectronMod\Projectiles\ElectronFlailProjectile.cs(24,96) : error CS0246: The type or namespace name 'Color' could not be found (are you missing a using directive or an assembly reference?)
To fix the slow-to-a-stop problem, move the line 'projectile.velocity *= 0.95f;' inside the 'if (nearest != null)' condition, or get rid of it entirely if you don't want any drag. That's all that line did.less of a problem now
all it does now is go out a small distance and the stops and then homes when there is something to home on.
but it still is stopping when there is nothing to home on.
Code:public NPC FindNearest(Vector2 pos) { NPC nearest = null; float oldDist = 1001; float newDist = 1000; for (int i = 0; i < Terraria.Main.npc.Length - 1; i++) { if (!Collision.CanHit(pos, 1, 1, Main.npc[i].position, Main.npc[i].width, Main.npc[i].height)) continue; if (!Terraria.Main.npc[i].CanBeChasedBy(projectile)) continue; if (nearest == null) nearest = Terraria.Main.npc[i]; else { oldDist = Vector2.Distance(pos, nearest.position); newDist = Vector2.Distance(pos, Terraria.Main.npc[i].position); if (newDist < oldDist) nearest = Terraria.Main.npc[i]; } } return nearest; } int maxSpeed = 10; public override void AI() { NPC nearest = this.FindNearest(projectile.Center); Vector2 acceleration; if (nearest != null) // extremely important { acceleration = (nearest.position - projectile.position); } else { acceleration = Vector2.Zero; // maintain speed -- or whatever else you want to do here } projectile.velocity += acceleration * 1.5f; projectile.velocity *= 0.95f; if (projectile.velocity.Length() > maxSpeed) { projectile.velocity.Normalize(); projectile.velocity *= maxSpeed; } projectile.rotation = projectile.velocity.ToRotation(); }
also, since this homing is almost complete, how might I make an arkhalis type weapon. I have tried, but the projectile for the blade doesn't even show up!
WeaponCodedefaults:
Code:public override void SetDefaults() { item.name = "Solarius"; item.damage = 75; item.melee = true; item.width = 48; item.height = 48; item.useTime = 1; item.useAnimation = 1; item.useStyle = 1; item.noMelee = true; item.knockBack = 2; item.noUseGraphic = true; item.channel = true; item.value = 100000; item.rare = 9; item.useSound = 1; item.autoReuse = true; item.shoot = mod.ProjectileType("SolarisP"); item.shootSpeed = 20; }
ProjectileCodedefaults:
the class is shown so you know why the weapon is refering to that name for the projectile.Code:public class SolarisP : ModProjectile { public override void SetDefaults() { projectile.name = "Solarius"; projectile.width = 36; projectile.height = 20; projectile.friendly = true; projectile.penetrate = -1; projectile.aiStyle = 20; projectile.melee = true; projectile.tileCollide = false; projectile.light = 2f; }
pls help me
I am so lost![]()
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace ZeldaMod.Items.Weapons
{
public class HerosBow : ModItem
{
public override void SetDefaults()
{
item.name = "Hero's Bow";
item.damage = 20;
item.ranged = true;
item.noMelee = true;
item.width = 14;
item.height = 42;
item.toolTip = "The tresaure of Gorons.";
item.useTime = 27;
item.useAnimation = 27;
item.useStyle = 5;
item.knockBack = 2;
item.value = 10000;
item.rare = 2;
item.shoot = mod.ProjectileType("LightArrow");
item.useAmmo = 1;
item.useSound = 1;
item.shootSpeed = 9;
item.autoReuse = true;
}
public override bool AltFunctionUse(Player player) //Enable right click
{
return true;
}
public override bool UseItem(Player player)
{
return base.UseItem(player);
}
public override bool CanUseItem(Player player)
{
return true;
}
public override bool ConsumeAmmo(Player player) //So that when right clicking it change the projectile but doesn't shoot anything
{
if (player.altFunctionUse == 2)
return false;
else
return true;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
ZMPlayer mp = player.GetModPlayer<ZMPlayer>(mod);
if (player.altFunctionUse == 2) // if right click sswitch projectile that will be shooted
{
if (mp.switchArrow == 3) //Variable in ZMPlayer (ModPlayer)
mp.switchArrow = 0;
else
mp.switchArrow++;
return false;
}
if (mp.switchArrow == 0) // If there is no special projectile type, we just want to shoot the bow.
return true;
// If there is, however, we want to set the projectile type we want to shoot to the specialProjetileType of the player.
if (mp.switchArrow == 3)
{
if (player.statMana >= 50)
{
player.statMana -= 50;
type = mod.ProjectileType("LightArrow");
damage = 150;
}
else
{
type = ProjectileID.WoodenArrowFriendly;
damage = 20;
}
}
else if (mp.switchArrow == 1)
{
if (player.statMana >= 25)
{
player.statMana -= 25;
type = ProjectileID.FireArrow;
damage = 50;
}
else
{
type = ProjectileID.WoodenArrowFriendly;
damage = 20;
}
}
else if (mp.switchArrow == 2)
if (player.statMana >= 25)
{
player.statMana -= 25;
type = ProjectileID.FrostburnArrow;
damage = 40;
}
else
{
type = ProjectileID.WoodenArrowFriendly;
}
return true;
}
}
}
To fix the slow-to-a-stop problem, move the line 'projectile.velocity *= 0.95f;' inside the 'if (nearest != null)' condition, or get rid of it entirely if you don't want any drag. That's all that line did.
As for the arkhalis type weapon, the vanilla projectile has the type of 595 and uses the ai style of 75, so you'll need to set projectile.type and .aiStyle to those two numbers. Also, it would be a good idea for you to try decompiling tModLoader's source so that you can have a look at vanilla code for yourself. ILSpy and DotPeek are two good decompilers.
Hi I'm new here and i just tried to download the tmod loader only my virusscan began to shout that there was a virus in the zip file i clicked it away but i really want this mod so did i do something wrong or is the virusscanner oversensitive? i hope you can help me?
you have a few errors
your virusscan is a bad one, i got mine virus free, as there is no virus, its just the .jar that the computer doesnt like, get something different, ok?
there is no virus in there, ok? just turn off or get a different anti-virus, then download again, make sure its an actuall popular one that isnt in the corners of the web.