Show SV Battler in Yanfly's EquipCore?

Joined
Oct 27, 2017
Messages
29
Reaction score
7
First Language
Italian
Primarily Uses
RMMV
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!!!
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,646
Reaction score
8,077
First Language
English
Primarily Uses
RMMV

I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
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.
 
Joined
Oct 27, 2017
Messages
29
Reaction score
7
First Language
Italian
Primarily Uses
RMMV
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!
 
Joined
Oct 27, 2017
Messages
29
Reaction score
7
First Language
Italian
Primarily Uses
RMMV
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?
 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
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.
 
Joined
Oct 27, 2017
Messages
29
Reaction score
7
First Language
Italian
Primarily Uses
RMMV
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.
 
Last edited:

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
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);
    }
};
 
Last edited:

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
326
Reaction score
120
First Language
English
Primarily Uses
RMMV
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Playtesting for Battle Castle is done, demo time for me was roughly 6 hours and 20 minutes. I'm going to pass it on to a few friends first, and after getting some feedback will be posting an official topic.
There's another Humble Bundle available now for RPG developer assets, this time focused somewhat more towards pixel art style games.
Ive got a long lost half uncle. Thats real cool.
I forget what is bumping rule in this forum. Is anyone know? Thank you.
BCj
Ew, why does my blogpost on the rpgmaker.net site look like a garbled mess? Are html codes disabled or something?

Forum statistics

Threads
97,905
Messages
947,758
Members
129,147
Latest member
byproduct
Top