tModLoader Anti-Annoying Mod

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)

New Piskel-1.png (6).png


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:
So basically an npc for ores? where is the downlaod link for mod? what about the sprites themselves? have you even made sure no one else has done this before??
 
I Dont Really Know Its Just That I Wanted To Fix Something That Really Annoyed Me.
So basically an npc for ores? where is the downlaod link for mod? what about the sprites themselves? have you even made sure no one else has done this before??
I had To Rename The Mod Because The Other Name Was Taken :(
 
I think, Thorium's blacksmith does something similar too, and probably some other modded NPCs too, but I guess, in case someone wants and NPC like this, but doesn't have those mods, this sounds good too.

I'm kinda curious how this NPC looks like though, so a sprite and/or screenshot probably would be nice - in general, people are more likely to check it out, if they know how it looks like. I think.
Also, the ore progression sounds balanced, but wondering about the prices. Ah, and, if it's actually ores, or bars, since ores have more use.
 
I think, Thorium's blacksmith does something similar too, and probably some other modded NPCs too, but I guess, in case someone wants and NPC like this, but doesn't have those mods, this sounds good too.

I'm kinda curious how this NPC looks like though, so a sprite and/or screenshot probably would be nice - in general, people are more likely to check it out, if they know how it looks like. I think.
Also, the ore progression sounds balanced, but wondering about the prices. Ah, and, if it's actually ores, or bars, since ores have more use.
Better Now?
 
I think, Thorium's blacksmith does something similar too, and probably some other modded NPCs too, but I guess, in case someone wants and NPC like this, but doesn't have those mods, this sounds good too.

I'm kinda curious how this NPC looks like though, so a sprite and/or screenshot probably would be nice - in general, people are more likely to check it out, if they know how it looks like. I think.
Also, the ore progression sounds balanced, but wondering about the prices. Ah, and, if it's actually ores, or bars, since ores have more use.
Oh And Did You Make The WackyNPC Mod, Your Drawing Kind Of Made Me Think So...
 
I think, Thorium's blacksmith does something similar too, and probably some other modded NPCs too, but I guess, in case someone wants and NPC like this, but doesn't have those mods, this sounds good too.

I'm kinda curious how this NPC looks like though, so a sprite and/or screenshot probably would be nice - in general, people are more likely to check it out, if they know how it looks like. I think.
Also, the ore progression sounds balanced, but wondering about the prices. Ah, and, if it's actually ores, or bars, since ores have more use.
Thank, I should Have clarified that earlier
 
Why the multi-post though?

Well, I meant, a sprite how the NPC would look like. I suppose that doodle is better than nothing, but it doesn't really takes long - I think - to put a basic design together, simply using vanilla armor and such. A super standard looks for a miner would be full mining armor. if it's a guy, maybe add some facial hair to make it look a bit more unique, and that could do for standard, I guess - but making the full spritesheet is more a pain than that XD lol, since town NPCs have lots of sprites on their spritesheets.

By the way, yes, Wacky NPCs is my mod. Do you know it?
Also, yeah, I have some clumsy doodles too XD
 
Why the multi-post though?

Well, I meant, a sprite how the NPC would look like. I suppose that doodle is better than nothing, but it doesn't really takes long - I think - to put a basic design together, simply using vanilla armor and such. A super standard looks for a miner would be full mining armor. if it's a guy, maybe add some facial hair to make it look a bit more unique, and that could do for standard, I guess - but making the full spritesheet is more a pain than that XD lol, since town NPCs have lots of sprites on their spritesheets.

By the way, yes, Wacky NPCs is my mod. Do you know it?
Also, yeah, I have some clumsy doodles too XD
Sorry about the multipost :( Its just that I post my reply and then look at your link of the clumsy drawing and then another Idea pops into my head.
And I Am Definitely Not On Board With Graphics, There So Hard To Make, I always make sure that it actually functions correctly instead of worrying about the graphics.
 
Hey so what's the point of this mod?
And instead of making some random ugly :red: sprite, why didn't you just copy a sprite from another NPC???

A ton of mods already have a similar NPC too, so I'm really failing to understand why this mod even exists.
 
Back
Top Bottom