Visual change to battler depending on weapon

In my game, equipping a weapon changes your element. How would I visually show this on the battler sprite? Some sort of image layers plugin perhaps? Or just apply a passive state when the weapon is equipped that has a custom overlay? I used to have one character per element - but having so many actors excessive. I wish I could change their hair color depending on their weapon. But I doubt that would be easy at all, if even possible.
I'm not aware of any such plugins. It's exactly the reason why pretty much nobody does alternative battlers based on equipment.

Eventing-wise you could just change the battler image with a whole bunch of conditional branches, but it's a ton of work for an ultimately minor detail.
Something like this could help, perhaps?


(edit: MZ equivalent)


These only change the weapon image, but they can be assigned to states and everything from what I can tell.
There isn't a way to change the actual sprite (for things like hair color) without making new sprites for each state, but... if you can get by with particle effects and visual filters, might something like this do? You could just make "states" for each element and play with the visuals accordingly.

There isn't a way to change the actual sprite (for things like hair color) without making new sprites for each state, but... if you can get by with particle effects and visual filters, might something like this do? You could just make "states" for each element and play with the visuals accordingly.

That is what I am gonna try out for now. Just make a custom state overlay that displays that character's element. The enemies already have that, so it would be cohesive.
If you are looking to change the sprite battler themselves, you totally can do this. In my project I have the battlers' weapons drawn on my sv sheets. The hero starts with a wooden sword but then upgrades to a metal one. So i have two sheets for this.

In order to change a sprite based on the weapon equipped you will need a couple things:

1. is a common event that conditionally changes the characters battler based on the weapon equipped.
Spoiler: Common Event
Screenshot 2023-07-31 115857.png
Can also use var actor = $gameActors.actor(x); X= actor id #

2. A call for this common event after leaving the equip screen.
Scene_Equip.prototype.executeEquipChange = function() { const actor = this.actor(); const slotId = this._slotWindow.index(); const item = this._itemWindow.item(); actor.changeEquip(slotId, item); $gameTemp.reserveCommonEvent(50); //<- this would call the CE. };
I did something like this in a a plugin for my project but its probably not the best way if you are using plugins that change the equip scene. but its gets the point across.

This will only change the sprite sheet so you would have to create sprite sheets with the desired effects of having that weapon equipped.
I don't know javascript specifics, but it should theoretically be possible to do this with a paper doll-esque image layering approach via plugin. Like, you've got your standard battler sheet like so:

hairold1.png

(excerpt is used here because I don't know how legal it is to just post full RTP sheets here)

Then you cut out/prepare the parts you want to overlay depending on equipment changes, in this case the hair.

hairold2.png

You make some variations based on that.

hairold3.png

hairold4.png

hairold5.png

And then you get someone in the classifieds to set you up with a plugin script; one that creates a secondary sprite layer over your in-combat battler sprite, with its animations and frame index synced up with the first one, and gives you some note tags you can use in the database to associate your weapons with your overlay graphics.

This should allow you to layer graphics on top of each other.

hairold6.png


I'm sure this is doable if you find the right person and are willing to compensate them.

Original thread: https://forums.rpgmakerweb.com/threads/visual-change-to-battler-depending-on-weapon.159904/