Separate, private $gameScreen._pictures array?

aporokizzu

anti-kumbaya
Veteran
Joined
Jan 14, 2020
Messages
59
Reaction score
89
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

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
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:

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

Latest Threads

Latest Posts

Latest Profile Posts

Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top