MV Prevent animation mirroring on actor

Hello,

MV automatically mirrors animations when played on the actor in sideview battle systems. Many animations look wrong if flipped in my game, so I'd like to prevent this from occurring.

I found a thread that points to a partial solution: Help me guys! Flipped animations...

However, I'd prefer not to go in and edit rpg_objects.js and every single plugin that references animation mirroring. Are there any other solutions to this issue out there? Would it be hard to develop a plugin that does this?
Couldn't you just?
1702511862894.png
That would cause the same animation to be mirrored incorrectly if played on enemies. Some of the animations that I don't want to be flipped are called by a plugin, not through the normal GUI. I recognize that the animations are implemented using this.startAnimation(), but I'm not sure what to do if I wanted to make that specific code stop mirroring, or if I use conditionals to make it play different animations if it's an actor or troop, or what. My javascript is still beginner-intermediate.
Make an actor version and an enemy version of the skill? :LZSskeptic:
It's not a skill, it's an interrupt mechanic that runs from a plugin.
I see, we'll that seems to be pertinent information for troubleshooting this.

I likely cannot help you with the plugin, since I don't use any plugins of that type, but it will help others to know what plugin specifically you are using, and how it is set up to display the animation in the plugin.
For example, if it's a note tag somewhere, then maybe you can just create an enemy version of the animation and a player version of the animation.
I'd considered the approaches suggested in this thread. It seems that there should be a way to globally disable animation mirroring in combat, knowing that I could simply delete lines from rpg_objects and a half-dozen other plugins -- ultimately that might be what I do.
Maybe try this (save as .js file, import as plugin):
JavaScript:
/*:
 * @target MV
 * @plugindesc No animation mirroring.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/163831/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Usual anim setup except always `mirror = false`.
void (function(alias) {
  Sprite_Animation.prototype.setup = function(target, animation, mirror, delay) {
    alias.call(this, target, animation, false, delay);
  };
})(Sprite_Animation.prototype.setup);
It's perfect!
Great! Happy animating~
Maybe try this (save as .js file, import as plugin):
JavaScript:
/*:
 * @target MV
 * @plugindesc No animation mirroring.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/163831/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Usual anim setup except always `mirror = false`.
void (function(alias) {
  Sprite_Animation.prototype.setup = function(target, animation, mirror, delay) {
    alias.call(this, target, animation, false, delay);
  };
})(Sprite_Animation.prototype.setup);
Hi @caethyril
I was wondering, is it possible to make this change not affect characters carrying two weapons?

Thanks!
I was wondering, is it possible to make this change not affect characters carrying two weapons?
If you want to base it on the target, I imagine you could replace this:
JavaScript:
    alias.call(this, target, animation, false, delay);
...with this:
JavaScript:
    var ok = typeof target.weapons !== "function" || target.weapons().length < 2;
    alias.call(this, target, animation, ok ? false : mirror, delay);

However, I guess what you actually want is to avoid mirroring the second hit when dual-wielding. Sprite_Animation knows nothing about the source of the animation, e.g. action subject. So what you are asking would require a different approach. Maybe this (untested):
JavaScript:
/*:
 * @target MV MZ
 * @plugindesc Do not mirror the off-hand weapon attack animation.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/posts/1514494/
 * @help Free to use and/or modify for any project, no credit required.
 */
// Override!
Window_BattleLog.prototype.showActorAttackAnimation = function(subject, targets) {
    this.showNormalAnimation(targets, subject.attackAnimationId1(), false);
    this.showNormalAnimation(targets, subject.attackAnimationId2(), false); // edit 1 of 1
};

Otherwise, I suggest you start your own thread.

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.

Original thread: https://forums.rpgmakerweb.com/threads/prevent-animation-mirroring-on-actor.163831/