Questions about row formations

I'm using MV 1.6.2, and Yanfly plugins, and wish to add rows into battle system. But can't figure out of how to make next features:
1)Actors and enemies are deployed in three rows (Front, middle, back). I can place actors, but I don't know how to deploy enemies;
2)How to make auto change of rows? Like when the front row falls, the middle becomes front, like in some kind of Disciples 1. I found out that I should use events and plugin commands to do it for every troop;
3)How to make middle and back rows safe from front attacks? I have figured out that I can use states. But maybe there is another way?
1)Actors and enemies are deployed in three rows (Front, middle, back). I can place actors, but I don't know how to deploy enemies;
On the plugin's parameters, go to the "Enemy Rows" section and set "Adjust Relative" to "True". This way, if you've assigned a row on an enemy, the game would auto-adjust them as it would for player characters.
2)How to make auto change of rows? Like when the front row falls, the middle becomes front, like in some kind of Disciples 1. I found out that I should use events and plugin commands to do it for every troop;
The plugin itself has a special script call in $gameParty.updateRows(); and $gameTroop.updateRows(); that updates the position of party members and enemy troops respectively to move forward if used. Just run a common event that runs them each time a battler dies.
3)How to make middle and back rows safe from front attacks? I have figured out that I can use states. But maybe there is another way?
If you have Selection Control, the plugin parameters has the Physical Front Row parameter, where if set to "true", skills that are single target and deal physical damage can only attack what is currently the front row.
Just run a common event that runs them each time a battler dies.
Okay. What is the script which checks any battler's death?
I can use "Turn end" for every turn (I can't use moment trigger because its freezes a game) with these commands.
If you have Selection Control, the plugin parameters has the Physical Front Row parameter, where if set to "true", skills that are single target and deal physical damage can only attack what is currently the front row.
Okay. I haven't used Target Core and Selection Control, so I tried to find my own way.
(I can't use moment trigger because its freezes a game) with these commands.
That's not something you should just casually accept! simply having a troop event with a span of Moment should not cause anything negative in your game. If it does, either there's an error in your event code, or something else is wrong.

The event-driven but slightly more complicated way is to make a troop event for each party member with the trigger of their HP <= 0% and span of Moment, then call those functions.

The easier way that needs a plugin is you use Yanfly's Buffs and States Core (which I think you might already have as a prerequisite for the Rows Formation) and put a Custom Apply Effect on your Knockout state, ID 1.
That's not something you should just casually accept! simply having a troop event with a span of Moment should not cause anything negative in your game. If it does, either there's an error in your event code, or something else is wrong.

The event-driven but slightly more complicated way is to make a troop event for each party member with the trigger of their HP <= 0% and span of Moment, then call those functions.

The easier way that needs a plugin is you use Yanfly's Buffs and States Core (which I think you might already have as a prerequisite for the Rows Formation) and put a Custom Apply Effect on your Knockout state, ID 1.
I understand, but I fear that we're going offtop here. This "Moment span" story was explained in this thread: https://rpgmaker.net/forums/topics/24059/?post=860446
I think that I just had no idea of how to use this span properly.
I understand, but I fear that we're going offtop here.
Erm...if you say so? Your making a troop event with the span of Moment is literally the answer to the question in your topic:
2)How to make auto change of rows?

Anyway, good luck with your game.
Erm...if you say so? Your making a troop event with the span of Moment is literally the answer to the question in your topic
Oh, sorry.
Sorry for another question. I can't understand how to place enemies and actors on screen.
I've tried to use advice from this thread, but found that I can place enemies out of screen.
My main purpose is to place enemies and actors in the middle. So they could not be hidden by HUD, neither "float" above battlefield.
1654269473884.png
Is there any suitable formulas for placing characters not too far from each other (so they couldn't be hidden by interface windows), and not too close?
Right in your rows formation plugin and the battle engine core are parameters for how to position the actors depending on whether or not they have a row state.
im using this plugin... heres what ive done so far:

i only use 2 rows (but had used 3 before) and i can tell that unless marked as ranged, physical attacks only affect the 1st row with alive members. automatically, when 1st row dies, 2nd row becomes reachable.

if you go to plugin settings and look at the main row settings, the ones with X and Y coordinates, youll see a formula.
maximum row X, Y, minimum and center row Y numbers multiple of 16 mean distances based on the default sprite proportion (48x48). if you change any, try to follow your sprites proportions and there will be some cool spacing (up and down, and you can try negative numbers) between actors and enemies.
HINT: change the term partySize in the formulas to a fixed number (i have a 4 actors active party, so i changed mine to 4). doing so will make equal distribution among actors and enemies.

by the end of the plugin settings, theres enemy row X and Y. change those to match the actor rows.

here are my settings, if you will. they match my sprite size:


max row X: (screenWidth - 100) - 4 * 32 - 16

max row y: screenHeight - statusHeight - 16 - (4 * 64)

min row y: screenHeight - statusHeight - 16 - (4 * 64)

center row y: (maxRowY + minRowY) / 2 + 240

enemy row x: 350 + (maxRows - rowId) * 112 - (rowId * 80) - rowIndex * 32

enemy row y: centerY + ((rowSize / -2 + 0.5) + rowIndex) * 96

the 350 in row x pushes enemies to their right a bit so the dont go out of screen bounds. "screenWidth - 100" makes actors also do go outside the right side of the screen.

try your numbers, one setting at a time and youll see which numbers make battlers go up or down or go left or right. it will all depend on your window size, sprite size and how much space you want to use.

EDIT:
heres whats they look like (im using oversized sprites as place holders. theyre 300% scaled)
Okay, it works.
If I understand right, then I should increase Enemy Row X and Max Row X? Because old knight trying to hide out of the screen, and actors now stand almost in center.
1654628823238.png
Computer monitors, like all electronic displays, use 0,0 as the upper left corner. So increase X to go to the right, increase Y to go down.
And what to set, if I want to increase distance between actor rows?
Like, make actors set like enemies, and they won't step on each other whenever they are on different rows?
I've used next formulas.

max row X: (screenWidth - 50) - 4 * 16 - 16
max row Y: screenHeight - statusHeight - 16 - (4 * 64)
min row Y: screenHeight - statusHeight - 16 - (4 * 64)
center row Y: (maxRowY + minRowY) / 2 + 150

row 1 x: maxRowX - (maxRows - rowId) * 112 + rowIndex * 64
row 1 y: centerY + ((rowSize / -2 + 0.5) + rowIndex) * 32

Right now, it looks like this
1654632956390.png

I guess that it looks fine.

P.S. Okay, last question. I have set all actors, except one of them, to Auto Battle mode. They're still attack while they are placed in middle row (2). To control their reach, do I need to make many various weapons, which allow to attack different rows? Like "1 row only sword", or "1-2 row only spear" and etc?
the autobattle flag for actors would work fine in the "vanila" game, but i dont think you can use it if youre going to have other mechanics based on plugins...

you probably should go with the actor autobattle AI, also from yanfly and set up all the restrictions.

as for the other questions, X means width and Y means height.

increasing X would mean things will go more to the right and decreasing it would mean more to the left.

increasing Y would mean things go down and decreasing it would mean going up.

to set the actor rows distances, you will have to change the row home setting in the plugin configuration. each row has its own settings, experiment with each and adjust to your numbers.
And what to set, if I want to increase distance between actor rows?
Like, make actors set like enemies, and they won't step on each other whenever they are on different rows?
I'm really not sure what you're asking. I already told you that higher X goes to the right, so surely you can look at the formulae and change them to create a higher or lower value, as you like.

If there's something you don't understand in there, please describe it specifically.
P.S. Okay, last question. I have set all actors, except one of them, to Auto Battle mode. They're still attack while they are placed in middle row (2). To control their reach, do I need to make many various weapons, which allow to attack different rows? Like "1 row only sword", or "1-2 row only spear" and etc?
Yes. Did you read the instructions and watch the video for the Row Formations plugin? The row states don't do anything inherently to your combat system except set up the positioning on the screen.

If you want to change how weapons work in different rows, you must use the notetags described in the instructions. Yanfly even shows you an example of how to do it in the video.
Did you read the instructions and watch the video for the Row Formations plugin? The row states don't do anything inherently to your combat system except set up the positioning on the screen.
Yes, I did it.
액터 행 사이의 거리를 늘리려면 무엇을 설정해야 합니까?
예를 들어 액터를 적으로 설정하면 서로 다른 행에 있을 때 서로 밟지 않게 됩니까?
다음 공식을 사용했습니다.

최대 행 X: (screenWidth - 50) - 4 * 16 - 16
최대 행 Y: screenHeight - statusHeight - 16 - (4 * 64)
최소 행 Y: screenHeight - statusHeight - 16 - (4 * 64)
가운데 행 Y: (maxRowY + minRowY) / 2 + 150

행 1 x: maxRowX - (maxRows - rowId) * 112 + rowIndex * 64
행 1 y: centerY + ((rowSize / -2 + 0.5) + rowIndex) * 32

지금은 이렇습니다.
View attachment 228496
괜찮아 보인다고 합니다.

PS 좋아요, 마지막 질문입니다. 한 명을 제외한 모든 액터를 자동 전투 모드로 설정했습니다. 중간 행(2)에 배치된 동안에도 여전히 공격합니다. 범위를 제어하려면 다양한 행을 공격할 수 있는 다양한 무기를 많이 만들어야 합니까? "1 열 전용 검" 또는 "1-2 열 전용 창" 등?
나는 적의 위치를 너처럼 만들고 싶다.
적을 위한 당신의 공식은 무엇이었습니까?

@ForTheWin, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


Please make a new thread instead and in English.

Original thread: https://forums.rpgmakerweb.com/threads/questions-about-row-formations.148071/