Stacking Buff for a Boss

Hey, newbie game dev here! I'm trying to create a soft enrage for a boss I'm designing, and for it to work I need to make a buff that can stack infinitely. The idea being that once a certain number of turns passes the boss will begin to cycle between a big aoe and a stacking buff that will make the aoe hit harder and harder until it completely outpaces the player's healing.

Thing is, I'm still learning the engine and don't know what I need to make something like this work. Looking online I see people posting code for a stacking state but I don't even know where that code should go or what, if any, plugins I need to run it. If someone could walk me through it that would be a big help. Thanks!
A tip, to help your description have more clarity - in RPG Maker, a buff and a state are two different things.

Buffs (and debuffs) are not listed under States in your database. They apply to a specific parameter and have a predefined effect, last a predetermined time, and they already innately stack up to three in either direction (that is, a total of 3 buffing or 3 debuffing).

States work differently with a wider range of effects, a random (or no) duration, and do not stack.

You would use a plugin that can execute code when a state is applied - if you don't already have anything, you can use my Eval Tags, linked in my signature; if you're using any VisuStella plugins, you'd use their Skills and States Core.

Using my Eval Tags, you would put the notetag in the state that the boss is giving to itself
Code:
<State Apply Eval>
user.enrage ??= 0;
user.enrage++;
</State Apply Eval>

Then, in the damage formula for the skill, you can reference a.enrage as a multiplier or whatever.

You just want to make sure the state is applied before the AoE is used the first time, so that the enrage property has a value.
alternatively, you could use a turn 0 troop event to set some variable to 0, attach a common event to the buff skill to increase the variable by some amount, and then use that variable somewhere in your damage formula for the aoe. it wouldnt need a plugin
What @Robro33 said is totally a more newbie-friendly way to do it without using a plugin.

Sometimes I forget to consider the built in options 🤣
A tip, to help your description have more clarity - in RPG Maker, a buff and a state are two different things.

Buffs (and debuffs) are not listed under States in your database. They apply to a specific parameter and have a predefined effect, last a predetermined time, and they already innately stack up to three in either direction (that is, a total of 3 buffing or 3 debuffing).

States work differently with a wider range of effects, a random (or no) duration, and do not stack.

You would use a plugin that can execute code when a state is applied - if you don't already have anything, you can use my Eval Tags, linked in my signature; if you're using any VisuStella plugins, you'd use their Skills and States Core.

Using my Eval Tags, you would put the notetag in the state that the boss is giving to itself
Code:
<State Apply Eval>
user.enrage ??= 0;
user.enrage++;
</State Apply Eval>

Then, in the damage formula for the skill, you can reference a.enrage as a multiplier or whatever.

You just want to make sure the state is applied before the AoE is used the first time, so that the enrage property has a value.
Thanks! And you're right. I forgot that "buffs" are their own thing in the engine. I'll try to be more clear in the future.

alternatively, you could use a turn 0 troop event to set some variable to 0, attach a common event to the buff skill to increase the variable by some amount, and then use that variable somewhere in your damage formula for the aoe. it wouldnt need a plugin
I didn't know variables could be used in damage calculation like that. What's the format for calling a variable in a formula? Is it the same as calling it in a text box?

edit: I answered my own question here after messing around. Thanks for the advice!

Original thread: https://forums.rpgmakerweb.com/threads/stacking-buff-for-a-boss.173234/