How Do I make status effects?

So I am making an ATLA open world rpg. I have decided to add status effects (inspired by arcane odessy). My problem is how can I set them, and have them stack. I also want to know how can different elements clear a status. For example:

If a firebender hits you, you get the “Burning” status. That does DOT. If an airbender then hits you WHILE you have the status, it will clear it and the attack will do 10% less damage. Each status has nerfs and buffs for different elements.

Some stun you, whilst others do damage over time, and some only give buffs / debuffs to other elements.

I do not know where to start. Please help me.

This type of system could be done in literally a million different ways, and its best to make your own system rather than have someone else write one for you.

1 Like

I’m not asking someone to write the code for me, I am asking where do I start. How do I make my own system if I have no earthly idea where to start?

Start by creating a table to handle the different status effects. Then when a new effect is applied, run through the table of current active effects and see if any counteract/enhance the current effect. Then do the damage/buff from the new effect and add it to the table. When status effects run out, remove them from the table.

3 Likes

I don’t mean code, I mean exactly what EpicJab just did for you, he gave you the base idea which is often limiting to that of which you could of came up with yourself.

2 Likes

Hey wait a minute, Riko said they wanted help. I am in no way telling Riko that they have to do it my way. I’m just giving them an idea of how to, which is what they were asking for. I’m not limiting them.

3 Likes

Thank you! You have given me an idea:

I would have a module that would list all the effects as well as the buffs + debuffs, and their type (stun, dot, etc)
I would then reference that module when I am attacking, checking in a table. If they have an effect then I will either cancel it or alter it

1 Like

You should try using that in addition to attributes. And use attribute change functions to detect when they change so you can cancel them etc.

1 Like