Formula for party size specific battler position? Yanfly's Battle Core

Using Yanfly's Battle Core, it let's you play around with the default positioning formula for the party members as a group, within battles. One issue I'm running into however, is that if the party is full, they settings are perfect. However, with just one or two members in the party, it looks really awkward because the two party members still remain up top.

So formula wise, is it possible to take into account how many actors are in the party and push the standard position down a few notches when it's not full?

Here's the default formula's for X Positions:
screenWidth - 16 - (maxSize + 2) * 32 + index * 32
And for Y:
screenHeight - statusHeight - maxSize * 48 + (index+1) * 48 - 32

Here's a visual example of my problem. Full 3 actor party looks good:
Here1.png



One person party seems off since the first actor remains in that top starting position:
Here2.png


Any kind of insight or alternatives method would be awesome! Thank you in advance!
The only way I see this working is to make it so that party member 1(index 0) is always in the middle. You can try using Yanfly’s Row plugin to put member one in his own row. This will allow you to adjust his position independent of the other members. Adjust the Y spacing of your other two members to be further apart while adjusting the Y position of member 1 lower down and his X position closer to the row your other members are on so that they all appear on the same row. (or don’t if you want to give them a triangle formation) Hope that makes sense.
That said, it might be possible to do this with just the default positioning formula. I haven’t messed with it enough to know. Try adjusting the “index” part of the formula.
That said, it might be possible to do this with just the default positioning formula. I haven’t messed with it enough to know. Try adjusting the “index” part of the formula.
Thanks for the reply! I'm not much of a math person or a coder, so a lot of the formula stuff goes right over my head. The only reason I got them to align that way in the screenshots was just a lot of back and forth number plugging, rather than any actual comprehension of what the formula is doing haha.

Any insight on how the index is being calculated in the formula? Like is it literally just taking the party position number itself? Cause if that's the case, I'd have to figure out how to add/multiply something with "0" that also increments "1" and "2" in one formula, right?
Right there with you man. I just guess, edit and look at the result. I started with this Y formula:
"Graphics.boxHeight - 128 - ($gameParty.maxBattleMembers() - index - 1) * 48"
I changed: "index - 1) * 48"
to "index - 1) * -48".
That made my party line up from bottom to top instead of top to bottom, so I'd say that "index" is more than just a number.

I feel like it would be possible to do what you want using "$gameParty.members().length" in your formula, which returns the party size. If you want the lazy way, use Yanfly's Row Formation like I was saying and set up your party up like this:
----------------------------3---------3
Three party members--1 ------or----1
----------------------------2 --------2
Member 1 will always be in the middle.
Might have to cut my losses for now and go with the Row Formation option then! Especially since all I need is the actor to look decent in the scene, haha. Thanks so much for humoring my attempt at mathing a solution though!
Hey KingKraken, I know this is an old post but I figured out that by using the partySize variable instead of maxSize in the formula, it will scale the battler's Y position according to the current number of actors in your party.

Original thread: https://forums.rpgmakerweb.com/threads/formula-for-party-size-specific-battler-position-yanflys-battle-core.133081/