silent_ptr
Plantera
Is there ModWorld yet?
EDIT: When I open tModLoader 0.8.2, this happens:
EDIT: When I open tModLoader 0.8.2, this happens:
Last edited:
What about the Steam error?
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace MarcinMod.NPCs.Boss
{
public class ForestDragon_Head : ModNPC
{
public override void SetDefaults()
{
npc.name = "ForestDragon";
npc.displayName = "Forest Dragon";
npc.soundHit = 1;
npc.soundKilled = 1;
npc.lifeMax = 125;
npc.damage = 20;
npc.defense = 17;
npc.knockBackResist = 0.5f;
npc.width = 45; //22
npc.height = 45; //18
npc.boss = true;
npc.lavaImmune = true;
npc.noGravity = true;
npc.noTileCollide = true;
Main.npcFrameCount[npc.type] = 1;
npc.value = Item.buyPrice(0, 0, 1, 45);
npc.npcSlots = 1f;
npc.netAlways = true;
}
public override bool PreAI()
{
if (Main.netMode != 1)
{
if (npc.ai[0] == 0)
{
npc.realLife = npc.whoAmI;
int latestNPC = npc.whoAmI;
int WormLength = 1;
for (int i = 0; i < WormLength; ++i)
{
latestNPC = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("ForestDragon_Body"), npc.whoAmI, 0, latestNPC);
Main.npc[(int)latestNPC].realLife = npc.whoAmI;
Main.npc[(int)latestNPC].ai[3] = npc.whoAmI;
}
int WormLength2 = 1;
for (int i = 0; i < WormLength2; ++i)
{
latestNPC = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("ForestDragon_Legs"), npc.whoAmI, 0, latestNPC);
Main.npc[(int)latestNPC].realLife = npc.whoAmI;
Main.npc[(int)latestNPC].ai[3] = npc.whoAmI;
}
int WormLength3 = 4;
for (int i = 0; i < WormLength3; ++i)
{
latestNPC = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("ForestDragon_Body"), npc.whoAmI, 0, latestNPC);
Main.npc[(int)latestNPC].realLife = npc.whoAmI;
Main.npc[(int)latestNPC].ai[3] = npc.whoAmI;
}
for (int i = 0; i < WormLength2; ++i)
{
latestNPC = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("ForestDragon_Legs"), npc.whoAmI, 0, latestNPC);
Main.npc[(int)latestNPC].realLife = npc.whoAmI;
Main.npc[(int)latestNPC].ai[3] = npc.whoAmI;
}
for (int i = 0; i < WormLength; ++i)
{
latestNPC = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("ForestDragon_Body2"), npc.whoAmI, 0, latestNPC);
Main.npc[(int)latestNPC].realLife = npc.whoAmI;
Main.npc[(int)latestNPC].ai[3] = npc.whoAmI;
}
for (int i = 0; i < WormLength; ++i)
{
latestNPC = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("ForestDragon_Body3"), npc.whoAmI, 0, latestNPC);
Main.npc[(int)latestNPC].realLife = npc.whoAmI;
Main.npc[(int)latestNPC].ai[3] = npc.whoAmI;
}
latestNPC = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("ForestDragon_Tail"), npc.whoAmI, 0, latestNPC);
Main.npc[(int)latestNPC].realLife = npc.whoAmI;
Main.npc[(int)latestNPC].ai[3] = npc.whoAmI;
npc.ai[0] = 1;
npc.netUpdate = true;
}
}
return false;
}
}
}
This might be related to the windows defender thing. Are you sure the file is still in the steam folder? If I were you, I'd just have steam verify the game files, then do the tmodloader install again.Someone please help D:
I get this when I try to run tModLoader 0.8.2:
View attachment 121764
I renamed tModLoader to Terraria.exe and it did this...
Yeah, I figured it out shortly after. I thought Windows Defender was good...This might be related to the windows defender thing. Are you sure the file is still in the steam folder? If I were you, I'd just have steam verify the game files, then do the tmodloader install again.
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace TerraXMod.Items.Tools
{
public class OrigineticChainsaw : ModItem
{
public override void SetDefaults()
{
item.name = "Originetic Chainsaw";
item.damage = 27;
item.melee = true;
item.width = 56;
item.height = 22;
item.toolTip = "'A revving chainsaw prepared to cut through the strongest of trees'";
item.useTime = 15;
item.useAnimation = 30;
item.axe = 18;
item.useStyle = 5;
item.knockBack = 3;
item.value = Item.buyPrice(0, 2, 0, 0);
item.rare = 3;
item.useSound = 22;
item.autoReuse = true;
item.useTurn = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(null, "OrigineticBar", 28);
//recipe.AddTile(99);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
You're very welcome.Firstly, and most importantly, I Thank You LOADS forthe help with the homing projectiledoing the entirety of the homing projectile for me. It FINALLY works in a satisfactory manor
secondly,
ARKHALIS
I've set the type and ai to 595 and 75 respectively, but it still won't appear is there something in my code making it invisible, or is there something I still need to do to make it appear properly
also, I'd rather not look into the vanilla code unless it's really REALLY necessary. aka nobody anywhere on this forum knows how to do such and such thing and there are no tutorials, which would be a tragedy indeed.
also, sorry if I annoy you with my constant questions. That would not happen to be one of my goals when asking them
also, are there any tutorials on basic custom boss ai stuff that you know of? I'd like to check out things of that sort before I ask on here
also, I say 'also' too much
recipe.AddTile(mod, "YourTileName");How would I use a modded tile as the required tile for a recipe?
Chainsaws and drills are a little complicated. They actually count as projectiles.I'm working on a chainsaw. How do I make it so it turns to face the cursor?
item.channel = true;
item.noUseGraphic = true;
item.noMelee = true
...
item.useStyle = 5;
...
item.useSound = 23;
...
item.autoReuse = true;
item.shoot = mod.ProjectileType("MoltenDrill");
item.shootSpeed = 40f;
For that you'll want to look into the useTime and animationTime variables of your item. Normally these two would equals the same, but to take that rifle as an example: it has a useTime of 4 and a useAnimation of 12. Meaning that the item is used 3 times during one animation (since 12/4=3). Hope you understand thatI cant figure out how to get the coding required to make a clone of the Clockwork Assault Rifle.
Help would be immensely appreciated!