Qplus_noTilemap

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,560
Reaction score
904
First Language
Portuguese - Br
Primarily Uses
RMMV
Qplus_noTilemap

Author 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


How to Use
Just put the note tag on map notes:
<noTilemap>

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 *******!
 *
 *  https://www.*******.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
Notes
- It worked flawlessly with GalvLayers.
 
Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,560
Reaction score
904
First Language
Portuguese - Br
Primarily Uses
RMMV
Attached the plugin to the first post. I will no longer host it.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

The Ace attorney series are so great games... But at the same time such a travesty.
Made a video showcasing a plugin (by Lanza) that adds 5 more weather effects to our MV games. :LZYsmile: Namely:
Ash-dust,
bloodrain,
Cherry Blossom Petals,
Hail,
and bubbles.

I just like this website:
lol

Forum statistics

Threads
103,239
Messages
998,300
Members
134,729
Latest member
Takufy
Top