MZ Side-View Battle Actors on the left?

Hello there. Is there a way to mirror the actors in the side-view battle of RPG Maker MZ, so they stand on the left side and the enemies on the right? I would really like to do that for my game.

After some searching, I found this script for MV but I doubt that it would work for MZ.

The only other way I found was to edit the actor's positions via plugin and mirroring the sprites, but then things like the walking animation wouldn't work, as the actors still move or turn to the left.

So, is there a plugin to mirror the side-view battlers in MZ?



A not neccessary thing I would also like: Would it be possible to add an Option to the game to mirror the battlers how the player likes it?
I haven't tested, but I imagine it'll work because the relevant methods seem identical in MZ. The only way to be sure is to try it! Enemy placement is manual, so the plugin only needs to reposition/flip the actors (and their weapons). I wrote one for MV:
This may not work for you depending on other plugins you may be using. If it does work then you can add a @target MZ line to the plugin header to remove the Plugin Manager warning.

Allowing it to be switched on/off would require the plugin to be written differently, and have extra bits for the new config setting. Would also need to include something to change the enemy positions.

Visustella Battle Core supports this--but I haven't tested it, so I don't know how.
Moved to: Plugin Requests
I haven't tested, but I imagine it'll work because the relevant methods seem identical in MZ. The only way to be sure is to try it! Enemy placement is manual, so the plugin only needs to reposition/flip the actors (and their weapons). I wrote one for MV:
This may not work for you depending on other plugins you may be using. If it does work then you can add a @target MZ line to the plugin header to remove the Plugin Manager warning.

Allowing it to be switched on/off would require the plugin to be written differently, and have extra bits for the new config setting. Would also need to include something to change the enemy positions.
Thank you very much. It actually worked! Interestingly it only worked when I DIDN'T put @target MZ in. When I did, it said "Invalid or unexpected token" when trying to load a Battle Test.

However, I have another problem now: The characters jump to the left when they do a physical attack on any enemy.
Maybe it has something to do with Visu battleCore, which I'm also using. I tried moving the plugin and disableing BattleCore, but then the actors didn't jump at all...


Visustella Battle Core supports this--but I haven't tested it, so I don't know how.
You said that BattleCore itself has this function? I couldn't find it yet, so could you show me where in the plugin it is?
Interestingly it only worked when I DIDN'T put @target MZ in. When I did, it said "Invalid or unexpected token" when trying to load a Battle Test.
👋 This means you didn't put it in the plugin header. The header is the part at the top of the plugin, starting with /*: and ending with */. However...

The characters jump to the left when they do a physical attack on any enemy.
Maybe it has something to do with Visu battleCore, which I'm also using. I tried moving the plugin and disableing BattleCore, but then the actors didn't jump at all...
You will need to investigate that plugin's options instead. This is why it's important to state which plugins you're using when making a request.
Thank you very much. It actually worked! Interestingly it only worked when I DIDN'T put @target MZ in. When I did, it said "Invalid or unexpected token" when trying to load a Battle Test.

However, I have another problem now: The characters jump to the left when they do a physical attack on any enemy.
Maybe it has something to do with Visu battleCore, which I'm also using. I tried moving the plugin and disableing BattleCore, but then the actors didn't jump at all...


You said that BattleCore itself has this function? I couldn't find it yet, so could you show me where in the plugin it is?
Click on the link I provided, if you haven't; it cuts to the "Animated Sideview Battler Support For Enemies" section.
Click on the link I provided, if you haven't; it cuts to the "Animated Sideview Battler Support For Enemies" section.
So I read through everything until there was no more information about the battle actors/enemies,
and I found no way to mirror the actors. There are only functions to change the actor's postitions and functions to mirror the animations, but I already knew of those before.
👋 This means you didn't put it in the plugin header. The header is the part at the top of the plugin, starting with /*: and ending with */. However...


You will need to investigate that plugin's options instead. This is why it's important to state which plugins you're using when making a request.

So I tested changing all sorts of values in BattleCore.
Especially, you can change the x-value for the meele action, but no matter how I changed it (I tried doing -value and +value), the actors kept jumping to the left and facing the left as if the enemy was standing there.

So changing the value inside BattleCore didn't change anything.

I also tried moving the plugin order, but it changed nothing. When I moved it above BattleCore, nothing changed, and when I moved it above VisuStella Core, the actors disappeared completely.

And when disabeling the BattleCore, the actors where placed at the upper right side of the screen, and didn't jump to the enemy at all anymore.


But when I removed this part about the movement of the actors, just being curious what will change:
(function(alias) { // Horizontally mirror movement offsets Sprite_Actor.prototype.startMove = function(x, y, duration) { alias.call(this, -x, y, duration); }; })(Sprite_Actor.prototype.startMove);

The characters were jumping in the right (haha) direction to the enemy position, but were still facing the left.
Also they were walking to the left in the battle intro, but I already expected that.

So maybe I am still overlooking something in BattleCore or VisuStella Core, or I would need to change your plugin a bit to fit to that.

But yeah, except for that this plugin works great, thank you again.
Oh, I see what you're trying to do. My bad! I should have read your thread more carefully.

Check it out! I got my Kappa battler working!
Especially, you can change the x-value for the meele action, but no matter how I changed it (I tried doing -value and +value), the actors kept jumping to the left and facing the left as if the enemy was standing there.
Yes, because that's a method from Battle Core: it jumps to a specific point on screen, but my solution mirrors all moves, including that jump. 😅

Try the attached plugin instead of what I linked earlier (full code in spoiler below).
Spoiler: Click to see plugin code
JavaScript:
/*:
 * @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);
As noted in this plugin's help, you can adjust the home position in VisuStella Battle Core's parameters. 👋

If actors still end up facing the wrong direction then I'm not sure I can do anything about that, because VisuStella's plugin code is obfuscated, i.e. deliberately difficult to read.
Yes, because that's a method from Battle Core: it jumps to a specific point on screen, but my solution mirrors all moves, including that jump. 😅

Try the attached plugin instead of what I linked earlier (full code in spoiler below).
Spoiler: Click to see plugin code
JavaScript:
/*:
 * @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);
As noted in this plugin's help, you can adjust the home position in VisuStella Battle Core's parameters. 👋

If actors still end up facing the wrong direction then I'm not sure I can do anything about that, because VisuStella's plugin code is obfuscated, i.e. deliberately difficult to read.
I'll look into it. Thank you. ^^
I hope it works!
Just adding, i tried the plugin and it worked for me 🙂
Great! Since it's been months and the thread starter doesn't seem to have any further questions, I assume they have no further questions on this, so...

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

As already seen with my first suggestion here, there may be clashes with certain features added by VisuStella's Battle Core (e.g. move to target). For problems like that, consider checking the plugin's options/parameters, and/or starting a new thread:

Original thread: https://forums.rpgmakerweb.com/threads/side-view-battle-actors-on-the-left.140932/