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
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:
---Position Settings---
screenHeight - statusHeight - 16 - ((maxRows + 1) * 64)
At the very end:
---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
End result is you get spaced rows, with enemies staggered.
Protected download
Downloads / Referenced Files
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadReferenced Images / Attachments
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.
Replies (0)
No replies yet.
Topic Summary
Loading summary...

