Change SV Enemy Attack Direction.

I'm trying to set up mirrored SV battles, with the player on the left, and enemies on the right.

How can I change enemy dash/move animations to go towards the left when attacking, rather than to the right?

Screenshot 2023-05-14 081827.png
Well...how do you have them doing that at all? In the default engine, the enemy battlers don't move, so the answer would be in whatever plugin you're using to add that movement.

With something like Yanfly's Action Sequences it would be automatic, because using the move command with a target will move to that target, regardless of where on the screen it is.
If you use yanfly battle engine, side view enemies move forward while attacking is determined by this.

Sprite_Battler.prototype.stepForward = function() {
this.startMove(Yanfly.Param.BECStepDist, 0, 12);
};


Modifying the 12 to 0 or negative would make the enemy stop moving,

Maybe use mog hunter's battle animation plugin to add the movement?
@miragewolf - the third argument of startMove is duration, i.e. 12 frames. The first argument is X distance, in this case equal to the Step Distance plugin parameter. It is possible to enter a negative value for that, via the Text tab, and similarly for the Flinch Distance parameter. From there, I imagine action sequences could be used to invert the attack motions if necessary.

Alternatively, I got a message from the OP that suggests they may be using a small plugin (view file) that I wrote for mirroring actor battler sprites? Unfortunately that was not written to be compatible with YEP Battle Engine Core, i.e. moving enemies. However, you may be able to simply copy+paste the actor movement stuff and apply it to enemies, e.g. (untested):
Spoiler: plugin code + animated enemy patch
JavaScript:
/*:
 * @plugindesc Horizontally mirror sideview actor sprites and battler positions/movements.
 * @author Caethyril
 * @help Terms of use:
 *    Free to use and/or modify~
 */

(function(alias) {
    // Horizontally mirror movement offsets
    Sprite_Actor.prototype.startMove = function(x, y, duration) {
        alias.call(this, -x, y, duration);
    };
})(Sprite_Actor.prototype.startMove);

(function(alias) {
    // Mirror X value when setting actor home position
    Sprite_Actor.prototype.setHome = function(x, y) {
        alias.call(this, Graphics.boxWidth - x, y);
    };
})(Sprite_Actor.prototype.setHome);

(function(alias) {
    // Horizontally mirror actor battler sprite immediately after creation
    Sprite_Actor.prototype.createMainSprite = function() {
        alias.apply(this, arguments);
        this._mainSprite.scale.x *= -1;
    };
})(Sprite_Actor.prototype.createMainSprite);

(function(alias) {
    // Horizontally mirror/reposition weapon sprite immediately after creation
    Sprite_Weapon.prototype.initMembers = function() {
        alias.apply(this, arguments);
        this.scale.x *= -1;
        this.x *= -1;
    };
})(Sprite_Weapon.prototype.initMembers);

// For enemies, too.
(function(alias) {
    Sprite_Enemy.prototype.startMove = function(x, y, duration) {
        alias.call(this, -x, y, duration);
    };
})(Sprite_Enemy.prototype.startMove);

(function(alias) {
    Sprite_Enemy.prototype.setHome = function(x, y) {
        alias.call(this, Graphics.boxWidth - x, y);
    };
})(Sprite_Enemy.prototype.setHome);
@miragewolf - the third argument of startMove is duration, i.e. 12 frames. The first argument is X distance, in this case equal to the Step Distance plugin parameter. It is possible to enter a negative value for that, via the Text tab, and similarly for the Flinch Distance parameter. From there, I imagine action sequences could be used to invert the attack motions if necessary.

Alternatively, I got a message from the OP that suggests they may be using a small plugin (view file) that I wrote for mirroring actor battler sprites? Unfortunately that was not written to be compatible with YEP Battle Engine Core, i.e. moving enemies. However, you may be able to simply copy+paste the actor movement stuff and apply it to enemies, e.g. (untested):
Spoiler: plugin code + animated enemy patch
JavaScript:
/*:
 * @plugindesc Horizontally mirror sideview actor sprites and battler positions/movements.
 * @author Caethyril
 * @help Terms of use:
 *    Free to use and/or modify~
 */

(function(alias) {
    // Horizontally mirror movement offsets
    Sprite_Actor.prototype.startMove = function(x, y, duration) {
        alias.call(this, -x, y, duration);
    };
})(Sprite_Actor.prototype.startMove);

(function(alias) {
    // Mirror X value when setting actor home position
    Sprite_Actor.prototype.setHome = function(x, y) {
        alias.call(this, Graphics.boxWidth - x, y);
    };
})(Sprite_Actor.prototype.setHome);

(function(alias) {
    // Horizontally mirror actor battler sprite immediately after creation
    Sprite_Actor.prototype.createMainSprite = function() {
        alias.apply(this, arguments);
        this._mainSprite.scale.x *= -1;
    };
})(Sprite_Actor.prototype.createMainSprite);

(function(alias) {
    // Horizontally mirror/reposition weapon sprite immediately after creation
    Sprite_Weapon.prototype.initMembers = function() {
        alias.apply(this, arguments);
        this.scale.x *= -1;
        this.x *= -1;
    };
})(Sprite_Weapon.prototype.initMembers);

// For enemies, too.
(function(alias) {
    Sprite_Enemy.prototype.startMove = function(x, y, duration) {
        alias.call(this, -x, y, duration);
    };
})(Sprite_Enemy.prototype.startMove);

(function(alias) {
    Sprite_Enemy.prototype.setHome = function(x, y) {
        alias.call(this, Graphics.boxWidth - x, y);
    };
})(Sprite_Enemy.prototype.setHome);
Can confirm, it worked! Thanks so much.
Great! Happy RPG Making~ 👋

Original thread: https://forums.rpgmakerweb.com/threads/change-sv-enemy-attack-direction.157506/