Joined
Jan 30, 2021
Messages
85
Reaction score
72
First Language
English (US)
Primarily Uses
RMMV
I've previously used a plugin called SVActorPosition to reposition the party, and I only now replaced it with Yanfly's Row Formation in order to add a bit of depth to the targeting system in MV.

The former coordinates I've used are like so:
1638446945302.jpeg
1638446896374.png

I don't have a very good understanding of the variables used in these formulas, or of Javascript in general...but which of these parameters should I change to get the result I did above? Everything shown below is the default settings.
1638447042696.png

I have it set up so far to where you have just two rows to work with; I just need to move their home positions.

Suggestions of any sort are welcome. Please.:kaoswt2:
 

bishiba

Adept
Veteran
Joined
Apr 6, 2016
Messages
275
Reaction score
161
First Language
Swedish
Primarily Uses
N/A
Well, I could spend a bit of time doing it. But I'll just tell you that your example doesn't seem to support row formations? It seems like it's just two rows, would they always swap places or do you want to add more rows?

Or do you want them to move based on the amount of actors in a certain column? Like if there's 2x2 and suddenly it's 3x1 would you want the lonely character at the back to position themselves behind the center character in the front row?
1638463857166.png

Correct if I am completely misunderstanding the concept. Perhaps YEP row formations does that automatically?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,193
Reaction score
1,887
First Language
English
Primarily Uses
RMMV
Correct if I am completely misunderstanding the concept. Perhaps YEP row formations does that automatically?
Yes, it has plugin parameters to automatically adjust battler positions based on which row state they have on.

@A-kun it would be helpful to see what your battlers look like now so we see what you want to change. But since you were using exact coordinates before, the math should be extremely simple.

For example, your highest value X position before was 752, so you make the Maximum Row X parameter be 752. Then your row 1 actors were positioned at 640 and 608, so you'd make Row 1 Home X something like
Code:
maxRowX - 80 - (rowIndex * 32)

I'm thinking that rowIndex number represents the index of the actor within their row, but without poking into the code I'm not certain. So it may need some tweaking, but that's the idea...then you just repeat the process for row 2, and for your Y values.
 
Joined
Jan 30, 2021
Messages
85
Reaction score
72
First Language
English (US)
Primarily Uses
RMMV
Yes, it has plugin parameters to automatically adjust battler positions based on which row state they have on.

@A-kun it would be helpful to see what your battlers look like now so we see what you want to change. But since you were using exact coordinates before, the math should be extremely simple.

For example, your highest value X position before was 752, so you make the Maximum Row X parameter be 752. Then your row 1 actors were positioned at 640 and 608, so you'd make Row 1 Home X something like
Code:
maxRowX - 80 - (rowIndex * 32)

I'm thinking that rowIndex number represents the index of the actor within their row, but without poking into the code I'm not certain. So it may need some tweaking, but that's the idea...then you just repeat the process for row 2, and for your Y values.
I have no idea if I got my math wrong or not, but it didn't work. ;w;

Weirdly enough, it almost looks like the opposite of my setup?
1638482156254.png
1638482104559.png
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,193
Reaction score
1,887
First Language
English
Primarily Uses
RMMV
So swap your X values for rows 1 and 2. (to be slightly fair to you, I did mistype in my prior post when I was saying "your highest X values...so make row 1". Obviously, the highest X values should be for row 2)
 
Joined
Jan 30, 2021
Messages
85
Reaction score
72
First Language
English (US)
Primarily Uses
RMMV
So swap your X values for rows 1 and 2. (to be slightly fair to you, I did mistype in my prior post when I was saying "your highest X values...so make row 1". Obviously, the highest X values should be for row 2)
I swapped the formulas and it still looks off. I now wonder if the default formulas do something else...

Here they are, if it helps anything. I notice the row x and y formulas are the same across each row setting:
Code:
 * @param Maximum Row X
 * @parent ---Position Settings---
 * @desc The maximum X position value for the row X value.
 * @default screenWidth - partySize * 32 - 16
 *
 * @param Maximum Row Y
 * @parent ---Position Settings---
 * @desc The maximum Y position value for the row Y value.
 * @default screenHeight - statusHeight - 16
 *
 * @param Minimum Row Y
 * @parent ---Position Settings---
 * @desc The maximum Y position value for the row Y value.
 * @default screenHeight - statusHeight - 16 - (maxSize * 64)
 *
 * @param Center Row Y
 * @parent ---Position Settings---
 * @desc The center Y position value for the row Y value.
 * @default (maxRowY + minRowY) / 2 + 16
 *
 * @param Row 1 Home X
 * @parent ---Row 1 Settings---
 * @desc This is the formula used to determine the Home X location
 * for this row.
 * @default maxRowX - (maxRows - rowId) * 112 + rowIndex * 32
 *
 * @param Row 1 Home Y
 * @parent ---Row 1 Settings---
 * @desc This is the formula used to determine the Home Y location
 * for this row.
 * @default centerY + ((rowSize / -2 + 0.5) + rowIndex) * 32

Oh, and the screen size I am currently using is 864 [width] by 624 [height]
--
EDIT: I'm so close!! Here are my current settings, and the screenshot when I battletest


1638632668378.png
1638632711435.png

I've got them roughly in the right positions! I just need to move them to the right, somehow. Something about the current formula makes it do this...but removing the numbers in front makes them move to the upper left corner. Changing the minuses to pluses or vice versa doesn't work. :kaoswt2:

But what I have figured out is, "rowId" dictates the space between rows, and "rowIndex" dictates the offset of the members in their row. [Ex, "rowIndex * 0" means they'd be perfectly lined up. I learned it here!]
--

EDIT 2: I DID IT
AAAAAAAAAAAAAAAAAAAAAAA


a.jpg

Using the values you recommended for the min/max values and the default equation for the X coordinates did it
I actually got the Y coordinates correct with some fiddling, heh :kaoblush:
Thanks so much for pointing me in the right direction!
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Drop shadows and water reflections tests in RPG Maker VX Ace


BgI3F80.png
I'm doing a fairy tale project Little Red Riding Hood and the Woodsman. I'm almost done with the demo in my native language and I intend to make a demo version in English as well. I'm just going to use the translator because I don't know the pronunciations very well, I only know how to say "Hey" and nothing else.. :kaoswt2:
SwordSkill wrote on TsukiAkari_Otome's profile.
You still interested in joining projects?
Maybe you could take a look at my project.

Forum statistics

Threads
118,613
Messages
1,117,308
Members
155,691
Latest member
dmanj450
Top