MV Make enemy always target self.

I want it so that whenever an enemy uses an action that can target an ally, it always picks itself.

what is the simplest way of doing this?
we need more information to help you.

because the basic solution would be to only give that enemy those skills that target the user. That way it will always only target itself.
make copies of the skills for enemies to use that are slightly different then the versions the player can use
make copies of the skills for enemies to use that are slightly different then the versions the player can use
making an enemy specific version is the solution i am currently using.

But since this means creating over 60 extra moves i have to remember to update whenever i change the base move, i was hoping for a more elegant solution...

we need more information to help you.

because the basic solution would be to only give that enemy those skills that target the user. That way it will always only target itself.
changing the scope from "1 ally" to "the user" is what i want. but i was hoping for some code to do it automatically.

As i have 300 moves, it is impractical to make that many redundant moves and keep them updated whenever i change the base move...
But since this means creating over 60 extra moves i have to remember to update whenever i change the base move, i was hoping for a more elegant solution...
edits like that are just going to get worse and worse the farther along in making the game you are. that why i make full database before i even begin on actually making the game.
the only thing in the database i end up changing after i start actually making maps and storyline is just monster/equipment stats because couldn't perfect those until actually play through to that point.

changing formulas or ID orders can easily break half developed games.

edit: my spreadsheets for pre-determining stats has evolved over the years so dont even end up altering those anywhere near as much nowadays.
Id suggest going with the target user versions too. Anything else would require special coding of the enemy targeting system and anyone who does this would have to know your plug-ins.

However I doubt you would need 300 enemy specific ones as if all your enemies use skills on themselves it will get boring fast. Just make the few you need. My last game I had about 900 skills and only had to make like 20 enemy specific ones for the few that I wanted self targeting only on.
What i would like is help finding what code i would need to change to make the battle manager read a different scope when handling troop actions
doesn't work that way, beause skill execution is the same for both actor and enemy.
a simple change there would result in the same effect on actors as well.

the programming would have to be more complex and branch the skill execution, and in my opinion you're unlikely to get that as a free plugin for several reasons.
Can you give some context on why the enemy would do that? I'm thinking if it's set off by a confusion state, then I can edit my confusion plugin to exhibit this behavior. Then if needed, you could use an auto passive plugin to give that state to that enemy. Thoughts?
Can you give some context on why the enemy would do that? I'm thinking if it's set off by a confusion state, then I can edit my confusion plugin to exhibit this behavior. Then if needed, you could use an auto passive plugin to give that state to that enemy. Thoughts?
The most common scenario is when the monster is using a move that heals or buffs "1 ally" i want it to always pick itself.

So no the confusion solution wouldn't help...

doesn't work that way, beause skill execution is the same for both actor and enemy.
a simple change there would result in the same effect on actors as well.

the programming would have to be more complex and branch the skill execution, and in my opinion you're unlikely to get that as a free plugin for several reasons.
Ah, I see the extent of the issue. I will probably be stuck with making a list of enemy specific versions of the move.
The most common scenario is when the monster is using a move that heals or buffs "1 ally" i want it to always pick itself.

So no the confusion solution wouldn't help...
*Roars in Mufasa* Is that a challenge?!

I'll see what I can do.

So, you want an enemy to have access to target ally skills that other enemies have, but want that particular enemy to ONLY target themselves.
And they will ALWAYS exhibit this behavior.

Is that right?
*Roars in Mufasa* Is that a challenge?!

I'll see what I can do.

So, you want an enemy to have access to target ally skills that other enemies have, but want that particular enemy to ONLY target themselves.
And they will ALWAYS exhibit this behavior.

Is that right?
It is simpler than that, I want a move that both player characters and monsters can use.

When a player uses it, the scope is "one ally" but when a monster uses the skill, they always pick themself
changing the scope from "1 ally" to "the user" is what i want. but i was hoping for some code to do it automatically.

As i have 300 moves, it is impractical to make that many redundant moves and keep them updated whenever i change the base move...
This just sounds so weird. Your enemies have 300 skills with a scope of 1 Ally? That sounds like it has to be overkill, I can't even fathom why you would need so many.

Regardless, the solution to this is pretty trivial, so I don't know why no one has suggested it. You need Yanfly's Selection Core (which requires his Battle Engine Core and Target Core) - it's a part of the $10 battle bundle.

Then you'd put the following notetag in your ally-targeting skills:
Code:
<Custom Select Condition>
if (user.isActor())
    condition=target.isActor();
else
   condition=target==user;
</Custom Select Condition>
Got it. I'll see what I can script as time allows.
This just sounds so weird. Your enemies have 300 skills with a scope of 1 Ally? That sounds like it has to be overkill, I can't even fathom why you would need so many.

Regardless, the solution to this is pretty trivial, so I don't know why no one has suggested it. You need Yanfly's Selection Core (which requires his Battle Engine Core and Target Core) - it's a part of the $10 battle bundle.

Then you'd put the following notetag in your ally-targeting skills:
Code:
<Custom Select Condition>
if (user.isActor())
    condition=target.isActor();
else
   condition=target==user;
</Custom Select Condition>
From what i understand the Battle Engine Core only works and side view and would change so many other things about my game, it would be impractical to implement at this stage...
From what i understand the Battle Engine Core only works and side view and would change so many other things about my game, it would be impractical to implement at this stage...
Nothing in the Battle Engine Core documentation says you're required to use side view. Several of the features it offers are only relevant there, but as far as I can read, you're free to stick to front view. And everything else in it is pretty modular, you're not required to turn on features you don't want.
Nothing in the Battle Engine Core documentation says you're required to use side view. Several of the features it offers are only relevant there, but as far as I can read, you're free to stick to front view. And everything else in it is pretty modular, you're not required to turn on features you don't want.
I'll attempt it, it just feels like overkill.

I'll let you know if it worked
I'll attempt it, it just feels like overkill.

I'll let you know if it worked
Well, it's something that already exists, as opposed to asking/waiting on other people to write it for you. It also offers a lot of other functionality that you might find use for (making AoE targeting, making skills and items that cure status ailments and automatically target players with those statuses, finishing skills that can only be used on enemies under a certain percentage health, etc.).

So, might be overkill, might be inspiration.
All done!

Please find the plugin HERE.

Directions: Just tag a skill with <selfishSkill> and enemy that uses this skill will only target itself.

This plugin gave me a great idea to make a "Magic-Trapping" state to "bounce all magic skills back on the caster, good or bad.

I'll work on that as a more fleshed out plugin, but in the meantime, this one should work for what you requested just fine.
All done!

Please find the plugin HERE.

Directions: Just tag a skill with <selfishSkill> and enemy that uses this skill will only target itself.

This plugin gave me a great idea to make a "Magic-Trapping" state to "bounce all magic skills back on the caster, good or bad.

I'll work on that as a more fleshed out plugin, but in the meantime, this one should work for what you requested just fine.
Fantastic thank you, I'll test it as soon as I can!

Original thread: https://forums.rpgmakerweb.com/threads/make-enemy-always-target-self.140046/