MV Animated SV Battler always layer current attacker above target

something thats been bothering me for a long time is that enemies seem to always be layered under actors like this
1769973180091.png

(also not sure why the animation is slightly lower for enemies if anyone knows what thats about id appreciate it)
whereas actors are always above enemies like this
1769973256313.png

battle engine core has this setting
1769973358830.png

however i get the above results on normal and i obviously dont want enemies to always be on top instead
ideally whoever is currently attacking would be layered above the enemy
i have a feeling the fix is something simple im missing so if anyone knows id be happy to hear it
I think a simple workaround is that when you use the move to target action sequence command, you add +1 pixel y-offset to the command?
thought about that but it does the same thing for some reason
1769977969992.png
Hmmm okay, that worked for me with MZ VisuStella. Quickly googled a thread for MV and someone said the same idea worked for them. Just in case, in your screenshot you've set the priority to normal for 'Front Sprite Priority', did you do that for 'Side Sprite Priority' too? If that's not the case, then I don't know, maybe someone else can help you. (I quickly checked the Battle Core code and it seems to be doing a .z comparison before y-comparison, but the z seems to be 1 for all. Don't know if some other plugin affects that.)
side sprites also at normal yeah, not sure what it could be that causes it to act abnormally
I think this might just be how it works, that actors are always above enemies – as far as I know, it's based on the order they're added to the battlefield.

I actually adjusted this in my Reserve Actions plugin, though I'm not sure if it solves your problem. The core of the code is this:

JavaScript:
Spriteset_Battle.prototype.sortBattlerSprites = function() {
	const temp = this.battlerSprites();
	temp.sort(function(a, b) {
		if (a.y !== b.y) {
			return a.y - b.y;
		} else {
			return a.spriteId - b.spriteId;
		}
	}.bind(this));
	for(let i = 0; i < temp.length; i++) {
		this._battleField.addChild(temp[i]);
	};
};

That's not enough on its own though. It's a completely new function, so you'd have to find the correct place to call it. The Reserve Actions function only calls it when a reserve actor is added to the battlefield, so just installing my plugin probably wouldn't be sufficient either. I'd have to poke around a bit more to figure out where else is a good place to call it.

Additionally, the exact logic might not be quite right for your use-case. The code above sorts them based on their Y value, but from the description of your issue, you might want the actor to have a lower Y value yet still appear above the enemy. Still, adding a Z order to that logic isn't too difficult.

Original thread: https://forums.rpgmakerweb.com/threads/animated-sv-battler-always-layer-current-attacker-above-target.182248/