Custom worm boss help

MrPlague

Steampunker
Hello,

I've been trying to make a custom worm boss, but I'm no good at coding and can only sprite.
All of Alon37's tutorials are outdated, and no longer work.
If I could get some source code for a basic worm boss to get me started, that would be wonderful.

Thanks in advance!
 
The ExampleMod is open source on github and even has a modded worm enemy. I highly reccommend using it and it's worked quite well for my boss, the Chaos Reaver. Make most of your changes to your head, like your music, boss tag, etc, this is what my worm head defaults looks like :

Code:
        public override void SetDefaults()
        {
            npc.CloneDefaults(NPCID.DiggerHead);
            npc.width = 105;
            npc.height = 123;
            npc.aiStyle = -1;
            npc.boss = true;
            npc.lifeMax = 30000;
            npc.damage = 100;
            npc.defense = 25;
            npc.lavaImmune = true;
            music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Boss1");
            bossBag = mod.ItemType("ReaverBag");
            npc.value = Item.buyPrice(0, 1, 75, 0);
        }
 
No problem, I'm pretty inexperienced myself, my only other coding experience was with minecraft and roblox lol, but if you have any other questions im here to help
 
I am also trying to create a modded worm boss, but the worm boss code on the example mod github does not work for me, and I cannot seem to figure out how to make it work, I know only basic code for weapons, and I want to make a worm boss npc but no matter how hard I try, I cannot get the ExampleMod stuff to work. How do I do this thing?
 
The ExampleMod is open source on github and even has a modded worm enemy. I highly reccommend using it and it's worked quite well for my boss, the Chaos Reaver. Make most of your changes to your head, like your music, boss tag, etc, this is what my worm head defaults looks like :

Code:
        public override void SetDefaults()
        {
            npc.CloneDefaults(NPCID.DiggerHead);
            npc.width = 105;
            npc.height = 123;
            npc.aiStyle = -1;
            npc.boss = true;
            npc.lifeMax = 30000;
            npc.damage = 100;
            npc.defense = 25;
            npc.lavaImmune = true;
            music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Boss1");
            bossBag = mod.ItemType("ReaverBag");
            npc.value = Item.buyPrice(0, 1, 75, 0);
        }
How to use Custom texture? i am new in tModLoader.
 
How to use Custom texture? i am new in tModLoader.
I wouldn't recommend trying to create a worm style NPC if you are new to tModLoader- especially using a tutorial as old as this, which I had to modify quite a bit to make it work with today's methods; although if you feel like you are ready for something a bit more advanced, go ahead and try it out!

That being said, I would recommend downloading a good, safe vanilla Terraria spritesheet pack.
They may seem like a bit much to handle at the start, but it is very very useful for creating your own animated sprites and for recognizing what AI and animation bases to use.

For instance, all worm type NPCs use three custom textures with one for the head, one for the body and one for the tail.

They are called in the individual internal classes ExampleWormHead ExampleWormBody and ExampleWormTail. These internal classes are essentially just a way of putting all three individual worm segments (head, body, tail) inside of one file to make organization easier.

Also keep in mind that in order to use the custom textures for head body and tail, the class names ExampleWormHead ExampleWormBody and ExampleWormTail must match the names of the textures. So do the names on lines 91, 92 and 93.

You will also need to remove the lines that say
public override string Texture => "Terraria/NPC_" + NPCID.DiggerHead;
at the beginning of each ExampleWorm internal class, as these are just placeholders that use the preexisting Terraria texture for the Digger.
Note: completely remove these lines to use your custom textures instead of trying to modify them.

I know this is a bit late to post something like this, but I hope that it can be useful for other users :)
 
Last edited:
I wouldn't recommend trying to create a worm style NPC if you are new to tModLoader- especially using a tutorial as old as this, which I had to modify quite a bit to make it work with today's methods; although if you feel like you are ready for something a bit more advanced, go ahead and try it out!

That being said, I would recommend downloading a good, safe vanilla Terraria spritesheet pack.
They may seem like a bit much to handle at the start, but it is very very useful for creating your own animated sprites and for recognizing what AI and animation bases to use.

For instance, all worm type NPCs use three custom textures with one for the head, one for the body and one for the tail.

They are called in the individual internal classes ExampleWormHead ExampleWormBody and ExampleWormTail. These internal classes are essentially just a way of putting all three individual worm segments (head, body, tail) inside of one file to make organization easier.

Also keep in mind that in order to use the custom textures for head body and tail, the class names ExampleWormHead ExampleWormBody and ExampleWormTail must match the names of the textures. So do the names on lines 91, 92 and 93.

You will also need to remove the lines that say
public override string Texture => "Terraria/NPC_" + NPCID.DiggerHead;
at the beginning of each ExampleWorm internal class, as these are just placeholders that use the preexisting Terraria texture for the Digger.
Note: completely remove these lines to use your custom textures instead of trying to modify them.

I know this is a bit late to post something like this, but I hope that it can be useful for other users :)
Thank you so much. :)
 
Back
Top Bottom