an example of the kind of specific targeting would be, like an incubus only casting charm on female characters, and a siren or succubus casting charm on male only characters. either that or it simply won't affect the "Immune" gender.
Is there a way for an enemy to target a specific type of character with a skill
RPG Maker MV SupportI guess if there isn't any real way to do something like this, a last effort might be to start those fights with adding Immunity towards the skill to the unaffected characters, but would just be better if the specifically target them without It having to be a standard pattern like, that one character is always targetted first, and then that one is etc. better it's kinda random, while still being "gender" specific
You'd use Yanfly's Selection Control plugin.
In the notetag of your skill, you'd put something like:
That will only allow your enemy to select actors who have the <female> notetag.
Note that unless you're guaranteed to have males and females, this may result in them being unable to select a valid target for the skill, and thus waste a turn.
In that case, you'd need to combine it with Yanfly's Battle A.I. Core to intelligently select the skill choice in the first place.
Note that we're not supposed to double post - if you need to add something before someone else has replied, you can click the Edit button.
In the notetag of your skill, you'd put something like:
Code:
<Custom Select Condition>
condition=$dataActors[target.actorId()].meta.female;
</Custom Select Condition>
That will only allow your enemy to select actors who have the <female> notetag.
Note that unless you're guaranteed to have males and females, this may result in them being unable to select a valid target for the skill, and thus waste a turn.
In that case, you'd need to combine it with Yanfly's Battle A.I. Core to intelligently select the skill choice in the first place.
Note that we're not supposed to double post - if you need to add something before someone else has replied, you can click the Edit button.
If it's a multi target, you can do this with states and immunities. If you want to affect the targeting of a single target skill, you'll need something like what ATT_Turan suggested.
ah Great thanks, I think I have most Yanfly plugins so I'll see if I can make it work
Wouldn't be a Harlekin post if I wasn't gonna suggest Action Sequencing.
You can run js evals in action sequences. This for example makes the skill target always pick the actor with the highest TP while of course avoiding to target dead people:
You can run js evals in action sequences. This for example makes the skill target always pick the actor with the highest TP while of course avoiding to target dead people:
Code:
<custom target eval>
var aliveActors = $gameParty.members().filter(function(actor) {
return !actor.isDead();
});
var targetActor = aliveActors.reduce(function(prevActor, currActor) {
return prevActor.tp > currActor.tp ? prevActor : currActor;
});
if (aliveActors.length > 0) {
targets.push(targetActor);
}
</custom target eval>
You can run JS evals in action sequences, but this isn't an example of one.
This is a notetag for the Target Core, which is the companion to the Selection Control I suggested.
Trying to manipulate the target inside of an action sequence is, every time I've attempted it, very difficult/implausible. Unless there's just a trick I haven't been smart enough to figure out yet 😛
I really should stop posting so late at night. Oh. My. God.
What I did in my last project was use the gender plugin:
https://forums.rpgmakerweb.com/index.php?threads/gender-plugin-pg_gender-js.141676/
to assign genders to actors and selected enemies. I made states for male and female characteristics upon which I applied Yami's YED_RetainStateOnDeath plugin. There ere also states for obsession with males and obsession with females. The male characteristics state gives immunity to obsession with males, and the female characteristics gives immunity to obsession with females.
This method worked okay, but when I started my new project I gave actors a slight chance to cause obsession with enemies of different sex. I found I had to apply a state to neuter enemies to stop, for example, bats falling in love with party members.
https://forums.rpgmakerweb.com/index.php?threads/gender-plugin-pg_gender-js.141676/
to assign genders to actors and selected enemies. I made states for male and female characteristics upon which I applied Yami's YED_RetainStateOnDeath plugin. There ere also states for obsession with males and obsession with females. The male characteristics state gives immunity to obsession with males, and the female characteristics gives immunity to obsession with females.
This method worked okay, but when I started my new project I gave actors a slight chance to cause obsession with enemies of different sex. I found I had to apply a state to neuter enemies to stop, for example, bats falling in love with party members.
Spoilsport.
Doesn't stop Persona from doing it.
Maybe the bat would try so very hard to become humanoid after falling in love!
Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-for-an-enemy-to-target-a-specific-type-of-character-with-a-skill.158683/