Show SV Battler in Yanfly's EquipCore?

Hello people,
I was just starting to give a little personal touch to the Equip menu layout (I am using the SRD_Menu manager on Yanfly's Equip Core). I was wondering if there was a way to change the actor image showing in the Equip Window. Instead of the Face of the actor, I wanted to display the SV Battler of the actor, even better if animated. I am a complete noob in JavaScript, so I couldn't figure it out by myself in the code.
Is there a way to do it?
Thank you,
Have a nice day!!!

I've moved this thread to Plugin Support. Thank you.

You can add this as a plugin and it probably will work.
Code:
Window_SkillStatus.prototype.refresh = function() {
    this.contents.clear();
    if (this._actor) {
        const w = this.width - this.padding * 2,
        h = this.height - this.padding * 2,
        y = 0,
        xpad = 18 + Window_Base._faceWidth,
        width = w - xpad - this.textPadding();
        this.drawSvActor(this._actor, 120, 150);
        this.drawActorSimpleStatus(this._actor, xpad, y, width);
    }
};

this.drawSvActor(this._actor, 120, 150); change numbers to position it.
You might need yanfly save core or take the code about drawing sv actors from it, as I think it comes from that. If this doesn't work just replace that line in files that say drawActorFace until it does. First play with position as it could end up just be hidden by other menus.
You can add this as a plugin and it probably will work.
Code:
Window_SkillStatus.prototype.refresh = function() {
    this.contents.clear();
    if (this._actor) {
        const w = this.width - this.padding * 2,
        h = this.height - this.padding * 2,
        y = 0,
        xpad = 18 + Window_Base._faceWidth,
        width = w - xpad - this.textPadding();
        this.drawSvActor(this._actor, 120, 150);
        this.drawActorSimpleStatus(this._actor, xpad, y, width);
    }
};

this.drawSvActor(this._actor, 120, 150); change numbers to position it.
You might need yanfly save core or take the code about drawing sv actors from it, as I think it comes from that. If this doesn't work just replace that line in files that say drawActorFace until it does. First play with position as it could end up just be hidden by other menus.



Hello! Thank you for the response. I'll try it right away!
You can add this as a plugin and it probably will work.
Code:
Window_SkillStatus.prototype.refresh = function() {
    this.contents.clear();
    if (this._actor) {
        const w = this.width - this.padding * 2,
        h = this.height - this.padding * 2,
        y = 0,
        xpad = 18 + Window_Base._faceWidth,
        width = w - xpad - this.textPadding();
        this.drawSvActor(this._actor, 120, 150);
        this.drawActorSimpleStatus(this._actor, xpad, y, width);
    }
};

this.drawSvActor(this._actor, 120, 150); change numbers to position it.
You might need yanfly save core or take the code about drawing sv actors from it, as I think it comes from that. If this doesn't work just replace that line in files that say drawActorFace until it does. First play with position as it could end up just be hidden by other menus.


I don't know why, but it doesn't work.
Console gives me this:

TypeError: Cannot set property '_hArrowsHide' of undefined
at Scene_Equip.commandEquip (Moogle_X_EquipmentLearning.js:1758)
at Window_EquipCommand.Window_Selectable.callHandler (rpg_windows.js:902)
at Window_EquipCommand.Window_Command.callOkHandler (rpg_windows.js:1426)
at Window_EquipCommand.Window_Selectable.processOk (rpg_windows.js:1156)
at Window_EquipCommand.Window_Selectable.processHandling (rpg_windows.js:1027)
at Window_EquipCommand.Window_Selectable.update (rpg_windows.js:984)
at WindowLayer.update (KODERA_optimization.js:72)
at Scene_Equip.Scene_Base.updateChildren (KODERA_optimization.js:98)
at Scene_Equip.Scene_Base.update (rpg_scenes.js:113)
at Scene_Equip.Scene_Base.update (SRD_SuperToolsEngine.js:2642)


I searched on the SaveCore file and I found this:
//=============================================================================
// Window_Base
//=============================================================================

Window_Base.prototype.drawSvActor = function(actor, x, y) {
var filename = actor.battlerName();
var bitmap = ImageManager.loadSvActor(filename);
var pw = bitmap.width / 9;
var ph = bitmap.height / 6;
var sx = 0;
var sy = 0;
this.contents.blt(bitmap, sx, sy, pw, ph, x - pw / 2, y - ph);
};

Window_Base.prototype.textWidthEx = function(text) {
return this.drawTextEx(text, 0, this.contents.height);
};

Is it the right code? Where should I replace it?
I don't know why, but it doesn't work.
Console gives me this:

TypeError: Cannot set property '_hArrowsHide' of undefined
at Scene_Equip.commandEquip (Moogle_X_EquipmentLearning.js:1758)
at Window_EquipCommand.Window_Selectable.callHandler (rpg_windows.js:902)
at Window_EquipCommand.Window_Command.callOkHandler (rpg_windows.js:1426)
at Window_EquipCommand.Window_Selectable.processOk (rpg_windows.js:1156)
at Window_EquipCommand.Window_Selectable.processHandling (rpg_windows.js:1027)
at Window_EquipCommand.Window_Selectable.update (rpg_windows.js:984)
at WindowLayer.update (KODERA_optimization.js:72)
at Scene_Equip.Scene_Base.updateChildren (KODERA_optimization.js:98)
at Scene_Equip.Scene_Base.update (rpg_scenes.js:113)
at Scene_Equip.Scene_Base.update (SRD_SuperToolsEngine.js:2642)


I searched on the SaveCore file and I found this:
//=============================================================================
// Window_Base
//=============================================================================

Window_Base.prototype.drawSvActor = function(actor, x, y) {
var filename = actor.battlerName();
var bitmap = ImageManager.loadSvActor(filename);
var pw = bitmap.width / 9;
var ph = bitmap.height / 6;
var sx = 0;
var sy = 0;
this.contents.blt(bitmap, sx, sy, pw, ph, x - pw / 2, y - ph);
};

Window_Base.prototype.textWidthEx = function(text) {
return this.drawTextEx(text, 0, this.contents.height);
};

Is it the right code? Where should I replace it?

If you don't plan on using yanfly save core just put it in the plugin.
Code:
Window_SkillStatus.prototype.refresh = function() {
    this.contents.clear();
    if (this._actor) {
        const w = this.width - this.padding * 2,
        h = this.height - this.padding * 2,
        y = 0,
        xpad = 18 + Window_Base._faceWidth,
        width = w - xpad - this.textPadding();
        this.drawSvActor(this._actor, 120, 150);
        this.drawActorSimpleStatus(this._actor, xpad, y, width);
    }
};

Window_Base.prototype.drawSvActor = function(actor, x, y) {
    var filename = actor.battlerName();
    var bitmap = ImageManager.loadSvActor(filename);
    var pw = bitmap.width / 9;
    var ph = bitmap.height / 6;
    var sx = 0;
    var sy = 0;
    this.contents.blt(bitmap, sx, sy, pw, ph, x - pw / 2, y - ph);
};
You should put it at the top of the plugin list above everything probably.
If you don't plan on using yanfly save core just put it in the plugin.
Code:
Window_SkillStatus.prototype.refresh = function() {
    this.contents.clear();
    if (this._actor) {
        const w = this.width - this.padding * 2,
        h = this.height - this.padding * 2,
        y = 0,
        xpad = 18 + Window_Base._faceWidth,
        width = w - xpad - this.textPadding();
        this.drawSvActor(this._actor, 120, 150);
        this.drawActorSimpleStatus(this._actor, xpad, y, width);
    }
};

Window_Base.prototype.drawSvActor = function(actor, x, y) {
    var filename = actor.battlerName();
    var bitmap = ImageManager.loadSvActor(filename);
    var pw = bitmap.width / 9;
    var ph = bitmap.height / 6;
    var sx = 0;
    var sy = 0;
    this.contents.blt(bitmap, sx, sy, pw, ph, x - pw / 2, y - ph);
};
You should put it at the top of the plugin list above everything probably.


Actually, I'm using the SaveCore...
Isn't there a way to manipulate directly EquipCore just to draw the SV instead of the Face? I'm also using Charactor Creator Ex, which wasn't working with the initial code.
Actually, I'm using the SaveCore...
Isn't there a way to manipulate directly EquipCore just to draw the SV instead of the Face? I'm also using Charactor Creator Ex, which wasn't working with the initial code.
Equip core doesn't add any new windows with face, it only makes skillstatus appear on equip screen.
Code:
Scene_Equip.prototype.create = function() {
    Scene_MenuBase.prototype.create.call(this);
    this.createHelpWindow();
    this.createCommandWindow();
    this.createStatusWindow();
    this.createSlotWindow();
    this.createItemWindow();
    this.createCompareWindow();
    this._lowerRightVisibility = true;
    this.updateLowerRightWindows();
    this.refreshActor();
};

Scene_Equip.prototype.createStatusWindow = function() {
    var wx = this._commandWindow.width;
    var wy = this._helpWindow.height;
    var ww = Graphics.boxWidth - wx;
    var wh = this._commandWindow.height;
    this._statusWindow = new Window_SkillStatus(wx, wy, ww, wh);
    this.addWindow(this._statusWindow);
};
I had tried it with 150 plugins and edited base script before I posted it, so if anything is wrong it's some other plugin I don't use that messes with skillstatus. I looked at Character Creator EX and if you are using custom characters you probably could try.
Code:
Window_SkillStatus.prototype.refresh = function() {
    this.contents.clear();
    if (this._actor) {
        const w = this.width - this.padding * 2,
        h = this.height - this.padding * 2,
        y = 0,
        xpad = 18 + Window_Base._faceWidth,
        width = w - xpad - this.textPadding();
        const cc = this._saveContents.characterCreations;
        if(cc.hasInfo(this._actor._actorId)) {
        var bitt = cc.buildBitmapSv(this._actor._actorId);
        this.drawSvActorFromBitmap(bitt, 120, 150);
        } else {
        this.drawSvActor(this._actor, 120, 150);
        }
        this.drawActorSimpleStatus(this._actor, xpad, y, width);
    }
};
I'm sorry, but it doesn't seem to work...
I'm sorry, but it doesn't seem to work...
Tested it myself again besides CCEX in a new project, only problem I see is you need to refresh it by changing equips for it to show and default placement is really low, you can fix appear problem with preloading plugin or SRD_SuperToolsEngine just clicking it once, I can't figure out how to get it to show the first time otherwise.

Original thread: https://forums.rpgmakerweb.com/threads/show-sv-battler-in-yanflys-equipcore.119054/