MV Sideview mirrored problem

Hello all! i'm using a simple script that mirror the position of actor and enemy :
Spoiler: mirror plugin
Code:
/*:
 * @target MZ
 * @plugindesc Sideview actors step/face right. For use with VisuStella Battle Core.
 * @author Caethyril
 * @orderAfter VisuMZ_1_BattleCore
 * @url https://forums.rpgmakerweb.com/index.php?threads/140932/
 * @help Free to use and/or modify for any project~
 *
 * Adjust the home position in VisuStella Battle Core's parameters:
 *   - Actor Battler Settings > JS: Home Position
 *   - Find this line:
 *        x += index * 32;
 *   - Add this line immediately afterwards:
 *        x = Graphics.boxWidth - x;
 */

// Override! Step 48 px -> instead.
Sprite_Actor.prototype.stepForward = function() {
    this.startMove(48, 0, 12);
};

(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);

And with that i'm using Yanflybattlecore engine.. now the only problem is the X position of the Actors
The settings is home position X and this is the default formula :
screenWidth + 16 + (maxSize + 2) * 32 + index * 32

Now.. how i can invert this ? i try but im not very good with that.
And i'm using too Yep X Act seq Pack2 for set simple animation like moving to te target when
attacking melee

Thanks for the helps!!!
Oh neat, it works in MV as well?

YEP Battle Engine Core's default Home Position X value is:

screenWidth - 16 - (maxSize + 2) * 32 + index * 32
You can invert it by subtracting everything from screenWidth, which simplifies to:

80 + maxSize * 32 - index * 32

In case it helps:
  • screenWidth is at the far right of the screen (0 is the far left).
  • maxSize is the maximum number of party members allowed in battle.
  • index is 0 for the party leader, 1 for the next guy, 2 for the next, etc.
Oh neat, it works in MV as well?

YEP Battle Engine Core's default Home Position X value is:

screenWidth - 16 - (maxSize + 2) * 32 + index * 32

You can invert it by subtracting everything from screenWidth, which simplifies to:

80 + maxSize * 32 - index * 32


In case it helps:
  • screenWidth is at the far right of the screen (0 is the far left).
  • maxSize is the maximum number of party members allowed in battle.
  • index is 0 for the party leader, 1 for the next guy, 2 for the next, etc.
Yes, after few try i found the correct position. But the problem is much wider :LZYangry:
After that, actor and enemy face the wrong direction when attacking...
And probably is everything different when try to setting the action animation of attacks, abilities with Act seq pack (1,2,3) .. So i understund that no one care of Occidental view of jrpg xD
and i abbandon the idea for now.

Original thread: https://forums.rpgmakerweb.com/threads/sideview-mirrored-problem.151761/