[Solved] Can I make the game use Up + Down as well as Left + Right in battle?

In battle you use the Left and Right arrow keys to select an enemy to be targeted. However, due to the way the game organizes enemies, the letter suffixes don't align with the order in which you target them.

In battle, I have my enemies organized based on an invisible grid. Like so:
grid.png

The enemies are organized like this:
A B C
D E

Starting at A, pressing Left doesn't take me to B, it takes me to D. If I continue to cycle through the enemies, it goes from D to B, and then to E, and then C before looping. This feels pretty unintuitive and janky, especially for these enemies Troops with multiple rows, which I have quite a few of in my game. Having four directions to navigate the enemy grid with would be nice.
anything is possible, it just needs to be programmed in.
but it needs to be programmed into the battlesystem that you already changed, so you have to link to the websites of the scripts you're using before anyone can even guess at what patch is needed where to make this request a reality.
If I continue to cycle through the enemies, it goes from D to B, and then to E, and then C before looping.
This is because of Yanfly's battle engine. Line 2227 @data.sort!
Comment it out to have them stay the order you place them on the screen.

As for the up and down, we can add a cursor up and down methods but if you want it to skip to D after pressing down from A then that will take positional referencing and I have no idea how to program that in. Maybe something with the sorting and making checks to the sorted order. But it gets a fair bit complicated.
This is because of Yanfly's battle engine. Line 2227 @data.sort!
Comment it out to have them stay the order you place them on the screen.

As for the up and down, we can add a cursor up and down methods but if you want it to skip to D after pressing down from A then that will take positional referencing and I have no idea how to program that in. Maybe something with the sorting and making checks to the sorted order. But it gets a fair bit complicated.
Thanks, it worked!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-can-i-make-the-game-use-up-down-as-well-as-left-right-in-battle.152119/