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

I'm weird as there are a few game franchises I'll watch and read about, but have no interest in playing.
Humans have such a capacity to assign personalities and love to objects. We do this because we love them. It's interesting then that our fears over AI are that they won't love us back and will instead hate us.
I'm actively looking for people who want to recreate classical compositions in the public domain for RPG Maker games. I've got a whole kick going on of looking for several resources from anyone which would be sharable amongst commercial games. This latest pursuit is something I'm surprised no one else has started doing.
I played Deltarune chapter 2 today! It was great. No spoilers, but I hope one day I can design a world as interesting as Toby Fox and team.

Forum statistics

Threads
115,152
Messages
1,087,691
Members
149,693
Latest member
Bl1tz16
Top