terrarian10
Plantera
Alright So This Could Also Go Into Player Suggestions But This Is Kind Of A Wiki Too
If You Have An Idea For A New NPC that is useful please comment it and its attributes below (And No Alchemist Please Tmodloader Already Had A Mod For That And Summoners Too.
Why I Made It: I Have MagicStorage And This Is Me: "Two Iron Bars There Has To Be A Faster Way To Get Iron Ore!!!!"
The Prices Of Ores Are Based On There Built In Prices Ingame Sense That Would Problably Be The Most Balanced.
Image: (I Am Not That Good At Graphics)
Current NPCs
If you want to know:
If You Have An Idea For A New NPC that is useful please comment it and its attributes below (And No Alchemist Please Tmodloader Already Had A Mod For That And Summoners Too.
Why I Made It: I Have MagicStorage And This Is Me: "Two Iron Bars There Has To Be A Faster Way To Get Iron Ore!!!!"
The Prices Of Ores Are Based On There Built In Prices Ingame Sense That Would Problably Be The Most Balanced.
Image: (I Am Not That Good At Graphics)
Current NPCs
Sells Ores Not Bars
Will Move Into An Open House Once The Eye Of Cthulhu Has Been Defeated And You Have More Than Three NPCs
Platinum/Gold And Everything Before It
Meteorite, Demonite and Crimtane
Hellstone
Mythril, Orichalcum, Cobalt And Palladium
Titanium, Adamantite
Chlorophyte
Luminite
If you want to know:
Code:
using System.Linq;
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
using static Terraria.ModLoader.ModContent;
using Terraria.ID;
using Terraria.Localization;
namespace AntiAnnoying.TownNpcs
{
[AutoloadHead]
class Miner : ModNPC
{
public static int shop = 1;
public override string HeadTexture
{
get
{
return "AntiAnnoying/TownNpcs/Miner_Head";
}
}
public override string Texture
{
get
{
return "AntiAnnoying/TownNpcs/Miner";
}
}
public override string[] AltTextures
{
get
{
return new[] { "AntiAnnoying/TownNpcs/Miner_Alt_1" };
}
}
public override bool Autoload(ref string name)
{
name = "Miner";
return mod.Properties.Autoload;
}
public override void SetChatButtons(ref string button, ref string button2)
{
button = Language.GetTextValue("LegacyInterface.28");
}
public override void OnChatButtonClicked(bool firstButton, ref bool shop)
{
if(firstButton)
{
shop = true;
}
}
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Miner");
NPCID.Sets.AttackFrameCount[npc.type] = 1;
Main.npcFrameCount[npc.type] = 4;
NPCID.Sets.DangerDetectRange[npc.type] = 500;
NPCID.Sets.AttackType[npc.type] = 0;
NPCID.Sets.AttackTime[npc.type] = 45;
NPCID.Sets.HatOffsetY[npc.type] = -4;
}
public override void SetDefaults()
{
npc.townNPC = true;
npc.friendly = true;
npc.width = 40;
npc.height = 64;
npc.aiStyle = 7;
npc.damage = 13;
npc.defense = 10;
npc.lifeMax = 250;
npc.HitSound = SoundID.NPCHit1;
npc.DeathSound = SoundID.NPCDeath1;
npc.knockBackResist = 0.5f;
animationType = NPCID.Guide;
}
public override bool CanTownNPCSpawn(int numTownNPCs, int money)
{
return numTownNPCs > 3 & NPC.downedBoss1;
}
public override string TownNPCName()
{
switch(WorldGen.genRand.Next(6))
{
case 0:
return "James";
case 1:
return "Jake";
case 2:
return "Frank";
case 3:
return "Jordan";
case 4:
return "Will";
default:
return "Sean";
}
}
public override void TownNPCAttackStrength(ref int damage, ref float knockback)
{
if (!Main.hardMode)
{
damage = 10;
}
if (!NPC.downedMoonlord && Main.hardMode)
{
damage = 25;
}
if (NPC.downedMoonlord)
{
damage = 100;
}
knockback = 8f;
}
public override void TownNPCAttackProj(ref int projType, ref int attackDelay)
{
projType = ProjectileID.CobaltDrill;
attackDelay = 1;
}
public override void TownNPCAttackProjSpeed(ref float multiplier, ref float gravityCorrection, ref float randomOffset)
{
multiplier = 12f;
randomOffset = 1;
}
public override void TownNPCAttackCooldown(ref int cooldown, ref int randExtraCooldown)
{
cooldown = 10;
randExtraCooldown = 3;
}
public override string GetChat()
{
switch(Main.rand.Next(4))
{
case 0:
return "I've been minin for years but ya gotta prove yourself for some of the ores I've collected";
case 1:
return "FREE LUMINITE FOR EVERYONE... Except you";
case 2:
return "Mah prices are so low for the value of these things";
case 3:
return "Hum De Dumm Dumm De Humm Oh, You Buy Some Try some sment some now these are ores that you cant miss!";
default:
return "Hello Want Some Ore!";
}
}
public override void SetupShop(Chest shop, ref int nextSlot)
{
shop.item[nextSlot].SetDefaults(ItemID.CopperOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.SilverOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.IronOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.LeadOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.TinOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.TungstenOre);
if(NPC.downedBoss3)
{
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.PlatinumOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.GoldOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.Meteorite);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.DemoniteOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.CrimtaneOre);
}
if(Main.hardMode == true)
{
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.Hellstone);
}
if(NPC.downedMechBossAny)
{
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.CobaltOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.PalladiumOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.MythrilOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.OrichalcumBar);
}
if(NPC.downedMechBoss1 & NPC.downedMechBoss2 & NPC.downedMechBoss3)
{
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.TitaniumOre);
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.Meteorite);
}
if (NPC.downedGolemBoss)
{
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.ChlorophyteOre);
}
if (NPC.downedMoonlord)
{
nextSlot++;
shop.item[nextSlot].SetDefaults(ItemID.LunarOre);
}
nextSlot++;
}
public override void NPCLoot()
{
Item.NewItem(npc.getRect(), ItemID.PlatinumPickaxe);
}
Last edited: