This plugin is very heavy and very consumer.
If you want better performance, I made a basic plugin.
Much faster and easier to manage.
to bind picture use by real Map screen
Code:$gameScreen.showPicture(ID, 'fileName', 0, x, ,y).bindToMap();
to bind to position where picture are.
Code:$gameScreen._pictures[ID].bindToMap();
// or
$gameScreen._pictures[ID].bindToMap(x,y);
Code:$gameScreen._pictures[ID]._BindToMap = false; // set false
the plugin here, simply add to new plugin to repalce basic rmmv Game_Screen prototype && Game_Picture
Code:// PROTOTYPE RMMV □────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// □ [maxPictures] □ [initialize] □ [showPicture] □ [isPreloaded] □ [show]
// └─────────────────────────────────────────────□□□-Game_Screen-□□□───────────────────────────────────────────────────────────────┘
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
//SETMAX PICTURE limit , ADD MORE MAX LIMITE DE PICTURE IN GAME
Game_Screen.prototype.maxPictures = function() { return 1000 };
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
// AJOUTER LES OBJECT EASING DANS GAMESCREEN
var alias_Game_Screen_Prototype_initialize = Game_Screen.prototype.initialize;
Game_Screen.prototype.initialize = function() {
alias_Game_Screen_Prototype_initialize.call(this);
this._picturesEasing1 = [];
this._picturesEasing2 = [];
};
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
//QUAND AFFICHE UNE PICTURE AJOUTE AUSSI UN CONTENEUR EASING [DANS LE BON PID ARRAY]
Game_Screen.prototype.showPicture = function(pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode) { // frames permet de detecter Leanimatedpicture, compatibility ivra
var picture = new Game_Picture();
picture.show(name, origin, x, y, scaleX, scaleY, opacity, blendMode);
this._pictures[pictureId] = picture;
this.setAngle = function(t){ this._pictures[pictureId]._angle = t; return this }
this.setRot = function(r){ this._pictures[pictureId]._rotationSpeed = r; return this }
this.bindToMap = function(){ this._pictures[pictureId]._BindToMap=true; return this }
return this
};
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
// CHECK SI PICTURE EXISTE , UTILE POUR VERIFIER SI UN MENUE EST PRELOAD
Game_Screen.prototype.isPreloaded = function(pictureId) {
if(this._pictures[pictureId]){ return true;} return false
};
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
//□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
// remplace le constructeur d'image, supprimer rotation et angle initialisation
Game_Picture.prototype.show = function(name, origin, x, y, scaleX, scaleY, opacity, blendMode) {
this._name = name;
this._origin = origin;
this._x = x;
this._y = y;
if(scaleX===0||scaleX>0){ this._scaleX = scaleX };//+
if(scaleY===0||scaleY>0){ this._scaleY = scaleY };//+
if(opacity===0||opacity>0){ this._opacity = opacity };//+
if(blendMode===0||blendMode>0){ this._blendMode = blendMode };//+
this._angle = 0; //+
this._rotationSpeed = 0; //+
this._BindToMap = false; //+
this._bindX=x;//+
this._bindY=y; //+
this.initTarget();
this.initTone();
};
//□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
// PROTOTYPE RMMV □───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
// □ [bindToMap] □ [update] □ [updateBindPos]
// └─────────────────────────────────────────────□□□-Game_Picture-□□□───────────────────────────────────────────────────────────────┘
//$gameScreen._pictures[30].bindToMap()
Game_Picture.prototype.bindToMap = function(aX,aY) {
console.log('this: ', this);
this._bindX = aX||($gameMap.displayX()*48)+this._x;
this._bindY = aY||($gameMap.displayY()*48)+this._y;
this._BindToMap = true;
};
Game_Picture.prototype.update = function() {
this.updateMove();
this.updateTone();
this.updateRotation();
this.updateBindPos();//++
};
Game_Picture.prototype.updateBindPos = function() {
if(this._BindToMap){
this._x = this._bindX-$gameMap._displayX*48;
this._y = this._bindY-$gameMap._displayY*48;
}
};