Issues with Yanfly's row formation's position

Hi, guys.
Currently I'm working on a game with Yanfly's row formation, but I just can't get the right 'home' position for the rows like she has in the showcase video, where it's more symmetrical. My game has 2 rows and the 'Y' isn't so natural since the first battler in the row "stuck" on top. my screen resolution in Yanfly core is 1280 x 720 and yes, my game is 8 vs 8, so without being centered, it looks mouthful... Giving the right code for 3 rows also helps for future games! Changing my X also helps if it makes it visually better. Thanks in advance 🙂
I would suggest using screenWidth rather than screenX...screenWidth / 2 will be the middle of the screen, making it easy to keep things symmetrical. 😂

E.g. X position formula for actors:
Code:
screenWidth / 2 + rowId * 180 + rowIndex * 0
...and for enemies:
Code:
screenWidth / 2 - rowId * 180 - rowIndex * 0
Just adjust the numbers as needed~
  • "rowId * 180" means there's 180 px of spacing between rows;
  • "rowIndex * 0" means there's 0 px of difference in x-position between successive members of a row.
Yup... It works well 😊Thanks! (I need some times to configure it out)
It looks beautiful and organized 🙏 love itt!
Happy to help! 😤
Do you have a suggestion for Y too? I'm using this code:
Code:
centerY + ((rowSize / -2 + 2) + rowIndex) * 60
it works well for the actors, but for the enemies, it changes depending on how many enemies are present... and only stays at the desired place if they have full 8 battlers...
You could try swapping rowSize (number of battlers in that row) for a fixed number. Could try swapping centerY for a fixed number, too. E.g.
Code:
350 + rowIndex * 60
Not sure about the numbers, but you can experiment there. 😅
Yeah, it does work, but I want it to be symmetrical as well... any idea on how to do that?
I think it has something to do with centerY
Actually, I just realize that I need the Y fixed more than X...
centerY is just a number representing the y-position of the middle of the screen. Maybe try something like this?
Code:
480 + (((rowSize - 1) / 2) - rowIndex) * 80
Quick check~
  • rowSize = 1 => rowIndex = 0 at y = 480.
  • rowSize = 2 => rowIndex = 0 at y = 520; rowIndex = 1 at y = 440.
  • rowSize = 3 => rowIndex = 0 at y = 560; rowIndex = 1 at y = 480; rowIndex = 2 at y = 400.
That's the sort of thing you wanted, right? 😮‍💨
Code:
400 + (((rowSize - 1) / 2) - rowIndex) * 60

is the perfect one! Thanks!
Great, happy RPG Making! 🙏

Original thread: https://forums.rpgmakerweb.com/threads/issues-with-yanflys-row-formations-position.109911/