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 Posts

Latest Profile Posts

Lately I have been taking a break from game and resource making so I won't get burnt out. But I am also interested in the Game Jams this site periodically holds. It'd be great if I knew when the next one, if any, is planned.
elexy 1.2.pngSome bust art to be cropped and cleaned. May use in special decision moments. Depending on how it looks in game I may cut it.
Tiamat-86 wrote on ATT_Turan's profile.
apparently since its turning 15 years old this year the ps3 is considered "retro". now how old do you feel?
guess that means im an "antique" gamer since ill still play games as old as i am.
"you know your getting old when your childhood console changes ethnicity" lol it turned yellow
I'm making Toilet in Wonderland 2. and tell vinny about it lol

Forum statistics

Threads
115,343
Messages
1,089,170
Members
150,020
Latest member
eungi
Top