MZ Skill target help

Hello!

I'm using VS's battle core plugin and I'm trying to find a way to make a skill that will target only ONE ally except Actor 1 and Actor 2, but so far, I couldn't find any useful info on the internet and I know next to nothing about JS... I would really appreciate it if someone could help me find a solution. Thanks a bunch!
You can use the JS Targets notetag. As I have understood, you want a skill to target one ally, but not Actor 1 and Actor 2. So, having the skill to have as default scope One Ally in database, you can add this notetag:


Code:
<JS Targets>
 targets = targets.filter(t => ![1,2].contains(t.actorId()));
</JS Targets>

The code filters targets array for all the targets that do not have 1 and 2 actor database ID.
You can use the JS Targets notetag. As I have understood, you want a skill to target one ally, but not Actor 1 and Actor 2. So, having the skill to have as default scope One Ally in database, you can add this notetag:


Code:
<JS Targets>
 targets = targets.filter(t => ![1,2].contains(t.actorId()));
</JS Targets>

The code filters targets array for all the targets that do not have 1 and 2 actor database ID.
Thank you so much for the reply!
Yes, in the game I'm making, the majority of the single target support skills will target one ally but not Actor 1 and 2.
That's indeed what I want, but unfortunately, the code that you provided doesn't seem to be working for some reason. I set the skill to "One Ally", but when I tested the skill, I was still able to target actor 1 and 2 but when I used the skill on them, it didn't work. No damage, no effects, nothing. The skill did work fine on actor 3 and 4 though.

In short, it looks like your code is only cancelling the skill's effects when I target Actor 1 and 2.
Oh, reading better the Visustella's battle core documentation seems that targets notetag works not like a selection control. Indeed, for reaching the effect you want you need something similar to Yanfly's plugin Selection Control, I don't know if VisuStella has released something similar in their library. I think you should ask them on their discord 😤
Oh... I see. That really socks. I'm using many VS plugins in my game project, but so far, I haven't seen a function like Yanfly's selection control plugin. I'll still ask on their discord just in case(I didn't even know that VS had a discord) and if I still can't get help from there, I think I saw something like a feature request on their wiki a while ago, so I'll try writing something there. Thanks again for your help! 😀

Edit: I was able to get an answer on discord. They told me to use one of Caethyril's plugins, I think it's called On-use effects, and then you use this notetag in the skill's notebox:
Code:
<target filter: return target.actorId() !== 1 && target.actorId() !== 2>

Original thread: https://forums.rpgmakerweb.com/threads/skill-target-help.138862/