Notes:
- I'm using Yanfly plugins.
- I'm using screen size of 1280 x 720. You can use pretty much any size that you want, but you will need to change the hard values (150, 26, 52...) to fit your game screen size.
STEP 1 - Position our actors and enemies.
I used YEP_RowFormation to automate the positions. My game will use 3 rows for actors and enemies. Row1 (fighters) is at the front, Row2 (support) is middle, Row3 (casters) is at the back.
The values below assume that the sprites are 64x64. If they are any bigger, you will want to change the values of
16,
32 and
64.
The value
150 is the distance from the edge of the screen.
The values
26 and
52 are for the staggering. Simply put, we add (or retract) these values for each sprite on a row, so that it gives a sense of perspective. These will need to be changed (trial and error) if you use a different screen size than 1280 x 720. If you are using default RMMV size, you can use
16 and
32 as a starting point.
This is what it would look like.
In YEP_RowFormation:
Maximum Rows: 3
Maximum Row X: screenWidth - 150 + 26
Maximum Row Y: screenHeight - statusHeight - 16
Minimum Row Y: screenHeight - statusHeight - 16 - ((maxRows + 1) * 64)
Center Row Y: (maxRowY + minRowY) / 2 + 16
Row 1 Home X: 150 - 32 + $gameParty.rowSize(maxRows) * 26 + (maxRows - rowId) * 150 - $gameParty.rowSize(rowId) * 26 + rowIndex * 52
Row 1 Home Y: centerY - ((rowSize / -2 + 0.5) + rowIndex) * 64
Row 2 Home X: 150 - 32 + $gameParty.rowSize(maxRows) * 26 + (maxRows - rowId) * 150 - $gameParty.rowSize(rowId) * 26 + rowIndex * 52
Row 2 Home Y: centerY - ((rowSize / -2 + 0.5) + rowIndex) * 64
Row 3 Home X: 150 - 32 + $gameParty.rowSize(maxRows) * 26 + (maxRows - rowId) * 150 - $gameParty.rowSize(rowId) * 26 + rowIndex * 52
Row 3 Home Y: centerY - ((rowSize / -2 + 0.5) + rowIndex) * 64
Enemy Row X: screenWidth - 150 + 32 - $gameTroop.rowSize(maxRows) * 26 - (maxRows - rowId) * 150 + $gameTroop.rowSize(rowId) * 26 - rowIndex * 52
Enemy Row Y: centerY - ((rowSize / -2 + 0.5) + rowIndex) * 64
STEP 2 - Flip (mirror) the sprites
Now that I have positioned the actors where the enemies should be, and vice-versa, the sprites are looking in the wrong direction. To fix this:
In YEP_BattleEngineCore:
Step Distance: -32
Flinch Distance: -16
In the *CODE* of YEP_BattleEngineCore.js:
I switched the values for mirroring. Find the following lines:
JavaScript:
Game_Battler.prototype.spriteFaceForward = function() {
this.setMirror(false);
};
Game_Battler.prototype.spriteFaceBackward = function() {
this.setMirror(true);
};
Change the
false to
true, and
true to
false
JavaScript:
Game_Battler.prototype.spriteFaceForward = function() {
this.setMirror(true); // Default: false
};
Game_Battler.prototype.spriteFaceBackward = function() {
this.setMirror(false); // Default: true
};
STEP 3 - Action Sequence (no longer needed, code in 3rd post of this thread fixes all of this)
Everything is now reversed, even action sequence. For instance, moving an actor to the front of an enemy was: move user: target, front, 30 but is it now: move user: target, back, 30
A simple attack will now look like this:
Code:
<setup action>
clear battle log
display action
immortal: targets, true
cast animation
wait for animation
</setup action>
<whole action>
face user: target
if user.attackMotion() !== 'missile'
move user: target, back, 30
wait for movement
else
perform start
wait for movement
end
</whole action>
<target action>
motion attack: user
wait: 10
action effect
if target.result().missed || target.result().evaded
else
attack animation: target
wait for animation
end
</target action>
<finish action>
immortal: targets, false
wait for new line
clear battle log
perform finish
wait for movement
wait for effect
</finish action>