VisuStella's Weapon Animations plugin

I've read through the parameters and instructions for this plugin and have a couple questions

From what I've read this plugin helps you customize the weapon's animation for the attack command or any action sequence that uses an attack command.

This seem straight forward to me, but what I'm wondering is, if this plugin allows you to add a weapon animation to other commands like Ready/Physical or Guard. The battler sprite sheets I'm using for my project has weapon's visible for commands like Guard and Ready/Physical. If I can't customize weapon animations for these default commands, I may need to rethink the battler sprite sheets
Akea Animated Battle system 2 for MZ is free and does what you're looking for. Actors and weapons are on separate sheets and layer depending on what's equipped.
I have a free open project demo on my itch page, and tutorials on using it on my wordpress.
Interesting!

There’s no compatibility issues with VS plugins?

[edit]

I did some quick reading up on this. It's a very impressive plugin with a lot of customizations. However, my project is heavily dependent on Visustella plugins. I read their Battle Core plugin has compatibility issues with Akea Animated Battle system 2 for MZ, and since they use obfuscated code, a solution might not be feasible.

I'm going to have to continue exploringa solution within the Weapon Animated plugin from Visustella.

Here's an example of a sv_battler from my project. I added the weapons for visual aid but they would exist on a separate png file unique to each weapon.

Untitled.png

OB0rLBf.png


Would something like this work under the weapon notetag? What I'm unsure about is if the plugin allows you to replace multiple motion types for the same weapon.

Untitled2.png
Looking at your examples, VS Weapon animations will not do what you want, the tag you have in your last image only supplants the attack motion for the motion you have selected, it doesn't change that particular motion. For example, the <Weapon Motion:guard> will make that, when you select the attack command and the character moves to attack, the motion used for animating the batler will be the guard motion from the battler's motion, not that it will show that particular file for the weapon when you select guard command, VS Weapon animations doesn't consider such things. Unless there is a plugin that specificaly handles that kind of logic that is compatible with Visustella plugins, your best bet is to basically draw the weapons directly into different files and handle a parallel common event to update that based on the equiped weapon, basically like your first image in your last post.
RPG Maker MZ - SV Equip Sprite Expansion Plugin

Try this to see if it solves your problem.
Although it's a paid plugin.
Looking at your examples, VS Weapon animations will not do what you want, the tag you have in your last image only supplants the attack motion for the motion you have selected, it doesn't change that particular motion. For example, the <Weapon Motion:guard> will make that, when you select the attack command and the character moves to attack, the motion used for animating the batler will be the guard motion from the battler's motion, not that it will show that particular file for the weapon when you select guard command, VS Weapon animations doesn't consider such things. Unless there is a plugin that specificaly handles that kind of logic that is compatible with Visustella plugins, your best bet is to basically draw the weapons directly into different files and handle a parallel common event to update that based on the equiped weapon, basically like your first image in your last post.
Thanks, that helps explain the VS Weapon Animation plugin better. I had a feeling this would be the explanation.

Do you think a common event that toggles 12 actors with 10 weapons each is too much? Would it slow the game down?

RPG Maker MZ - SV Equip Sprite Expansion Plugin

Try this to see if it solves your problem.
Although it's a paid plugin.
Taking a closer look to make sure it doesn't have major compatibility issues with VisuStella plugins, specifically the BattleCore and BattlesystemATB plugins.
Thanks, that helps explain the VS Weapon Animation plugin better. I had a feeling this would be the explanation.

Do you think a common event that toggles 12 actors with 10 weapons each is too much? Would it slow the game down?


Taking a closer look to make sure it doesn't have major compatibility issues with VisuStella plugins, specifically the BattleCore and BattlesystemATB plugins.


Using it directly will cause some issues.

The code needs some minor tweaks.

I estimate these issues will be fixed in version v1.3.
I purchased the plugin and now reading through the manual.

It seems like I have three options to pick from.

Option 1: SV Equip Sprite Expansion Plugin
Pro - It would allow me to customize weapon animations over each motion type.
Con - Risk compatibility issues with VisuStella plugins.

Option 2: Parallel Common Events
Pro - No risk of compatibility issues with VisuStella plugins.
Con - Would common events this large cause lag?

Option 3: VisuStella Weapon Animation plugin
Pro - Fully compatible with other VisuStella plugins.
Con - Weapon animations would be limited to attack motions only.
Do you think a common event that toggles 12 actors with 10 weapons each is too much? Would it slow the game down?
Depends on how you call and structure the common event. I think you best bet is to find a plugin that calls a common event after equiping a weapon or one that triggers after closing main menu. But, overall, a common event that only switches files every frame with a wait each frame shouldn't take that much just make sure that there is a way to skip all if there is no change, like keeping a variable with the current name of the file for the character, if it hasn't changed, do nothing, else check the current weapon and update accordingly. That way, even if checked every frame, it will do basically nothing and will have negligible impact on the framerate or the game itself.
Depends on how you call and structure the common event. I think you best bet is to find a plugin that calls a common event after equiping a weapon or one that triggers after closing main menu. But, overall, a common event that only switches files every frame with a wait each frame shouldn't take that much just make sure that there is a way to skip all if there is no change, like keeping a variable with the current name of the file for the character, if it hasn't changed, do nothing, else check the current weapon and update accordingly. That way, even if checked every frame, it will do basically nothing and will have negligible impact on the framerate or the game itself.
So would I have a weapons common event for each actor, or one big one that does it all?
Hmmm, if you want to combine the actor and weapon file like that, doesn't it work if you make file Sprite_Weapon loadBitmap use a file depending on what weapon the actor is using. Then in Sprite_Actor update frame you also update the _weaponSprite frame to match. And remove the weapon update methods that would otherwise control it.

EDIT: To clarify, because the _weaponSprite is always visible (it's just set to a frame 0,0,0,0 when it's not supposed to show), so you don't have to control the visibility, only set it to correct frame in sync with your actor sprite frame change.
@rpgLord69 you're always very helpful, thank you!

Unfortunately, that kind of coding is a bit above my experience level, although I could learn if necessary.

What I'm trying to achieve is (i) weapon animations unique to each weapon when equip by an actor. In addition, I also want to have (ii) weapon animations for other motion commands like walk, guard, and ready/physical. I believe by default, RMMZ only adds a weapon animation to swing and thrust (maybe one other) using the 3 frame weapon png files. My project has a heavy use of VisuStella plugins, but their Weapon Animation plugin seems to only solve (i) and not (ii).
Thanks to the help of others, I've kind of narrowed myself to two possible solutions

  1. Finding a plugin that achieves this, but doesn't crash with VisuStella plugins.
    OR
  2. Using common events to swap SV_actor image files.
SV Equip Sprite Expansion Plugin appears to do everything I'm looking for, but I haven't tested its compatibility with VisuStella. It uses two plugins (see below).
Untitled.png


If they can co-exist with VisuStella plugins I'm pretty sure I'll have a solution. If not, I'll have to either use common-events (as Winshifter suggested) or return to the limited features of VS Weapon Animation plugin.
Cool, yeah assuming it'd work like I think, it's a limited number of edits. I can do it some day, unless Sunhihi already edits their plugin to be compatible with VS for you.
*fingers crosses* that @sunhihi has done this already.

I'm going to start building out the plugin in my project and see if I run into problems.

What would you suggest to be the best order for the Tier_0 plugins. My project uses several Tier 1-4 plugins after that.

Untitled.png


[Update]
I added the plugins in this order and did not run into any issues with a Test Play. The real test will be when I start adding notetags to weapons, and commands to the actual Sun_0_SvEquipSpriteEx plugin.
*fingers crosses* that @sunhihi has done this already.

I'm going to start building out the plugin in my project and see if I run into problems.

What would you suggest to be the best order for the Tier_0 plugins. My project uses several Tier 1-4 plugins after that.

View attachment 366205

[Update]
I added the plugins in this order and did not run into any issues with a Test Play. The real test will be when I start adding notetags to weapons, and commands to the actual Sun_0_SvEquipSpriteEx plugin.
Version 1.2 of Sun_0_SvEquipSpriteEx.js works fine when mounted before VisuMZ_1_BattleCore.js. However, mounting it after VisuMZ_1_BattleCore.js causes errors, mainly due to some logical flaws in my code. Once fixed, it works fine when mounted after VisuMZ_1_BattleCore.js. I will fix these flaws in version 1.3.

However, due to some settings in VisuStella, the two knives attack separately, causing them not to display simultaneously.
FYI - when I tried to enable motion browsing, the Test Battle would get stuck on the command window.
FYI - when I tried to enable motion browsing, the Test Battle would get stuck on the command window.
Enable Motion browsing mode

is for viewing actions and weapon positions.

In terms of code, it's incompatible with any plugins.

After all, I wrote this mode in a very brute-force way.

So please keep the environment relatively clean when enabling it.

@sunhihi I really do like your plugin and it was worth the money. However, I might need to come back to it later in my project when I have more experience with plugins. My only feedback would be the english translation was hard to follow at some parts, but overall a great product.

For now I'm going to retreat back to the VisuStella Weapon Animation plugin and accept the limited motion animations. Keep up the great work though.

A general question for everyone else.

My SV_battlers use a custom cell size of 144x144 pixels. If my math is correct, that means the cell size of my weapon animations should be 216x144 pixels. According to this guide, you align the SV battler over the weapon animation, by snap to grid the SV_battler to the the far right of the weapon animation.

Untitled 2.png

Untitled3.png


However this doesn't line up inside RMMZ.
Untitled.png


I can certainly edit the weapon animation down and to the left, but I'm wondering if anyone has an explanation?
My SV_battlers use a custom cell size of 144x144 pixels. If my math is correct, that means the cell size of my weapon animations should be 216x144 pixels.
That's not how weapon animations work. The size of a frame isn't dynamically calculated from the size of the image file like character and battler spritesheets are. The 96x64 frame size is hardcoded into MZ:

1778848535233.png


I don't see anything in the VisuStella documention which claims to change this.
Here's some code that seemed to work with VisuStella Battle Core (actually needs it), though I only quickly tested it. So the idea is making an additional child sprite on the actor that shows a weapon when the actor is waiting or guarding. But currently it uses the normal weapon files and also you need to change x and y (or position of weapons in file) to make it be at exactly correct position. Also since in the game the motions can sometimes switch fast, I don't know if it'll look that great. Best look is having the weapon on the battler sheets.

const _myEdit1_SpriteActor_createWeaponSprite = Sprite_Actor.prototype.createWeaponSprite;
Sprite_Actor.prototype.createWeaponSprite = function() {
_myEdit1_SpriteActor_createWeaponSprite.call(this);
this._waitGuardWeaponSprite = new Sprite();
this._distortionSprite.addChild(this._waitGuardWeaponSprite);
this._waitGuardWeaponSprite.anchor.x = 0.5;
this._waitGuardWeaponSprite.anchor.y = 1;
this._waitGuardWeaponSprite.x = -16;
this._waitGuardWeaponSprite.y = 20;
this._waitGuardWeaponSprite.setFrame(0,0,0,0);
};

const _myEdit1_SpriteActor_update = Sprite_Actor.prototype.update;
Sprite_Actor.prototype.update = function() {
_myEdit1_SpriteActor_update.call(this);
if (this._actor && this._actor.isActor() && this._actor.battler() && this._waitGuardWeaponSprite)
this.updateWaitGuardWeaponSprite();
};

Sprite_Actor.prototype.updateWaitGuardWeaponSprite = function() {
const actor = this._actor;
const actorSprite = actor.battler();
const weapons = actor.weapons();
const wtypeId = weapons[0] ? weapons[0].wtypeId : 0;
const attackMotion = $dataSystem.attackMotions[wtypeId];
const weaponImageId = attackMotion.weaponImageId;
const pageId = Math.floor((weaponImageId - 1) / 12) + 1;
if (pageId >= 1) {
this._waitGuardWeaponSprite.bitmap = ImageManager.loadSystem("Weapons" + pageId);
} else {
this._waitGuardWeaponSprite.bitmap = ImageManager.loadSystem("");
}
if (actorSprite._motion) {
if (actorSprite._motion.index === 1 || actorSprite._motion.index === 3) {
const index = (weaponImageId - 1) % 12;
const w = 96;
const h = 64;
const sx = (Math.floor(index / 6) * 3) * w;
const sy = Math.floor(index % 6) * h;
this._waitGuardWeaponSprite.setFrame(sx, sy, w, h);
} else {
this._waitGuardWeaponSprite.setFrame(0,0,0,0);
}
}
};

Original thread: https://forums.rpgmakerweb.com/threads/visustellas-weapon-animations-plugin.183551/