设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 76|回复: 0

[转载发布] Qplus_noTilemap

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    8037

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    30081
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    39012

    灌水之王

    发表于 5 天前 | 显示全部楼层 |阅读模式
    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
    Spoiler







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

    Spoiler: QPlus_noTilemap.js
                    JavaScript:       
    1. //=============================================================================
    2. // QPlus_noTilemap.js
    3. //=============================================================================
    4. /*:
    5. * @plugindesc QPlus noTilemap
    6. * @author Quxios
    7. * @site https://quxios.github.io/
    8. *
    9. * @help
    10. * I edited the original plugin QPlus from Quxios to only have the feature
    11. * "No Tile Map" that helps when you go all parallax in your game.
    12. * Despite removing the tilemap the passages marked in the database continue
    13. * to function normally.
    14. * Please, follow the terms of use from Quoxios. No need to credit me.
    15. *_____________________________________________________________________________
    16. *
    17. * Eu editei o plugin QPlus original de Quxios para ter apenas o recurso
    18. * "No Tile Map", que pode ajudar na performance de um jogo que usa somente
    19. * parallaxes.
    20. * Apesar de remover o tilemap, as passagens marcadas no banco de dados
    21. * continuam funcionando normalmente.
    22. * Por favor, siga os termos de uso de Quoxios. Não precisa me dar créditos.
    23. *
    24. * ----------------------------------------------------------------------------
    25. * **No tilemap**
    26. * ----------------------------------------------------------------------------
    27. * You can disable the tile map by adding this note to a map
    28. * ~~~
    29. * <noTilemap>
    30. * ~~~
    31. * This will replace the tilemap with a simple light weight sprite container.
    32. * Using this may increase performance. So if you have a map that doesn't use
    33. * any tiles and is all parallax, then you should considering using this.
    34. *
    35. * *Note, there's a chance this may break some plugins if they call functions in
    36. * the original tilemap class.*
    37. *
    38. * Terms of use:
    39. *
    40. *  https://github.com/quxios/QMV-Master-Demo/blob/master/readme.md
    41. *
    42. * Like my plugins? Support me on Patreon!
    43. *
    44. *  https://www.patreon.com/quxios
    45. */
    46. //-----------------------------------------------------------------------------
    47. // SimpleTilemap
    48. //656
    49. function SimpleTilemap() {
    50.   this.initialize.apply(this, arguments);
    51. }
    52. (function() {
    53. //984
    54. Game_Map.prototype.noTilemap = function() {
    55.     return !!$dataMap.meta.noTilemap;
    56.   };
    57. //1195
    58. //-----------------------------------------------------------------------------
    59. // Sprite_Character
    60.   var Alias_Sprite_Character_updatePosition = Sprite_Character.prototype.updatePosition;
    61.   Sprite_Character.prototype.updatePosition = function() {
    62.     var prevY = this.y;
    63.     var prevZ = this.z;
    64.     Alias_Sprite_Character_updatePosition.call(this);
    65.     if (this.y !== prevY || this.z !== prevZ) {
    66.       if ($gameMap.noTilemap && this.parent && this.parent.requestSort) {
    67.         this.parent.requestSort();
    68.       }
    69.     }
    70.   };
    71. //-----------------------------------------------------------------------------
    72. // Spriteset_Map
    73.   var Alias_Spriteset_Map_createTilemap = Spriteset_Map.prototype.createTilemap;
    74.   Spriteset_Map.prototype.createTilemap = function() {
    75.     if ($gameMap.noTilemap()) {
    76.       this._tilemap = new SimpleTilemap();
    77.       this._baseSprite.addChild(this._tilemap);
    78.     } else {
    79.       Alias_Spriteset_Map_createTilemap.call(this);
    80.     }
    81.   };
    82.   var Alias_Spriteset_Map_loadTileset = Spriteset_Map.prototype.loadTileset;
    83.   Spriteset_Map.prototype.loadTileset = function() {
    84.     if (!$gameMap.noTilemap()) {
    85.       Alias_Spriteset_Map_loadTileset.call(this);
    86.     }
    87.   };
    88.   var Alias_Spriteset_Map_updateTilemap = Spriteset_Map.prototype.updateTilemap;
    89.   Spriteset_Map.prototype.updateTilemap = function() {
    90.     if (!$gameMap.noTilemap()) {
    91.       Alias_Spriteset_Map_updateTilemap.call(this);
    92.     }
    93.   };
    94.   //-----------------------------------------------------------------------------
    95.   // SimpleTilemap
    96.   SimpleTilemap.prototype = Object.create(Sprite.prototype);
    97.   SimpleTilemap.prototype.constructor = SimpleTilemap;
    98.   SimpleTilemap.prototype.initialize = function() {
    99.     Sprite.prototype.initialize.call(this);
    100.     this._requestSort = false;
    101.   };
    102.   SimpleTilemap.prototype.requestSort = function() {
    103.     this._requestSort = true;
    104.   };
    105.   SimpleTilemap.prototype.update = function() {
    106.     Sprite.prototype.update.call(this);
    107.     if (this._requestSort) {
    108.       this._sortChildren();
    109.     }
    110.   };
    111.   SimpleTilemap.prototype._sortChildren = function() {
    112.     this.children.sort(this._compareChildOrder.bind(this));
    113.   };
    114.   SimpleTilemap.prototype._compareChildOrder = function(a, b) {
    115.     if (a.z !== b.z) {
    116.       return a.z - b.z;
    117.     } else if (a.y !== b.y) {
    118.       return a.y - b.y;
    119.     } else {
    120.       return (a.spriteId - b.spriteId) || 0;
    121.     }
    122.   };
    123.   })()
    复制代码



    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/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 10:43 , Processed in 0.093502 second(s), 57 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表