public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

[RMMV] Yanfly Row Formation - Sharing the formulas for enemy position

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: [RMMV] Yanfly Row Formation - Sharing the formulas for enemy position
  • Original author: Moon_Haven
  • Original date: June 15, 2020
  • Source thread: https://forums.rpgmakerweb.com/threads/rmmv-yanfly-row-formation-sharing-the-formulas-for-enemy-position.122901/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > Javascript/Plugin Support

Summary

Hi all, It took me a while to figure this one out, thought I could share in case someone else is faced with same situation. Basically, I wanted the plugin to reposition my battlers automatically on the battle screen. The formulas for the actors seem to be working just fine, but the formulas for the enemies are a mess. Below is my code which allows to reposition the enemy battlers. My game only uses 3 rows, but I would assume this would work with any amount of rows (as long...

Archived First Post

Hi all,

It took me a while to figure this one out, thought I could share in case someone else is faced with same situation.

Basically, I wanted the plugin to reposition my battlers automatically on the battle screen. The formulas for the actors seem to be working just fine, but the formulas for the enemies are a mess.

Below is my code which allows to reposition the enemy battlers. My game only uses 3 rows, but I would assume this would work with any amount of rows (as long as you tweak the hard-coded 16, 32 and 64 values).

Parameters in YEP_RowFormation plugin:

At the top:

Code:
---Position Settings---
screenHeight - statusHeight - 16 - ((maxRows + 1) * 64)

At the very end:

Code:
---Enemy Rows---
Adjust Relative : true
Enemy Row X: 64 + $gameTroop.rowSize(maxRows) * 16 + (maxRows - rowId) * 112 - $gameTroop.rowSize(rowId) * 16 + rowIndex * 32
Enemy Row Y: centerY - ((rowSize / -2 + 0.5) + rowIndex) * 32


In your troops, don't forget to set the row for each enemy, and set it to Turn 0 // Battle
Protected download


End result is you get spaced rows, with enemies staggered.
1.png

Protected download
3.png

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

Referenced Images / Attachments

0.png
0.png
2.png
2.png
Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#rpg-maker-archive#js-support

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar