Change enemy sprite during battle

Hello everyone.
I am trying to create a skill for my character that when used will change the enemy sprite during battle.
I want the enemy to maintain its stats, states, skills, etc.
How can I go about this?
By default the sprite is pulled from the enemy's database entry. To change it without affecting other copies of the enemy, you'll need to use a plugin.

You could try this plugin - it was written for MV, but at a quick glance I didn't see anything that looked incompatible with MZ. You don't even need to use the health threshold stuff, just the added script call.
By default the sprite is pulled from the enemy's database entry. To change it without affecting other copies of the enemy, you'll need to use a plugin.

You could try this plugin - it was written for MV, but at a quick glance I didn't see anything that looked incompatible with MZ. You don't even need to use the health threshold stuff, just the added script call.
Thank you for the suggestion!
My idea is to change the enemy sprite when its affected by a specific status (Turned).
1696156360056.png

The problem I am having now is that rpg maker always gives me this error "Game_Battler.setBattleImage is not a function"
1696156324449.png

Does anyone know what might be causing this?
What other plugins are you using?
What other plugins are you using?
Currently the only other plugin I am using is one that allows me to move using the "wasd" keys.
1696170525928.png
Thank you for the suggestion!
My idea is to change the enemy sprite when its affected by a specific status (Turned).View attachment 278617
The problem I am having now is that rpg maker always gives me this error "Game_Battler.setBattleImage is not a function"
View attachment 278616
Does anyone know what might be causing this?
I am no longer getting the error but the enemy sprite doesnt change.
1696184567945.png

I checked the Js code and the function was defined as Game_Battler.prototype.setBattlerImage.
I also added some show text in order to debug during the battle and it shows both of them. Not sure why the sprite isnt changing.
Maybe is not compatible with MZ??? I am not sure...
Does anyone know what might be causing this?
You're calling the code incorrectly. You wouldn't type Game_Battler, you need to reference the actual enemy.

So, according to your troop event, you're looking at enemy #1. Thus, your script call would be
Code:
$gameTroop.members()[0].setBattlerImage("Zombie")
(looking at the examples in the first post of the other thread, the PNG extension is automatically added)
This worked the way I wanted, thank you very much!

Original thread: https://forums.rpgmakerweb.com/threads/change-enemy-sprite-during-battle.161620/