aporokizzu

anti-kumbaya
Veteran
Joined
Jan 14, 2020
Messages
59
Reaction score
90
First Language
english
Primarily Uses
RMMV
From what I understand, $gameScreen._pictures is the array that holds all of the Game_Picture objects that are shown on the map, and it has a maximum size of 100 array items for this.

It seems to reserve items 200 and up for battle images (?) but my project uses an ABS system so I haven't delved too deep into looking into this.

I have a set of pictures that I am constantly using on map that I am currently storing in the 81-100 block of the $gameScreen._pictures array. I might have to eventually take up twenty more array slots so to avoid any conflicts with other processes in the project I am wondering if it possible to create my own array that I push my own Game_Picture objects to instead?

Is it as simple as aliasing Game_Screen.prototype.updatePictures to include the array or is there more to it?

JavaScript:
var HeadsUp_Game_Screen_updatePictures = Game_Screen.prototype.updatePictures;
Game_Screen.prototype.updatePictures = function() {
    
    HeadsUp_Game_Screen_updatePictures.call(this);
    
    PE.HeadsUp._pictures.forEach(function(picture) {
        if (picture) {
            picture.update();
        }
    });
};

I would also be using my own functions to manage the private array, because I understand that the $gameScreen picture ones correspond to original $gameScreen._pictures array.

Does anybody have any experience doing anything similar?

Thanks in advance for your insight and help.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,231
Reaction score
14,253
First Language
English
Primarily Uses
RMMV
From what I can see, if you're in battle, it uses pictures 101 and up, not 200 and up.

If you wanted to add a new pictures array, you would need to change:
Game_Screen.prototype.picture
Game_Screen.prototype.clearPictures
Game_Screen.prototype.updatePictures
Game_Screen.prototype.showPicture
Game_Screen.prototype.erasePicture

and then you would have to revisit any script calls or plugins that reference the array directly, if you have any.

tbh it would just be easier to change Game_Screen.prototype.maxPictures to return 200 or 300 instead of 100.
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

I have an idea, I am making low polygon 3D resources for a package in itch. but it occurred to me that I could export these as images and make MV / MZ compatible tilesets. What do you think of this?
I hate seeing threads where less-experienced user's ask for an opinion of their project, and the thread is full of negative feedback by others who are clearly not the target audience. I feel bad for the OP, and I hope they understand that no game can appeal to everyone. :frown:
Hm, just found out I can't use loops, yay.
-Ele
I just wanna Covid to be over and I have my normal life back... Feeling so bad these days, what can I do?

Forum statistics

Threads
109,085
Messages
1,041,897
Members
141,574
Latest member
TheusFrag
Top