Qplus_noTilemap
Qplus_noTilemapAuthor Quxios *No longer supported*
Introduction
Its an edited version from the plugin Qplus.js, made by Quxios;
Features
Removes all functionality from the original Qplus.js plugin and leaves only the feature of replacing the tilemap with a lighter sprite.
It will "remove" all your tilesets from be showing on the map. But the passages in the database will still work.
Screenshots
Spoiler
https://i.imgur.com/QymHMQT.png
How to Use
Just put the note tag on map notes:
<noTilemap>
Spoiler: QPlus_noTilemap.js JavaScript:
//=============================================================================
// QPlus_noTilemap.js
//=============================================================================
/*:
* @plugindesc QPlus noTilemap
* @author Quxios
* @site https://quxios.github.io/
*
* @help
* I edited the original plugin QPlus from Quxios to only have the feature
* "No Tile Map" that helps when you go all parallax in your game.
* Despite removing the tilemap the passages marked in the database continue
* to function normally.
* Please, follow the terms of use from Quoxios. No need to credit me.
*_____________________________________________________________________________
*
* Eu editei o plugin QPlus original de Quxios para ter apenas o recurso
* "No Tile Map", que pode ajudar na performance de um jogo que usa somente
* parallaxes.
* Apesar de remover o tilemap, as passagens marcadas no banco de dados
* continuam funcionando normalmente.
* Por favor, siga os termos de uso de Quoxios. Não precisa me dar créditos.
*
* ----------------------------------------------------------------------------
* **No tilemap**
* ----------------------------------------------------------------------------
* You can disable the tile map by adding this note to a map
* ~~~
* <noTilemap>
* ~~~
* This will replace the tilemap with a simple light weight sprite container.
* Using this may increase performance. So if you have a map that doesn't use
* any tiles and is all parallax, then you should considering using this.
*
* *Note, there's a chance this may break some plugins if they call functions in
* the original tilemap class.*
*
* Terms of use:
*
*https://github.com/quxios/QMV-Master-Demo/blob/master/readme.md
*
* Like my plugins? Support me on Patreon!
*
*https://www.patreon.com/quxios
*/
//-----------------------------------------------------------------------------
// SimpleTilemap
//656
function SimpleTilemap() {
this.initialize.apply(this, arguments);
}
(function() {
//984
Game_Map.prototype.noTilemap = function() {
return !!$dataMap.meta.noTilemap;
};
//1195
//-----------------------------------------------------------------------------
// Sprite_Character
var Alias_Sprite_Character_updatePosition = Sprite_Character.prototype.updatePosition;
Sprite_Character.prototype.updatePosition = function() {
var prevY = this.y;
var prevZ = this.z;
Alias_Sprite_Character_updatePosition.call(this);
if (this.y !== prevY || this.z !== prevZ) {
if ($gameMap.noTilemap && this.parent && this.parent.requestSort) {
this.parent.requestSort();
}
}
};
//-----------------------------------------------------------------------------
// Spriteset_Map
var Alias_Spriteset_Map_createTilemap = Spriteset_Map.prototype.createTilemap;
Spriteset_Map.prototype.createTilemap = function() {
if ($gameMap.noTilemap()) {
this._tilemap = new SimpleTilemap();
this._baseSprite.addChild(this._tilemap);
} else {
Alias_Spriteset_Map_createTilemap.call(this);
}
};
var Alias_Spriteset_Map_loadTileset = Spriteset_Map.prototype.loadTileset;
Spriteset_Map.prototype.loadTileset = function() {
if (!$gameMap.noTilemap()) {
Alias_Spriteset_Map_loadTileset.call(this);
}
};
var Alias_Spriteset_Map_updateTilemap = Spriteset_Map.prototype.updateTilemap;
Spriteset_Map.prototype.updateTilemap = function() {
if (!$gameMap.noTilemap()) {
Alias_Spriteset_Map_updateTilemap.call(this);
}
};
//-----------------------------------------------------------------------------
// SimpleTilemap
SimpleTilemap.prototype = Object.create(Sprite.prototype);
SimpleTilemap.prototype.constructor = SimpleTilemap;
SimpleTilemap.prototype.initialize = function() {
Sprite.prototype.initialize.call(this);
this._requestSort = false;
};
SimpleTilemap.prototype.requestSort = function() {
this._requestSort = true;
};
SimpleTilemap.prototype.update = function() {
Sprite.prototype.update.call(this);
if (this._requestSort) {
this._sortChildren();
}
};
SimpleTilemap.prototype._sortChildren = function() {
this.children.sort(this._compareChildOrder.bind(this));
};
SimpleTilemap.prototype._compareChildOrder = function(a, b) {
if (a.z !== b.z) {
return a.z - b.z;
} else if (a.y !== b.y) {
return a.y - b.y;
} else {
return (a.spriteId - b.spriteId) || 0;
}
};
})()
Credit and Thanks
- Don't credit me. Only the author.
- Below are the terms of the author.
Terms
Free to use for commercial and non-commercial projects. More information at https://github.com/quxios/QMV-Master-Demo#terms-of-use-for-non-commercial-and-commercial
Click to expand...
Notes
- It worked flawlessly with GalvLayers.
本贴来自国际rpgmaker官方论坛作者:Eliaquim处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/qplus_notilemap.111903/
页:
[1]