MV Change actor YED sv battle sprite based on equipped weapon

essentially, i want the actors sprite to wield whatever weapon is equipped using a seperate spritesheet, which using the standard sheets is simple enough via the change actor image command, however yed uses notetags and completely ignores the designated actor image, and afaik note tags cant be altered at any point. my question is how could i go about doing this in the simplest way possible?
I suggest making multiple copies of the spritesheets and pasting the weapon images into them.

Then you can use waynee95's On Equip Eval to change the battler sheet when you equip a weapon.

So, for example, you would set your sheets up to be named Harold_sword, Harold_staff, etc. Then you can have a notetag like this (this would go on a sword item, obviously):
Code:
<Custom On Equip Eval>
let name=user.battlerName().substring(-1, user.battlerName().indexOf('_'));
name+="_sword";
user.setBattlerImage(name);
</Custom On Equip Eval>
oh thanks!! ill give this a try

sorry for being late to this, but it doesnt appear to work. i cant really tell why but my feeling is that any changes are overwritten by the actor notetags, similar to how the change actor command doesnt work. when i remove the actor notetags, the eval still changes the image however its displayed very strangely as it doesnt seem to use YED SV battlers parameters at all (sprite size, animations, frames, etc) and i wouldnt know how to include those in the weapon notes anyways
Oh. It's not that the notetags overwrite it, but the YED plugin uses a different property for its spritesheet.

Try replacing the user.setBattlerImage() line with
Code:
user._sideViewBattler = {
            filename: name,
            default : false,
            frames  : Utils.parameters['Default Frames'],
            speed   : Utils.parameters['Default Speed'],
            weapon  : Utils.parameters['Enable Weapon'],
            sizes   : [
                Utils.parameters['Default Frame Width'],
                Utils.parameters['Default Frame Height']
            ],
            motions : {}
        };
    };

All the places where it has the Utils.parameters stuff, you can leave it that way if you're using the default plugin parameters, or replace it with the number if you would be specifying a different number in your notetag.
thanks, how does this work with multiple actors though? if i specify a specific file for the filename and an actor uses a different frame count than another wouldnt things get weird or does this account for that somehow
apologies if this is something obvious

Original thread: https://forums.rpgmakerweb.com/threads/change-actor-yed-sv-battle-sprite-based-on-equipped-weapon.168836/