1.4.3 tModLoader help

Kadamo

Terrarian
I'm trying to create a HotPocket that grants the "On Fire" debuff and "Well Fed". How would I make this into a food item, and how would I grant the buffs?

Even a simple potion code example would help, as I'm new to modding, and it will help me learn.
 
You can make a simple consumable like this example potion, and give it the Well Fed buff - ExamplePotion
Then you can add the On Fire debuff by adding something like this below. Note, I haven't tested this code myself.
Code:
        public override void OnConsumeItem(Player player)
        {
            player.AddBuff(BuffID.OnFire, 3600);
        }
 
You can make a simple consumable like this example potion, and give it the Well Fed buff - ExamplePotion
Then you can add the On Fire debuff by adding something like this below. Note, I haven't tested this code myself.
Code:
        public override void OnConsumeItem(Player player)
        {
            player.AddBuff(BuffID.OnFire, 3600);
        }
Worked fine, Thanks!
 
Last edited:
Back
Top Bottom