Kagemaru

Veteran
Veteran
Joined
Dec 11, 2017
Messages
49
Reaction score
5
First Language
French
Primarily Uses
RMMV
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!
 

BlueMoon

Nebula Games Leader
Veteran
Joined
Jan 10, 2017
Messages
363
Reaction score
485
First Language
Italian
Primarily Uses
RMMZ
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.
 

Kagemaru

Veteran
Veteran
Joined
Dec 11, 2017
Messages
49
Reaction score
5
First Language
French
Primarily Uses
RMMV
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.
 

BlueMoon

Nebula Games Leader
Veteran
Joined
Jan 10, 2017
Messages
363
Reaction score
485
First Language
Italian
Primarily Uses
RMMZ
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 :kaopride:
 

Kagemaru

Veteran
Veteran
Joined
Dec 11, 2017
Messages
49
Reaction score
5
First Language
French
Primarily Uses
RMMV
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! :D

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>
 
Last edited:

Latest Threads

Latest Profile Posts

Don't you just hate it when you get a high level armor only for it to look like a metal plated bikini on your female character?? Seriously. How can that protect you??? Enemies can hit the squishy parts! :kaosigh:
Bathrooms are not designed for the middle of the night.
so... I decided since a park was an area in my game... here's an enemy that's slide with a hand behind it. cause why not.

Forum statistics

Threads
115,278
Messages
1,088,562
Members
149,890
Latest member
mekiboss
Top