Game_Picture is an abstracted game object, I think this is the method of interest (rpg_sprites.js):
Code:
Sprite_Picture.prototype.loadBitmap = function() {
this.bitmap = ImageManager.loadPicture(this._pictureName);
};
You could try a plugin that aliases this method based on, for example, the picture ID:
Code:
var _Sprite_Picture_loadBitmap = Sprite_Picture.prototype.loadBitmap;
Sprite_Picture.prototype.loadBitmap = function() {
var id = this._pictureId;
if ([1,2,3,4,5].contains(id)) {
this.bitmap = ImageManager.loadBitmap('img/book/', this._pictureName, 0, true);
} else {
_Sprite_Bitmap_loadBitmap.call(this);
}
};
I.e. if the picture ID is 1~5 inclusive, load the picture from
img/book/, else do the usual thing.
Another option (might make more sense in the long run) could be to branch based on the picture name rather than its ID, e.g.
Code:
if (/^book/.test(this._pictureName)) {
// book stuff
} else { ...
I.e. if the picture name starts with "book", load from the special "book" folder. The
/^book/ thing is a regular expression, more details here in case you're interested:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp
I think personally I'd just establish a standard naming system for all the "book" pictures and stick to the normal Show Picture stuff.