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,656
Reaction score
8,083
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

Symphony Celestia: Prophecy of the Falling Stars RPG Maker music pack WIP. Symphony Celestia is a new series that focuses on symphonic and orchestrated music to tell a story. Each story will include compositions that make up that story from beginning to end. Themes include: Battles, adventures, character themes, etc. Below is a video preview to the first story.

Jumping and gravitation 0.1 build - RPG Maker MV
It's ironic, but one of the many hilarious things done with Shia's Just Do It speech was to make a hype song, and....I know what it is.....but I still get inspired by it! I'm like..."Yes I can!!"
That moment when you realize you lost time frankenstiening a sprite together, only to realize it already exited.
My first game is going to have the main character more or less create monsters as his party members.

Thanks to the plugin creators still producing content for MV, I might be able to give each of the monster members a personalized range of tactics during combat. I liked how the devs made it like that in FF6.

Forum statistics

Threads
97,973
Messages
948,234
Members
129,227
Latest member
HamadAhli
Top