Status damage

hello everyone. I want to make an attack that applies a state for example, burned. But I would like the damage it does each turn to be based on some stat of the character performing the skill. For example, character X uses the ability to burn the enemy and for 3 turns, he will lose life based on the character's magic attack. I've explained? used rpg maker mv
not possible by default, you'll need a plugin for that.
And even with a plugin this is not easy, because you need to store variable damage that is not connected to the target.
youll have to use either yanfly's buff and states plugin (free) to make a state that deals damage based on the origin's stats (or some other value) at the end of every turn, or yanfly's ex dots plugin (paid iirc) and use the notetags to do it. the dot plugin is made specifically for it, simplifies making them, and requires the buff plugin, but you can just make them through the buffs and states plugin
Using Buffs & States Core (YEP) this isn't too complicating to set up.

If the Skill is exclusive to one character you can simply do this:
JavaScript:
<Custom Turn End Effect>
 user.gainHp(-$gameActors.actor(1).mat);
 user.startDamagePopup();
</Custom Turn End Effect>

However, if the Skill is not exclusive, then yeah, there's quite a bit more to do. I won't go into all that unless that's specifically what you need. I really hope that's not what you need. 😛
Using Buffs & States Core (YEP) this isn't too complicating to set up.

If the Skill is exclusive to one character you can simply do this:
JavaScript:
<Custom Turn End Effect>
 user.gainHp(-$gameActors.actor(1).mat);
 user.startDamagePopup();
</Custom Turn End Effect>

However, if the Skill is not exclusive, then yeah, there's quite a bit more to do. I won't go into all that unless that's specifically what you need. I really hope that's not what you need. 😛
You can use origin to refer to the one who applied the state and turn it to this
JavaScript:
<Custom Turn End Effect>
user.gainHp(-origin.mat);
user.startDamagePopup();
</Custom Turn End Effect>
and thatll work regardless of what actor uses it or if the user is even an actor.

the major simplifications that i was talking about were not having to add a few lines to make sure that if hp hits 0, the target dies, and not having to add the startDamagePopup(). theres a few timings the plugin provides that wont automatically kill a battler if they hit 0 hp, and the dot plugin automatically causes a damage popup when a dot deals damage through it
Using Buffs & States Core (YEP) this isn't too complicating to set up.

If the Skill is exclusive to one character you can simply do this:
JavaScript:
<Custom Turn End Effect>
 user.gainHp(-$gameActors.actor(1).mat);
 user.startDamagePopup();
</Custom Turn End Effect>

However, if the Skill is not exclusive, then yeah, there's quite a bit more to do. I won't go into all that unless that's specifically what you need. I really hope that's not what you need. 😛
Thank you very much for the help, I want it to make specific character abilities, but I don't know where I have to put that formula and what I have to change to make the damage done based on attack, for example
Thank you very much for the help, I want it to make specific character abilities, but I don't know where I have to put that formula and what I have to change to make the damage done based on attack, for example
everything between the brackets following user.gainHp()
Code:
user.gainHp("the stuff in here")
is going to be your damage "formula" for the state. So any changes you want to make to its damage output, you do it there. to change it from using the source's mat stat to their atk stat, you just change origin.mat to origin.atk. Just remember that the function by default adds hp, so if you want it to do damage, you have to give it a negative number

JavaScript:
<Custom Turn End Effect>
user.gainHp(-origin.atk);
user.startDamagePopup();
</Custom Turn End Effect>
this goes into the notebox for your state.

Original thread: https://forums.rpgmakerweb.com/threads/status-damage.162235/