MV YEP_X_Selection_Control - Custom selection control help

Hi! I'm using the YEP_X_Selection_Control plugin and I need help creating a custom command.

I want a skill that can only target allies that have 0 TP left.

I tried using the following code in the skill's note:


<Select Conditions>

Param TP === 0

</Select Conditions>


However, it makes the skill unselectable, even if there are allies with 0 TP left.

Can anyone help me figuring out what I'm doing wrong? (The plugin is placed below all others.)

Thank you!
Can anyone help me figuring out what I'm doing wrong?
Not with the information given - please post a screenshot of your skill in the database. The problem could well be unrelated to the notetag.
(The plugin is placed below all others.)
That's not necessarily correct. Especially if you're using some number of Yanfly plugins, there is a specific order (listed on the Web site) that they're supposed to go in to guarantee functionality.

You should double check that list.
Thank you for your reply!

Here is the skill in the database.

1630431965214.png


The skill works perfectly fine if I remove the Select Conditions. The whole text in the note tag is this:


Spoiler: Note Tag
<Learn Require Switch: 9999>


<Select Conditions>

Param TP === 0

</Select Conditions>


<Limit Uses: 1>

<Instant>

<Begin Action: Add State 205>


<setup action>

wait: 20

MOVE user: FORWARD, 50, 12

DISPLAY ACTION

</setup action>


<whole action>

MOTION Missile: user

wait: 15

action animation

wait: 30

wait for movement

</whole action>


<target action>

action effect

</target action>


<follow action>

wait: 45

clear battle log

</follow action>


<finish action>

perform finish

</finish action>

I have tried to only keep the select conditions and removing the rest from the note tag, and it doesn't change anything.

As for the plugin order, I have verified and Yanfly only says to place it below Battle Engine Core and Target Core. I use both of these plugins and they are placed above Selection Control.

I also use other base functions from Selection Control and they work fine.

Thank you!
Okay, so...it looks like something's wrong with the plugin. I duplicated your problem and messed around with a few other conditions, and while I didn't try every combination, it looks like anything using a Param select condition causes the skill to be unusable.

I did a bit of debugging, and it's parsing the notetag correctly, but something else is bugged between that and allowing the skill to be used.

I'll try to make some time later tonight to see if I can figure out where it's going wrong.

Edit: @MaxLionheart I think I got it. Open up the Selection Control plugin in a text editor. Go to line 1471, should just be a closing brace.

Add a line after that which says return eval(code);

That worked in my testing, let me know if it gives you any errors or problems.
Aaaaah excellent! It works perfectly fine now!

Thank you so much, I'd NEVER have found this haha!

Thank you for your time, it's very appreciated 🙂

Original thread: https://forums.rpgmakerweb.com/threads/yep_x_selection_control-custom-selection-control-help.140035/