MV Unusual quirk with Yanfly Selection Control and split damage

Hello! Thanks to the lovely people over on the Damage Formula thread, I've learned how to split damage across targets like in the Final Fantasy titles. However, I've come to an unusual little quirk with what spells will and won't work with this information.

So, I was noticing that only certain spells were splitting their damage when I was trying them out. For instance, my Giga Aero skill would work like a charm, but Aero and Mega Aero would not work.

Spoiler: Aeros
1696211514180.png

1696211522923.png


Upon applying the notetags to a few more skills, I noticed that it wasn't working on, say, Frost or Giga Frost, but was working with Mega Frost. Same thing with it not working with Fire or Giga Fire, but working just fine on Mega Fire.

Spoiler: Frosts
1696211662701.png


1696211671711.png

1696211662701.png

I'm using quite a lot of Yanfly's excellent plugins and checked to make sure they were all in the right order, checked to make sure I had the latest versions, and even toggled ATB off to make sure it wasn't the one causing the problems, but the outlook was the same.

Spoiler: plugin list
These are the Yanfly plugins I am currently using. The only other plugins being used are the default Community_Basic, MadeWithMv, and the AltMenuScreen
1696212010783.png

But I noticed a weird little quirk, the spells that worked use the stock All animations, and specifically, they use the animations with position: Screen. If an animation uses Head, Feet or Center for their position, for some reason the damage does not split and I don't get why. I can't find anything in any of the plugins that mentions this happening so I don't know if I've messed something up, if I've missed something, or if this is simply RPG Maker being a goofy goober. If anyone has any insight as to why this happens, I would love to know!
But I noticed a weird little quirk, the spells that worked use the stock All animations, and specifically, they use the animations with position: Screen. If an animation uses Head, Feet or Center for their position, for some reason the damage does not split and I don't get why.
Now that you mention it, it makes sense. it was a thing that I had encountered in the past and forgot about since then. atleast from what i remember, skills that use animations that arent screen process aoe skills as single target, one target at a time, in order. I had used action sequences to make them all happen at once and have the effects only happen one time for all targets. IDK if anyone has any other easier fixes, but action sequences was a fix for me. It ended up with me splitting my aoe and ST spells into specific skills though. Im not sure how to make it variable based on if youre ST or omnicasting without weirdness
skills that use animations that arent screen process aoe skills as single target, one target at a time, in order. I had used action sequences to make them all happen at once and have the effects only happen one time for all targets.
So I'm not going to discount it, because clearly something weird is going on.

But that code should still be valid in either case, whether it's internally treating it as a "target action" or "whole action" - the array of targets is still there. I wonder, rather, if there's something causing the actual notetag to not be evaluated in some cases.

@TailsFiraga Try this. Add into your Pre-Damage notetag the line:
Code:
console.log("Skill ", this.item().name, ", Targets length is ", BattleManager._targets.length);

Then, during battle, hit F8 and go to the Console tab. Use your various skills in AoE mode and post a screenshot of what the console shows.
@ATT_Turan Here's the screenshot from the console. The first four skills use animations that hit one target at a time (Heal One 1, Cure One 1, Wind One 1, Wind All 1), while the last skill uses an animation that hits the whole screen at once (Wind All 2)

1696215153952.png


Removing the ability to set the scope on Mega Aero and setting it to "All Enemies" plays the animation on all enemies simultaneously and the damage splits like it's supposed to.
1696215493716.png


I guess for now, just for gameplay testing purposes I'll set the spell animations as Screen ones but this is really weird.

EDIT: So setting the default scope to "All Enemies" in the database itself fixes the split problem, and I assume that setting the scope of healing spells to "All Allies" will likely fix it for the healing spells, though that'll come with the caveat that all healing spells used from the field menu will target all the party members and not just one at a time.
I guess for now, just for gameplay testing purposes I'll set the spell animations as Screen ones
Why? Just spend that time doing something else in your project and wait a little while for someone to respond to the post. 🙄 Seems like a waste of time to go changing your animations back and forth while you're waiting for an answer.

So the way the Selection Control toggles to all targets does a bit of a weird thing where it doesn't use the built-in targets array, it makes its own list that it shaves down.

Change your code to:
Code:
<Pre-Damage Eval>
if (BattleManager._targets.length>1 || BattleManager._allTargets.length>1)
    value=Math.round(value/2);
</Pre-Damage Eval>
Why? Just spend that time doing something else in your project and wait a little while for someone to respond to the post. 🙄 Seems like a waste of time to go changing your animations back and forth while you're waiting for an answer.

So the way the Selection Control toggles to all targets does a bit of a weird thing where it doesn't use the built-in targets array, it makes its own list that it shaves down.

Change your code to:
Code:
<Pre-Damage Eval>
if (BattleManager._targets.length>1 || BattleManager._allTargets.length>1)
    value=Math.round(value/2);
</Pre-Damage Eval>

I'm definitely not used to quick and timely responses. This code works like a dream though, thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/unusual-quirk-with-yanfly-selection-control-and-split-damage.161669/