VisuStella's Weapon Animations plugin

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:

View attachment 366298

I don't see anything in the VisuStella documention which claims to change this.
This is very helpful information. Thank you!

Do you know how the two images align in RMMZ? bottom right corner? centre right?
[Edit} And can I change the hard coded dimensions?

@rpgLord69 this is very helpful too. Based on the advice I've gotten, I'm probably going to forgo my need for weapon animations on guard and wait motion types. My coding skills just aren't there yet.
Update: I think I have a working solutions for 2 options.

Option 1: Using VisuStella Weapon Animation

I updated the code as @ATT_Turan suggested.
Untitled.png

This fixed the cell size of the weapon image, but the alignment was still off. Perhaps there's an x and y anchor that needs to be changed, idk. Instead I simply edited the image file until it lined up in RMMZ. It's not the cleanest solution, but it works. I can then use this weapon image as a template for positioning for all other weapon images.

Untitled1.png
Untitled2.png
Untitled3.png

Option 2: Common Event

I've been thinking a lot about @Winshifter's suggestion regarding common events. If I were to simply merge the weapon images to the SV_battler spites, this is how I would try to approach it.
  • Each actor would have the following
    • Unique SV_Battler Spite image for each weapon
    • Unique Switch - Actor_Weapon Image
    • Unique Common Event to check/change the SV_Battler Sprite image
  • Using VisuStella Items and Equip Core plugin Find a plugin that will enable a notetag to each weapon that toggles the actor's switch on/off
    • <onEquipJS>
      $gameSwitches.setValue(X, true);
      </onEquipJS>

      <onUnequipJS>
      $gameSwitches.setValue(X, true);
      </onUnequipJS>
  • The common event for that actor would then be triggered by the actor's switch. The common event would then do the following:
    • Run a Conditional Branch command that checks the ID of the weapon equip
    • Change the SV_battler sprite image to match the weapon equiped.
    • Toggle the Actor's switch off.
I'm not sure if this would work, so I'm open to feedback.
This also got me wondering

If VS Items & Equip core plugin allows for <onEquip JS> notetags, is there not a script that simply replaces the SV_battler sprite. This would replace the need for any common event.

I’m guessing this is not possible, as someone would have already thought of it.
I've tried to look in Visustella library that <onEquip JS> notetag and I couldn't find it...and I literally went to their main page where they have all their plugin documentation and I couldn't find it. That being said, that particular notetag does happen to exist on another plugin, but I wouldn't rule out that there are other plugins that have it.

Yes, you might not need a specific common event if there is a notetag that allow you to run code when a particular weapon or armor is being equipped or unequipped, you just have to run code that gets the correct file and update it accordingly.
If VS Items & Equip core plugin allows for <onEquip JS> notetags, is there not a script that simply replaces the SV_battler sprite. This would replace the need for any common event.

I’m guessing this is not possible, as someone would have already thought of it.
This has been discussed in multiple previous threads, and it's what I do in my game. Instead of using weapon animations at all, I execute code when weapons are equipped which changes the battler spritesheet to the one with the appropriate weapon drawn onto it.

However, it was specifically not the topic of this thread.

Also, I have no idea where @MDR got that notetag in the post you quote, it simply doesn't exist in the plugin documentation that they link to. I use a different plugin entirely for that functionality.
Also, I have no idea where @MDR got that notetag in the post you quote, it simply doesn't exist in the plugin documentation that they link to. I use a different plugin entirely for that functionality.
Lesson learned. Don’t trust AI Google search.

I’m interested in learning more about how you execute code when weapons are equipped which changes the battler spritesheet to the one with the appropriate weapon drawn onto it.

I edited my previous post to avoid confusion on the VS plugin. I found the source of the error. the AI search answer I got was pulling from another thread that made the same claim about the VS Equip and Item plugin, but found incorrect as well.

Sorry everyone.

[Edit]

I reported the thread to be closed, but before they do so.

@ATT_Turan and @Winshifter were right.

I disabled the VisuStella Weapon Animation plugin and installed WAY_Core and WAY_CustomOnEquipEval plugins. Then I just added the following code to each weapon. Replacing the filename with the actual name of the png file (excluding the extension). It appears to be working

<Custom On Equip Eval>
user.setBattlerImage('filename');
</Custom On Equip Eval>

<Custom On Remove Equip Eval>
user.setBattlerImage('filename');
</Custom On Remove Equip Eval>


@rpgLord69 gives advice on this here.

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/visustellas-weapon-animations-plugin.183551/