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

[转载发布] Tile Changer (Copy Tiles and Change Tiles)

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

    连续签到: 2 天

    [LV.7]常住居民III

    7948

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 11 小时前 | 显示全部楼层 |阅读模式
    Tile Changer
    2018.03.24
    by Shaz

    Introduction
    This plugin allows you to copy a block of tiles from another map to the current map, copy a block of tiles from one spot on the current map to another, or to change individual tiles to a specific tile Id.

    How to use
    Add to your plugin folder (call it Shaz_TileChanger.js) and enable in the plugin manager.
    Set up the notes on the current map only if you want to copy tiles from other maps.
    Use the plugin commands to copy or change tiles.

    Map notes must be in the following format - one name/map pair for each map you want to copy tiles from:
                    Code:       
    1. <load:[{"name":"pinkroom","map":120},
    2.        {"name":"blueroom","map":121},
    3.        {"name":"greenroom","map":122}]>
    复制代码


    I suggest doing this in a text editor, as the line won't fit in the map note window, so it's hard to see and can be easy to make mistakes.

    When using the CopyTiles command to copy from another map, use the 'name' from the map note box rather than the map id.  This does not need to be the same as the display name or the editor name of the map.  

    Plugin Commands

    CopyTiles dx dy 'source' sx1 sy1 sx2 sy2 z-list
    Copies tiles from another (or the same) map, where
      dx      is the x-coordinate of the top left destination area
      dy      is the y-coordinate of the top left destination area
      source  is the 'name' of the source map in the map note or 'self' if you want to copy a section of the current map - you need to put quotes around this name.
      sx1     is the x-coordinate of the top left source area
      sy1     is the y-coordinate of the top left source area
      sx2     is the x-coordinate of the bottom right source area
      sy2     is the y-coordinate of the bottom right source area
      z-list  is an optional series of z values indicating which layers to copy; if more than one, just use spaces between; if omitted, all layers will be copied

    ChangeTile x y z tileId
    Changes the tile at the specified coordinates and layer to the tileId
    indicated.  Note - no auto-formatting of autotiles happens here.

    Z-layers
    0 - ground layer (most A tiles)
    1 - ground cover layer (A1 tiles with transparent areas, and right 4 columns of A2 tiles)
    2 - upper layer 1
    3 - upper layer 2
    4 - shadow layer
    5 - region layer

    All arguments can be script commands that will be evaluated - make sure there are no spaces anywhere within the individual arguments/script commands.

    Example


    CopyTiles 3 3 'destroyed' 5 8 9 12
    copies the area between 5,8 and 9,12 from the 'destroyed' map to the current map, with the upper left at 3,3.  All layers are copied

    CopyTiles 3 3 'wilted' 5 8 9 12 2 3
    copies layers 2 and 3 (the upper layers) between 5,8 and 9,12 from the 'wilted' map to the current map, with the upper left at 3,3

    ChangeTile 3 3 2 0
    replaces the tile at coordinate 3,3 on layer 0 (upper layer 1) with tile 0 (which is the 'erase' tile - so this is removing whatever tile may have previously been there)

    Plugin
    Download from pastebin
    make sure to save it as Shaz_TileChanger.js

    Credit
    - Shaz

    Terms
    - free for use in commercial games
    - do not post elsewhere - link back to this page

    Notes
    This plugin changes/copies the tile Id, not the image.  So your other maps should use the same tileset, or at least have the the tiles that you want to copy in the same position on both tilesets.  Otherwise you could be trying to copy a vase with flowers from one map, and have it turn into a teddy bear on the other.

    [introduced 2018.03.24] This plugin now saves the tile changes.  If you leave the map (to another map, the battle screen or a menu) and return, the tile changes will still be there.  You do not need to add a parallel process event to re-run the tile changes anymore.

    I have only done basic testing with this plugin.  If you have issues, please provide me with a copy/paste, or screenshots of
    1. Your plugin command
    2. Your map note box if you're using the CopyTiles command (copy/paste that one)
    3. The console log, showing the error message and the script name and line number

    Change Log
    2018.03.24 1.10 - tile changes are now saved.  Solves issue of tiles reverting when returning from the menu or battle, and an event to re-change the tiles when coming from another map are no longer required.


    本贴来自国际rpgmaker官方论坛作者:Shaz处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/tile-changer-copy-tiles-and-change-tiles.90437/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-31 22:38 , Processed in 0.103820 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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