Need help with Yanfly's Row Formation and Selection Control

I'm trying to create a battle system which uses row positions as a key part of battle strategy. For one part of it, I want to restrict things like healing to members of the same row as the healer.

For example, if Fred is in the front row and needs healing, and Sarah the healer is in the middle row, Sarah will need to move to the front row before she can cast "Heal" on Fred. (I already have a way of moving between rows; I'm using skills to change positions during the battle turns themselves.)

I've searched the Yanfly plugins' help files for some way to check whether the skill's potential targets are in the same row, but I can't find anything that can be used for that purpose. I want the relevant skills to only be able to select same-row battlers as valid targets. I don't know enough about Javascript to find a solution on my own, but I'm totally open to using a Lunatic Mode approach to the problem, if anyone is knowledgeable enough in coding to provide one. 🙂

Any help would be greatly appreciated! 😀
I couldn't find any way to make this happen with yanfly commands myself but I have an idea that may work for you. Rows are states so you can have your heal items run a common event. The common event can run a series of condition branches checking the various recruits and their states, ie. row 1, 2 3 etc. Hopefully you don' t have a ton of playable actors for this method.🙂 Then it can apply which ever heal the event is for if the condition checks out and maybe an explainer of some sort if you're in the wrong row. Just an idea but it may work for you, best of luck.
I couldn't find any way to make this happen with yanfly commands myself but I have an idea that may work for you. Rows are states so you can have your heal items run a common event. The common event can run a series of condition branches checking the various recruits and their states, ie. row 1, 2 3 etc. Hopefully you don' t have a ton of playable actors for this method.🙂 Then it can apply which ever heal the event is for if the condition checks out and maybe an explainer of some sort if you're in the wrong row. Just an idea but it may work for you, best of luck.

Thanks for replying! Unfortunately, I plan to have about 100 playable actors, and common events have to check actors rather than party members. :/
But I'll keep searching for solutions! 😀
and common events have to check actors rather than party members. :/

I don't think that's entirely true. In Ace it is very straightforward to identify who is in the active party through a script call which can be included in a common event. I don't know Javascript enough to supply a translation, but in Ruby it is

$game_party.battle_members.include?($game_actors[x])

Now, even after translation that only gets you partway, because it's looking to see if actor X is in the party, though as presumably you have only a limited number of healers, even that should reduce the number of conditional branches considerably. However, I use $game_party.battle_members in different ways to identify a range of things e.g. to see if any actor is equipped with a particular piece of gear. I am wondering, therefore, if there is a way of using it that might address your needs.

btw, I think the equivalent in JS is $gameParty.battleMembers but how it then goes on to do the .include? bit is something I don't know.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-yanflys-row-formation-and-selection-control.88622/