tModLoader How do I make a shimmering debuff that goes up?

Benskylark

Terrarian
After I'm done releasing the mod I'm currently working on, I would like to take a short break and work on "Another Generic Items Mod", another project that has not been started.
One idea I had for it was to make a potion that grants you the shimmering debuff, kinda like Ascend from TOTK. However, I have no clue on how to make one. I'll start with one that goes up, that would stop when you're in space to prevent passing the border. Any ideas on how to do this?
 
if you just want to apply the shimmering debuff as it is, then "Item.buffType = BuffID.Shimmering;" should be good enough. also make sure to clarify the length of the applied buff as well. "Item.buffTime = 300;" will apply it for 5 seconds, just multiply however many seconds you want to apply it for 60, because buffTime is based off of game ticks

however, if you're trying to make a different debuff that has a similar effect, i would check the source code for "distorted" as that debuff actually will cause you to go upwards at certain points in the world. how you would actually do that though, i'm not sure, i've never looked into terraria's source code. also, instead of "Item.buffType = BuffID.Shimmering;", it should be "Item.buffType = ModContent.BuffType<Buffs.whateverthebuffiscalledgoeshere>();" if this is the case. the gravitation buff also returns gravity to normal when getting to the top of the world, so that debuff might be worth checking out too.
 
if you just want to apply the shimmering debuff as it is, then "Item.buffType = BuffID.Shimmering;" should be good enough. also make sure to clarify the length of the applied buff as well. "Item.buffTime = 300;" will apply it for 5 seconds, just multiply however many seconds you want to apply it for 60, because buffTime is based off of game ticks

however, if you're trying to make a different debuff that has a similar effect, i would check the source code for "distorted" as that debuff actually will cause you to go upwards at certain points in the world. how you would actually do that though, i'm not sure, i've never looked into terraria's source code. also, instead of "Item.buffType = BuffID.Shimmering;", it should be "Item.buffType = ModContent.BuffType<Buffs.whateverthebuffiscalledgoeshere>();" if this is the case. the gravitation buff also returns gravity to normal when getting to the top of the world, so that debuff might be worth checking out too.
Thanks. I don't know how to decompile terraria, but I'll figure it out. That's what I always do.
 
Back
Top Bottom