Alphaistimz

AlphaDio Production
Veteran
Joined
Jul 19, 2018
Messages
96
Reaction score
10
First Language
Indonesian
Primarily Uses
RMMV
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 :)
 

Attachments

  • AA.PNG
    AA.PNG
    110.4 KB · Views: 44
  • BB.PNG
    BB.PNG
    15.6 KB · Views: 49
  • DD.PNG
    DD.PNG
    1.9 MB · Views: 48

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,485
Reaction score
2,630
First Language
EN
Primarily Uses
RMMZ
I would suggest using screenWidth rather than screenX...screenWidth / 2 will be the middle of the screen, making it easy to keep things symmetrical. :kaojoy:

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.
 

Alphaistimz

AlphaDio Production
Veteran
Joined
Jul 19, 2018
Messages
96
Reaction score
10
First Language
Indonesian
Primarily Uses
RMMV
Yup... It works well :kaoblush:Thanks! (I need some times to configure it out)
It looks beautiful and organized :kaothx: love itt!
 

Alphaistimz

AlphaDio Production
Veteran
Joined
Jul 19, 2018
Messages
96
Reaction score
10
First Language
Indonesian
Primarily Uses
RMMV
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...
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,485
Reaction score
2,630
First Language
EN
Primarily Uses
RMMZ
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. :kaoswt:
 

Alphaistimz

AlphaDio Production
Veteran
Joined
Jul 19, 2018
Messages
96
Reaction score
10
First Language
Indonesian
Primarily Uses
RMMV
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...
 
Last edited:

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,485
Reaction score
2,630
First Language
EN
Primarily Uses
RMMZ
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? :kaophew:
 

Alphaistimz

AlphaDio Production
Veteran
Joined
Jul 19, 2018
Messages
96
Reaction score
10
First Language
Indonesian
Primarily Uses
RMMV
Code:
400 + (((rowSize - 1) / 2) - rowIndex) * 60

is the perfect one! Thanks!
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,485
Reaction score
2,630
First Language
EN
Primarily Uses
RMMZ
Great, happy RPG Making! :kaothx:
 

Latest Threads

Latest Posts

Latest Profile Posts

This is Ralph from VX!
index.php

Always be consistent with your project.
Making backups regularly is good for the soul.
The worst text you can get from a friend "You left your webcam on!!!

Forum statistics

Threads
121,851
Messages
1,144,667
Members
160,105
Latest member
ein1_1
Top