tModLoader npc id problem

lich_king

Plantera
hello, I am having problems with putting npc ids into aistyle and aitype. I have looked them up and they don't work also tried looking at the number they bring up when you hover over the id but it still doesn't work. also one last thing I was trying to use the ai of the cursed hammer.
 
If you decompile the terraria source code (there is a guide on the tmodloader wiki for it) you will come across this:
Code:
else if (this.type == 83) //NPCID.CursedHammer
{
    this.width = 40;
    this.height = 40;
    this.aiStyle = 23;
    this.damage = 80;
    this.defense = 18;
    this.lifeMax = 200;
    this.HitSound = SoundID.NPCHit4;
    this.DeathSound = SoundID.NPCDeath6;
    this.value = 1000f;
    this.buffImmune[20] = true;
    this.buffImmune[24] = true;
    this.buffImmune[39] = true;
    this.knockBackResist = 0.4f;
}

In your ModNPC code, write it like this:
Code:
npc.aiStyle = 23;
animationType = NPCID.CursedHammer;
aiType = NPCID.CursedHammer;
 
Back
Top Bottom