I'm using MV to make a pixel art game, with each asset scaled to 2x, but I'm having a lot of trouble with enemy battlers. They aren't lining up with the pixel grid I use for the background, and it ends up looking a little jarring. Is there a way to manually set enemy positions with X and Y values?
The spots where you can most easily see the misalignment are circled.
[MV] Precisely positioning enemy battlers
RPG Maker MV SupportLadyBaskerville's Miscellaneous Javascript Snippets
Over the last months, I've accumulated a few code snippets I did for requests. While none of them deserves its own plugin thread, I wanted to share them somewhere in case someone else might find use in them. They are posted below as both .js files to download and place directly in your plugins...
forums.rpgmakerweb.com
Thanks for the help! The "enemy placement" plugin is probably closest to what I need.
Unfortunately the explanation given within the plugin is very confusing. I can't tell how to use it.
Unfortunately the explanation given within the plugin is very confusing. I can't tell how to use it.
It seems to be intended to place in an enemy's notetags, not troop notetags? But I need to be able to place different copies of the same enemy in different places within the same troop. Something like "Set enemy #1's position to X32/Y64, set enemy #2's position to X64/Y64", etc.
...that's all you can use - if you look at the troop screen, there are no troop notes, thus there can't be troop notetags 😛
You can use what's provided by the plugin instructions to do that.
The index is the order they were added in when you added them to the troop, starting with 0.
Presuming you're not familiar with JavaScript math functions, it's impossible to give you anything more specific without you providing the information - choose one of your enemies and list the coordinates they would appear at.
...oh, huh, you're right. That makes this way harder.
I don't think I can use any sort of formula in a given enemy's notes to arrange them since I was hoping to be able to place enemies in specific squares on the grid in the screenshot (as I'm using yanfly's AOE script). I was hoping for a way to set every enemy's position for each troop manually.
Failing that, are there any scripts that just round up every enemy's X and Y values to the nearest even number so their pixels are aligned with the background? Thanks for your help.
I accomplished this by editing the Troops.json file directly, for each member there will be an enemyId, x, y, and hidden flag. You can manually set the x and y coordinates for pixel perfect positioning.
Word of warning though, back up the file before attempting to do this as you don't want to misformat it and cause it to become unreadable by RMMV.
Word of warning though, back up the file before attempting to do this as you don't want to misformat it and cause it to become unreadable by RMMV.
Oh I think this'll work great, thanks!
Original thread: https://forums.rpgmakerweb.com/threads/mv-precisely-positioning-enemy-battlers.166537/