Picture not showing in the first place in Menu(SOLVED)

darfzi'eng

Warper
Member
Joined
Jan 22, 2014
Messages
4
Reaction score
0
First Language
Chinese
Primarily Uses
Hi, I have a plugin problem for a while, and I couldn't fix it myself.
I've search for answer, but it seems like nobody has the same problem like me.
I used Galv's Bust menu (this website's last plugin)
and BM VK Equip,
characters in the next page won't show up their Bust the first until I move back again.
Same for BM equip, the equip profile won't show up in the begining when I have 8 characters in the team.
I think this is some kinds of lagging.
Is there anyway speed up the picture loading process in game?

Sorry if I make this too incomprehensible, this was my first time post a thread.
Thanks.
VagueKeyBaiji-max-1mb.gif
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
Please edit your opening post to include a link to the website/page where you got the plugins. That way, if people need to check something in order to help you, they don't have to go hunting.
Thanks.
 

darfzi'eng

Warper
Member
Joined
Jan 22, 2014
Messages
4
Reaction score
0
First Language
Chinese
Primarily Uses
Please edit your opening post to include a link to the website/page where you got the plugins. That way, if people need to check something in order to help you, they don't have to go hunting.
Thanks.
Thanks for your advice, I've just added the link.
 

TWings

The Dragon Whisperer
Veteran
Joined
Jul 26, 2017
Messages
527
Reaction score
860
First Language
French
Primarily Uses
RMMV
I got the same kind of issue with pictures in one of my plugin (or at least I think so).
As I understand it, for some reason the first time the picture is called it's not showing, then it's loaded and showing properly.
I still have to find a workaround. I know there are some plugin that allow to pre-load pictures and such (which might solve your problem if you're ok with that), but I'd like to avoid to pre-load everything...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
MV loads pictures asynchronously, which means if it's not in memory, it'll show you the screen without the picture while it's loading the picture.

I suspect the plugins are doing something a little different to the default code. There is a function in Window_Base to reserveFaceImages. I suspect your bust plugins might not be doing the same for busts.

Do your images change depending on what the actors have equipped? That could add some complexity.
 

darfzi'eng

Warper
Member
Joined
Jan 22, 2014
Messages
4
Reaction score
0
First Language
Chinese
Primarily Uses
MV loads pictures asynchronously, which means if it's not in memory, it'll show you the screen without the picture while it's loading the picture.

I suspect the plugins are doing something a little different to the default code. There is a function in Window_Base to reserveFaceImages. I suspect your bust plugins might not be doing the same for busts.

Do your images change depending on what the actors have equipped? That could add some complexity.
This plugin doesn't seem to provide picture changing for changing equip.
So does that mean I have to add "picture reserve" in the plugin's code?
I'm not sure if I'm able to do that, I'm new to coding, but I could try.
BTW Thanks for answering.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
I am only guessing at this. If you get errors, hit F8 and open the console tab, and grab a screenshot.

Paste the following into a new .js file in the js/plugins folder and add to your Plugin Manager.

Code:
Window_Base.prototype.reserveFaceImages = function() {
    $gameParty.members().forEach(function(actor) {
        ImageManager.reserveFace(actor.faceName());
        ImageManager.reservePicture(actor.faceName() + "_1");
        ImageManager.reservePicture(trim(actor.meta.ebodyimage));
    }, this);
};
This assumes all your busts for Galv's menu will end in _1. If they don't, you can either change it to something else if they all end in another number, or if they have different numbers or you have several versions, it'll be a bit more tricky and you'll need to explain how you have it set up.

I really don't know if this is going to work or not.
 

TWings

The Dragon Whisperer
Veteran
Joined
Jul 26, 2017
Messages
527
Reaction score
860
First Language
French
Primarily Uses
RMMV
Thanks for the hint, it kinda helped me too.
I tryed to add a reserve function in my window, for some reason it wasn't working for the first index. So I rewrote reserveFaceImages since it's called by the default menu. I'm still not 100% happy I have to preload so much stuff with part of it not beeing used, but it does work.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
I think that actually gets called for ALL windows, even those that don't show faces! But the good news is the images are only loaded once and then shared.

I suppose they're pretty small images, in the grand scheme of things :)
 

darfzi'eng

Warper
Member
Joined
Jan 22, 2014
Messages
4
Reaction score
0
First Language
Chinese
Primarily Uses
I am only guessing at this. If you get errors, hit F8 and open the console tab, and grab a screenshot.

Paste the following into a new .js file in the js/plugins folder and add to your Plugin Manager.

Code:
Window_Base.prototype.reserveFaceImages = function() {
    $gameParty.members().forEach(function(actor) {
        ImageManager.reserveFace(actor.faceName());
        ImageManager.reservePicture(actor.faceName() + "_1");
        ImageManager.reservePicture(trim(actor.meta.ebodyimage));
    }, this);
};
This assumes all your busts for Galv's menu will end in _1. If they don't, you can either change it to something else if they all end in another number, or if they have different numbers or you have several versions, it'll be a bit more tricky and you'll need to explain how you have it set up.

I really don't know if this is going to work or not.
Thanks, Shaz, it really works.
It work pretty well with Galv' Bust Menu, but it got "trim is not defined" with ebodyimage.
So, I decided just reserve the picture I need one by one and get rid of that line , since they aren't really considerable amount.
Thanks for all your assistance.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,100
Reaction score
13,705
First Language
English
Primarily Uses
RMMV
Just remove trim() around the info. I put that there in case there was a space between the : and the name.

So:

Code:
Window_Base.prototype.reserveFaceImages = function() {
   $gameParty.members().forEach(function(actor) {
       ImageManager.reserveFace(actor.faceName());
       ImageManager.reservePicture(actor.faceName() + "_1");
       ImageManager.reservePicture(actor.meta.ebodyimage);
   }, this);
};
When you're done, you can report your first post and ask for the thread to be closed, and the mods will take care of it :)
 

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

Latest Threads

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,882
Messages
1,017,230
Members
137,607
Latest member
Maddo
Top