MV Yanfly's Row Formation question about troops swapping positions.

Weird, it's still not working.

I did each step, then went back and tried it again in case I missed anything, but it is not moving them up.

I did remove all the code in my row states (the entire NOTE block is totally empty for all 4 rows). I then first tried putting the code in state 1 (which I'm assuming you mean as the default Knockout state that comes with all new RPG Maker MV projects) and then ran a test battle and killed the enemy in the front row with skill 1 (Default Attack) and skill 9 (Default Fire). But the enemies in row 2, 3, 4 stayed in place. I then added the code to both skills (skill 1, skill 9) and ran it again, but the enemies stayed i place.

I could attempt to add the code to every skill I have so far defined in the Skills database and run it again, but since I haven't used those abilities in the test battle I don't think it will matter.

By the way, I am running a debugger and can see if I'm getting errors but neither of our code is throwing any errors either. I'm not trying to say my code is "right", I just wanted to let you know I am checking for that sort of thing to make sure I'm not breaking anything.


The intent of that tag, as described in the documentation, is to determine when a battler is put into a specific row, and to use the described condition variable to turn the state on and off accordingly.

It's not intended for you to run miscellaneous code with different timing in there. That's probably why you're seeing weird offsets and positionings, because your row states are defaulting to true and you're simultaneously changing their row but never turning off the old row state.

That sounds right. It does seem to be behaving that way. I could perhaps get around this by fiddling with the X and Y axis settings in the plugin.
I'm not sure what to tell you - I just made a new project, put in the Buffs & States and Row Formation. I made a troop with four enemies set to default one in each row.

I pasted my code into Knockout, killed the first enemy, and the other three moved.

If you're trying to do all of this using test battle, that could be the problem. The test battle doesn't load all boot data, so once you start using plugins with notetags it doesn't work reliably. You should be testing by starting a new game and doing a battle in the actual play test.
Found the culprit!

The problem is the YEP_BuffsStatesCore plugin.

I was never using that plugin to begin with (thankfully I have all of Yanfly's plugins and was able to import it into a new project) so that's why you're getting different results.

When I turn YEP_BuffsStatesCore on your code works, but when I turn it off it doesn't work. So maybe there's something in that particular plugin which fixes something going on somewhere else?

As a test I also tried running my code with the YEP_BuffsStatesCore on and it doesn't work great; it runs unreliably - most certinaly for the reason you explained above.
Oh, I also fixed the offset issue. I didn't realize I somehow changed the Enemy Row Y value, so that was an easy fix since I changed it back to the default "screenY" value.
The problem is the YEP_BuffsStatesCore plugin.

I was never using that plugin to begin with (thankfully I have all of Yanfly's plugins and was able to import it into a new project) so that's why you're getting different results.
Yes - I did say in post #18 where I first gave the notetag that the notetag is from Buffs & States. But you may have missed it with everything else going on.

Plugins have nothing to do with code, generally, unless you're using functions specific to that plugin; but notetags won't do anything if the plugin that looks for and executes them isn't installed.
I did say in post #18 where I first gave the notetag that the notetag is from Buffs & States

I see it now. When I first read it I must have thought you were just talking about something in general, not a specific plugin from Yanfly.

Thanks for the help.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-row-formation-question-about-troops-swapping-positions.153993/