Making States Do A Variable Amount of Damage

Hello all! This one requires a bit of explaining;

I have a Pyromancer class in my game that focuses solely on dealing damage and causing the burn state. However, I wanted to implement a specific mechanic in order to make it slightly more interesting: Flame Counters.

Some skills add "Flame Counters" to the user. I have these Flame Counters set as a variable, and the skills that add them marked with a common event that adds one to the "Flame-Counters" variable (the common event is also set to display how many total counters the user now has each time they gain one).

I would like for the 'Burn' state to deal more damage depending on the amount of Flame-Counters the user has. Normally, if it were a skill rather than a state, I would put something like <\V[1] * 2> in the formula section, therefore dealing the variable's damage (times two in this case, but that's just an example) at the end of each turn that the target is inflicted with the 'burn' state.

However, because it is not a skill and is a state instead, the only way I can make it deal damage every turn is by adding a negative HP Regeneration trait, but this does not cut it. Is there any way to make a state cause a variable's amount of damage like you can with a skill?

Thanks!
I believe this can be done by using a couple of Yanfly's Plugins. They can be found here:
http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/
http://yanfly.moe/2017/04/07/yep-131-extended-damage-over-time-rpg-maker-mv/

With the extended damage over time plugin, you can use damage formulas for states such as your Burn state. One of the examples of the page is:
<DoT Formula: a.mat * 2> // Damage HP equal to the origin’s MAT

If I am not mistaken, you can also use variables for the damage formula, such as:
<DoT Formula: v[10] * 2>// Damage HP equal to 2 * variable 10.

Hope this is of some help =^_^=!
Thank you so much! It worked perfectly!
Glad it was helpful. It is absolutely amazing how much just one or two plugins can help you achieve what you are after.
It is! I tried messing with events, making variables and even flat-out scripting for hours to no avail. But solved the whole problem in a matter of minutes with one plugin, thanks to you!
Just wanted to chime in that this script: https://ellyeblog.wordpress.com/tag/ellyes-states-damage/ has more functionality than Yanfly's. I used it in one of my projects without issue.
I really like the idea of using counters. Might try to implement something like that in my current project.
If you know a little bit of javascript, you can use just Yanfly's Buffs&States core to do all sorts of great stuff, for example:
<Custom Regenerate Effect>
var damage = Math.ceil(((user.mhp*015+ $gameVariables.value(5))/(1+(user.def/200)))*(0.8 + (Math.random()*0.4)));
user.startAnimation(290);
user.gainHp(-damage);
user.startDamagePopup();
user.clearResult();
}
</Custom Regenerate Effect>

What that is doing is dealing damage over time equal to 15% of the target's HP plus whatever is stored in Variable #5 and then, at the end of it, adding a 20% variance to the damage it deals. With this code, it's also playing an animation when it deals damage.
Unfortunately, I'm using Lecode's TBS script and that crashes it.
So does ellyestatesdamage.
And Yanfly's Extended DOTs doesn't give a popup at all. In addition to not having MP HOTs and DOTs.

Original thread: https://forums.rpgmakerweb.com/threads/making-states-do-a-variable-amount-of-damage.105958/