Using Yanfly's Plugins, how do you change the battler by applying a State?

Using Yanfly's Buff/State Core I've been able to change the actors battler when a State is applied:

<Custom Apply Effect>
if (target.isActor()) {
name = target.battlerName();
newname = name.replace('_Zombie',"");
var name1 = newname + '_Zombie';
target.setBattlerImage(name1);
target.refresh();
}
</Custom Apply Effect>
<Custom Remove Effect>
target.setBattlerImage(newname);
target.refresh();
</Custom Remove Effect>
<Custom Leave Effect>
target.setBattlerImage(newname);
target.refresh();
</Custom Leave Effect>

It works great.... But now I want to do the same for an enemy and that uses the AnimatedSVEnemies plugin, but I keep getting an "undefined is not a function" error.

<Custom Apply Effect>
name = target.battlerName();
newname = name.replace('_Hiding',"");
var name1 = newname + '_Hiding';
target.setBattlerImage(name1);
target.refresh();
</Custom Apply Effect>
This is what I used initially, but I changed it a little when looked through Yanfly's plugin code... It now reads like this:

<Custom Apply Effect>
name = target.svBattlerName();
newname = name.replace('_Hiding',"");
var name1 = newname + '_Hiding';
target.setBattlerImage(name1);
target.refresh();
</Custom Apply Effect>
​
But I get the same error and an zero insight on what I'm doing wrong.

I'm trying to make a enemy 'hide' underground. I set up the graphics and the action sequences, but for some reason I can't get the Battler Graphic to change...

I'm hoping one of you Java gurus can help me out.... please. Maybe just point me in the right direction... I fyou can't help altogether....
I'm not a Java guru, but since we are talking about Javascript, it doesn't even matter.
The best thing you can do is share the screenshot from console (f8 in game). It contains the info about which function got triggered and caused the error.
setBattlerImage(battlerName) is a method of Game_Actor, so it won't work on an enemy.

Unfortunately, I don't understand Yanfly's coding at all, so that's all the help I'm going to be at the moment. Hopefully someone can dig into Animated Sideview Enemies and Battle Engine Core for you to figure out what the appropriate script calls would be.
2njzts5.png

I hope this helps... though it mentions plugins that have nothing to do with what I'm trying to do though...
As you are already working with a plugin, this is not a Request for one.

Moved to: Javascript/Plugin Support
Firestalker did you work out a solution for this?
After some testing I found that "setBattlerImage" doesn't seem to work when used on enemies in any capacity. I even tried this using the plugin essential to use Yanfly's state effects and the state effects themselves in a completely new project just to test if it was some type of incompatibility and I found that "setBattlerImage" just won't work when used on an enemy.. Have to use the Yanfly's transform script instead, that seems to work AND you can still use the SV graphics.

Original thread: https://forums.rpgmakerweb.com/threads/using-yanflys-plugins-how-do-you-change-the-battler-by-applying-a-state.90193/