Face Not Drawing

Crystal Noel

Veteran
Veteran
Joined
Jun 17, 2012
Messages
113
Reaction score
32
First Language
English
Primarily Uses
I'm running into a strange issue with a plug-in I am writing. The plug-in creates a secondary party of characters that are not part of your main party, and thus they have their own window in the


menu that switches when an option in the menu is selected. The issue is that the first time I open the menu in any play test, the faces of the secondary party are not visible, but for some reason the second and all subsequent times I do so, they draw just fine. I checked all the parameters going through the method and they match every time, even the first time when it doesn't draw. So I'm asking what's the problem? Why is this happening?


Here's my method in case you need to see it:

Code:
Window_MenuGF.prototype.drawItemImage = function(index) {
  var actor = $gameParty.guardianForces()[index];
  var rect = this.itemRect(index);
  this.drawActorFace(actor, rect.x + 1, rect.y + 1, Window_Base._faceWidth, Window_Base._faceHeight);
};
 

biud436

Veteran
Veteran
Joined
Sep 28, 2014
Messages
170
Reaction score
178
First Language
Korean
Primarily Uses
RMMV
It could be solved via a way preloading that bitmap. 


I think that you have to pre-load its face by using a function called ImageManager.loadFace in Scene_Boot.

Code:
// Adding this code in your plugin.
var original_Scene_Boot_loadSystemImages = Scene_Boot.loadSystemImages;
Scene_Boot.loadSystemImages = function() {
  original_Scene_Boot_loadSystemImages.call(this);
  ImageManager.loadFace('Face_Name');
};
 
Last edited by a moderator:

Crystal Noel

Veteran
Veteran
Joined
Jun 17, 2012
Messages
113
Reaction score
32
First Language
English
Primarily Uses
It could be solved via a way preloading that bitmap. 


I think that you have to pre-load its face by using a function called ImageManager.loadFace in Scene_Boot.



// Adding this code in your plugin.
var original_Scene_Boot_loadSystemImages = Scene_Boot.loadSystemImages;
Scene_Boot.loadSystemImages = function() {
original_Scene_Boot_loadSystemImages.call(this);
ImageManager.loadFace('Face_Name');
};


I got it. I didn't realize that Scene_Menu refreshes the status window after it is created so the faces show up. Once I refreshed my window, the faces showed up normally.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Shade the Mystic wrote on YouFulca's profile.
I just wanted to drop you a line to tell you that you are flipping amazing. I've listened to a few RM composers over the years, and while they all had their strengths, yours is the only work I'd dare call memorable. I honestly don't think I've heard such amazing RM scores outside of Yasunori Mitsuda, no joke. Keep up the amazing work!
Seamless secret passages just by painting a path with a region id. Simple but slick.
Playing with colour ramps. The first set is the originals, the ones only facing forward in different colour schemes are the new colours.

I present... MAGIC (in progress)

Forum statistics

Threads
102,981
Messages
996,450
Members
134,447
Latest member
Smashbroly
Top