MV Bug with Yanfly Row Formations and Battle Core step distance setting

Everything works fine with default settings but if you change your step distance too much in Battle Core the "move row" part of row formations stops working right. If you use either the plugin commands or call alterRow() directly the result is the same.

With 0 step distance the row you are in adjusts for you leaving but your battler sprite stays in the same row it is not in anymore. Rows are just states and everything else is working as intended. The next turn battlers will refresh and correct all positions most of the time. Also if you open the formations menu and move people around(or even to same place) the positions are corrected.
It seems like the closer you have the distance to 0 the less movement works. BattleCore says the default is 48 but at 32 I never noticed a problem. At 8 my actors seem to move fine but the enemies are getting hung up. 1 is the same effect as 0. Null just makes everyone disappear on their turn with no errors in the console. :LZYgrin:

From what I can tell it first plays the battler casting motion while the the rows are updated and then the users battler sprite moves. For some weird reason when the step distance is set too low it never reaches the second step. Then when you move the next guy it updates the previous guys sprite to where it was supposed to be last turn.

The attached pics show what I'm talking about on my project and a fresh project. I even tried with DTB instead of STB and got the same result. Turns out even though it says 48px is the default step, it's actually 0. I was surprised to learn that with the default settings in a fresh project this is how it behaves. All I did was add two move skills and add the plugins in the picture.
Turns out even though it says 48px is the default step, it's actually 0.
That's definitely not the case. From the default engine code, an actor steps 48 pixels forward when it's their turn to input an action in battle:
Code:
Sprite_Actor.prototype.stepForward = function() {
    this.startMove(-48, 0, 12);
};

In Yanfly's Battle Engine Core, this function is modified to use the number you entered in the Step Distance plugin parameter.

That's the only Yanfly plugin that touches the function at all.
Yea RPG Maker is default 48 but when you install Battle Core the paramater is 0.
I was looking to use 0 as well.
Just sayin' 🤣
Screenshot 2023-01-19 153504.jpg

The line starting with @ default is setting the internal default value for the parameter, so that it matches the engine unless you edit it.

To actually address your topic, I've also seen wonky behavior trying to change RPG Maker's step distance. In my case, I was helping someone who wanted to move more, not less, but it also got to a point where weird glitches happened.

They didn't want to spend the time figuring out a definitive reason, so the only conclusion I have right now is that there appears to be a certain range of values where the stepping will work correctly.
Yea I must have changed it, whoops.
I wanted to not have a step distance as it throws off the look of the entire battle and still isn't really clear as to whos turn it is.
I keep looking though the code of rows/STB/batttle core and the rpg maker files trying to make sense of it but to no avail. There is a function called stepBack but its for 0 px so not sure how that is supposed to work.

Edit: Yea so staring at code I can't understand for hours didn't work. I have decided to just use 4 px step and move on. If anyone shows me a path to finding and fixing this I'll take another look.

Original thread: https://forums.rpgmakerweb.com/threads/bug-with-yanfly-row-formations-and-battle-core-step-distance-setting.154250/