RMMV How to create DOT effects from skills.

I think this will be easier to explain if I mentioned the ability I am trying to create. In my RPG I am trying to add a "beartrap" ability that not only damages enemies upon activation, but applies a damage over time effect. The first part was easy but now I need to figure out how to create an event that damages the enemy targeted by the effect.

Some other things to note:

>The ability targets three random enemies. It could potentially use states to target all three enemies, but the conditional branch option requires you to pick a SPECIFIC enemy (and as you can see in the picture below I decided against that and used a "target" variable but that probably wouldn't work the way I wanted it to,) and so do a lot of the combat commands.

>I am not that good at javascript or anything of the sort, not much to say there outside of asking that you keep it simple because I am a bit of an idiot.

>This would also be useful for other DOT abilities I may make in the future.




As you can see here I have the beartrap event I created to facilitate this, feel free to judge it because I don't even think it's going to work let alone do what I want it to do.
1689386041055.png


If anybody could help me with this then that would be great... This is kind of my first game made in RPGmaker so it might not be that good.
Well, first of all, you start a loop, that never ends. As soon as you trigger that common event, you game will freeze and your CPU will go nuts, trying to run that loop as many times as it can per second.

But that whole common event doesnt do what you seem to think it does. And it is not entirely clear what you want to do with that.

You want to target 1 specific enemy, and want it to effect 3 enemies over time?

Then first we make the state, that does DOT. For an example of how to do this, liok at the poison state. Set the amount of turns you want it to last.

If you want to have these enemies to not be able to attack when trapped, then choose "cannot move" in the restrictions.

Now we make a skill that targets 3 random enemies, and it doesnt do damage, but only adds the state to the targets. Make sure the actors can never learn this spell by themselves.

Next, we make a common event, that forces the actor to cast this spell. Just 1 command that says: force skill X on actor Y.

Finally we make a second skill, this one is the one you teach to your actor. Give it a damage formula for the damage you want it to do, to the target. Then make it trigger the common event we just made.

Now the skill should damage the target, then force a new attack that gives 3 random enemies the DOT for the amount of turns you have set up.

Hope that helps.
You can do this with a couple of free Yanfly plugins. This article demonstrates how:

You want to target 1 specific enemy, and want it to effect 3 enemies over time?
No I want it to target THREE enemies and damage them over time. Your suggestion kinda goes under this assumption so I'm sorry if I wasn't clear enough. I stated that the conditional branch in the common events (which I assumed was the proper way to do this so that's kinda on me) doesn't allow you to select more than one enemy and I think that's where the confusion started.

Then first we make the state, that does DOT. For an example of how to do this, liok at the poison state. Set the amount of turns you want it to last.
I thought that poison only negated healing but then I looked at it again and yeah I see how it damages enemies. That actually helps a lot and is much simpler than what I had in mind. Thank you.
Poison does negative health regeneration, which means it does samage over time, which is the opposite of health regeneration.

So -10% hp regen, means you take 10% damage each turn.

Original thread: https://forums.rpgmakerweb.com/threads/rmmv-how-to-create-dot-effects-from-skills.159333/