How to target enemy based on their position

For my current project, I am trying to make some damage over time skills. I figured the best why I could do what I want is by having let's say three variables that in the battle event area will modify the enemy's HP overtime, and then skills will increase or decrease the variables to deal damage or heal overtime. The problem I am having is that for my method to work, I would need the skills that deal damage overtime to be able to change a certain variable based on the enemy's position.
So if there is: Goblin A, Goblin B, Goblin C, and variable [1] is for Goblin A, [2] for B, and [3] for C.
If Poison skill is targeting Goblin B, it will check where Goblin B is, find that it is the second monster, and then increase variable [2] to make it take damage.

The reason why I am doing this convoluted process for damage overtimes is because I want HP regen and DOT to be connected, easily stackable and modifiable.
The reason why I am doing this convoluted process for damage overtimes is because I want HP regen and DOT to be connected, easily stackable and modifiable.
I think you'd be able to do that much more easily via a plugin that allows you to put notetags on the states you're applying than trying to do it through...a troop event? I'm guessing? That is kinda guessing at the enemy based upon location and isn't actually doing things during the regeneration phase.

You could use my Eval Tags plugin as a lightweight option, or VisuStella's Skills & States Core for a more robust feature set.
You could use my Eval Tags plugin as a lightweight option, or VisuStella's Skills & States Core for a more robust feature set.
Visu's Skill and State Core did the trick. Because I didn't need to use luck for my project, I'm going with giving all units a state that makes them take damage based on their Luck. They start out with 0 "Luck" and then I have poison or regen skills modify their luck (There was a plugin I found that was really nice for adding flat numbers to stats but rpg maker central is currently down so I can't access it.)
Great!

You could also just add a property to the battler and manipulate it with skills or states.

For example, an apply tag on a state could say something like
Code:
// variable will keep its existing value, or start at 0
target.dotValue??=0;
// add 50 to it
target.dotValue += 50;

Then your slip damage calculation references user.dotValue in its formula.
I got your method to work, though for some reason I needed to put "<JS Slip Refresh>" in between the add state and slip damage or else the poison wouldn't do damage unless you apply it twice.
for some reason I needed to put "<JS Slip Refresh>"
It's not really "for some reason" - it's stated pretty clearly in the documentation 😛

1707198668220.png


Glad you got it working how you want.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-target-enemy-based-on-their-position.165335/