MV Player on the left side, enemy on the right side. Enemy always looking at the wrong side.

Hi. I have my player character on the left side of the screen, with the enemy placed on the right side. It feels more natural to me. To reposition the player character, I use SVActorPosition, which I believe comes with MV. To perfectly position the enemy, I use MrTSEnemyPositions. However, both plugins merely allow the repositioning of the entities, they are still facing the wrong directions. The player is looking left, the enemy is looking right. Now, for the player, I have this script I got from a reddittor (I don't remember who :T):

JavaScript:
var _leftSide_Sprite_Actor_createMainSprite = Sprite_Actor.prototype.createMainSprite;
Sprite_Actor.prototype.createMainSprite = function() {
    _leftSide_Sprite_Actor_createMainSprite.call(this);
    this.scale.x = -1;
   
};

Sprite_Actor.prototype.updateTargetPosition = function() {
    if (this._actor.isActing()) {
        this.stepBack();
    } else if (this._actor.canMove() && BattleManager.isEscaped()) {
        this.retreat();
    } else if (!this.inHomePosition()) {
        this.stepForward();
    }
};

It fixes the issue of the player facing left. The player starts the battle facing the enemy, who is sitting on the right corner of the screen. That doesn't work for the enemy, though. The enemy ALWAYS start the battle looking to the right, they only turn to the left after the first turn.

So, is there any simple piece of code I could add to the code above to fix the issue with the enemy?

Thank you!
alternatively, you could remove the mirror code and simply use an image program to mirror the images themselves.
that is especially easy for static pictures but more work for battlersheets however.
Maybe this will do the trick.

JavaScript:
//==========================================================
    // Sprite_Battler
//==========================================================

// [Note] If you aren't using YEP_BattleEngine then only add the code referring to:
// Sprite_Battler.prototype.initMembers
// Sprite_Battler.prototype.startMove

const TY_Sprite_Battler_initMembers = Sprite_Battler.prototype.initMembers;
Sprite_Battler.prototype.initMembers = function() {
    TY_Sprite_Battler_initMembers.call(this);
    this.scale.x *= -1; // initial inverted facing
};

// [Note] Thanks Caethyril for this one
// https://forums.rpgmakerweb.com/index.php?threads/javascript-questions-that-dont-deserve-their-own-thread.46341/page-138#post-1411538
const TY_Sprite_Battler_startMove = Sprite_Battler.prototype.startMove;
Sprite_Battler.prototype.startMove = function(x, y, duration) {
    TY_Sprite_Battler_startMove.call(this, -x, y, duration); // inverted movement
};

//==========================================================
    // Game_Battler
//==========================================================

// YEP_BattleEngine ONLY
Game_Battler.prototype.spriteFaceForward = function() {
    this.setMirror(true); // original value is "false"
};

// YEP_BattleEngine ONLY
Game_Battler.prototype.spriteFaceBackward = function() {
    this.setMirror(false); // original value is "true"
};

//==========================================================
    // End of File
//==========================================================
alternatively, you could remove the mirror code and simply use an image program to mirror the images themselves.
that is especially easy for static pictures but more work for battlersheets however.
I don't remember exactly what the problem was back then, but your suggestion was precisely what I first tried. It was the easiest solution, I thought, considering I am an artist first, but it didn't quite work. Still, I appreciate the suggestion, and it doesn't hurt to give it another try, which I will do tomorrow.
Maybe this will do the trick.

JavaScript:
//==========================================================
    // Sprite_Battler
//==========================================================

// [Note] If you aren't using YEP_BattleEngine then only add the code referring to:
// Sprite_Battler.prototype.initMembers
// Sprite_Battler.prototype.startMove

const TY_Sprite_Battler_initMembers = Sprite_Battler.prototype.initMembers;
Sprite_Battler.prototype.initMembers = function() {
    TY_Sprite_Battler_initMembers.call(this);
    this.scale.x *= -1; // initial inverted facing
};

// [Note] Thanks Caethyril for this one
// https://forums.rpgmakerweb.com/index.php?threads/javascript-questions-that-dont-deserve-their-own-thread.46341/page-138#post-1411538
const TY_Sprite_Battler_startMove = Sprite_Battler.prototype.startMove;
Sprite_Battler.prototype.startMove = function(x, y, duration) {
    TY_Sprite_Battler_startMove.call(this, -x, y, duration); // inverted movement
};

//==========================================================
    // Game_Battler
//==========================================================

// YEP_BattleEngine ONLY
Game_Battler.prototype.spriteFaceForward = function() {
    this.setMirror(true); // original value is "false"
};

// YEP_BattleEngine ONLY
Game_Battler.prototype.spriteFaceBackward = function() {
    this.setMirror(false); // original value is "true"
};

//==========================================================
    // End of File
//==========================================================
Thank you so much. Sadly, that didn't work. I tried it several times while enable and disabling a few of my installed plugins that affect the enemy, but no luck. As such, I figure it is better to post my plugin list here, so you all can make better educated guesses.

Oh, I reckon the naming of plugins is important. I named this plugin you shared as "TobyYasha_SpriteBattler", maybe I should name it differently? Anyways, here is the plugin list. I know a few of the YEP plugins are out of order, they are some of the newer ones I installed, but I don't think any of them are messing up with the battles. Moreover, the problem with the enemy has been around for much longer. I could be wrong, though.

but it didn't quite work.
then post a screenshot of the picture that didn't work.
We can usually identify the problems that way.

Best guess? If you have battler sheets, you need to mirror each single cell in it's original position, you can't simply mirror the entire image because that would change where each "motion" is located. That's what I meant with the comment above about more work with battlersheets.
Oh, I reckon the naming of plugins is important. I named this plugin you shared as "TobyYasha_SpriteBattler", maybe I should name it differently?
The naming of plugins only matters when they have parameters and plugin commands.

Anyways, here is the plugin list. I know a few of the YEP plugins are out of order, they are some of the newer ones I installed, but I don't think any of them are messing up with the battles.
That's almost impossible to tell. If the Yanfly order isn't exactly right, it can cause some truly random things to mess up. It's much better to fix it and make sure than to say "I don't think this is the problem."
then post a screenshot of the picture that didn't work.
We can usually identify the problems that way.

Best guess? If you have battler sheets, you need to mirror each single cell in it's original position, you can't simply mirror the entire image because that would change where each "motion" is located. That's what I meant with the comment above about more work with battlersheets.
Mirroring the battler sheet doesn't work, because after the first turn, they turn around, like I mentioned. So instead of being facing the wrong direction in the first turn, they would be facing the wrong direction the rest of the fight.
bump
What have you done since your last post?

Have you fixed the order of all Yanfly plugins?

Have you tested Toby's plugin with only that and the Battle Engine Core turned on?

You're not really waiting on other people, we're waiting on you to provide fresh information.

Original thread: https://forums.rpgmakerweb.com/threads/player-on-the-left-side-enemy-on-the-right-side-enemy-always-looking-at-the-wrong-side.164447/