Tile Control Plugin v1.0 for RPG Maker MZ

Hey RPG Makers!

I’m excited to release to you the Tile Control Plugin for RPG Maker MZ!

This plugin gives you masterful control of the tiles on the game’s map, so you can dynamically change the tiles while the player is playing the game!

You can use the Set Tile plugin command to set a single tile, or use the Fill Tiles plugin command to fill great swaths of tiles at once! And with the Fill Tiles command, you can use various filters to determine which tiles are affected!

Want to make water flow? Use the “creep” feature of the Fill Tiles plugin command!

Plugin commands:

  • Set Tile: Change the tile ID of a certain tile. For ease of use, you can use a tile code (as described below). Or, you can use an exact tile ID. You can also set X, Y, and Z coordinates at which to set the tile, and whether the coordinates are absolute or relative to an event or the player!
  • Fill Tiles: Filters include: Fill by region, swap tiles by tile ID, fill by area, fill by distance, whether fill should be hollow, special conditions for origin tile, and the advanced “creep” feature!
  • Change Animation Frames: You can change how quickly tiles animate, even while the player is playing the game! (Great if you have the player inside a “living” or “fleshy” map, like inside a giant creature or toxic jungle! Likwise, useful for horror games!)

Plugin parameters:

  • Tile Animation Frames: Determine the default speed at which tiles animate!
  • Common Event on OK Press: When the player presses the OK button (Enter), you can call a common event! To make your common event affect tiles, you can use conditional branches, Fill Tiles plugin commands, or the $gameMap.tileCodeAt(x,y,z) script call in a conditional branch.
  • Tile Info on OK Press: Useful for playtesting! You can find the tile ID and tile code of any tile. Just start playtesting and press the F12 key to open the console window. Then, move to the location where you want to know the tile IDs of the current tiles on each layer. Then, hold Ctrl and press the OK (Enter) key. Complete tile information, including the tile ID code, will be logged to the console window!

Script calls: (Advanced)

  • $gameMap.tileCodeAt(x, y, z): You can use this script to identify the tile ID code at any tile, while the player is playing! Use this to figure out what type of tile the player is on at any time, or to figure out what type of tile an event is on, or to determine the tile code of any other tile!

You can use the above features to make all kinds of games!

Use cases include:

  • Make your cutscenes awesome with tiles that change during the cutscene!
  • Allow a switch to change the tiles, creating unique and advanced puzzle maps!
  • Have secret passages open or close!
  • Make changes to your maps depending on how the player chooses to play the game! Have a portcullis open or close, or have a building get ruined, or all sorts of other changes to a map! (This way, you don’t need to duplicate the map and all its events every time you want a change in the map!)
  • Make a mining game in which the player can mine all sorts of tiles!
  • Make a farming game in which the player can modify all sorts of crops!
  • Make water flow!
  • Allow a player to place their own furniture in their house!
  • Make a fire that burns the ground wherever it goes!
  • Make an enemy that can break down certain walls/tiles to reach the player!

Opportunities are endless! How will you use this plugin in your game?

For complete information on plugin commands available with this plugin, see the images and full help text below!

You are not logged in.
Download available to supporters of the Design Counselor level and higher.

There is a newer version of Tile Control for MZ!

To install:

  1. Download the file, and unzip it.
  2. Make sure the unzipped file is named Tyruswoo_TileControl.js and is saved as a .js file.
  3. Open the file folder of your project. Place the file in your project’s “js” folder, within the “plugins” folder.
  4. Open your project in RPG Maker MZ, then go to the Tools menu and select Plugin Manager. Use the Plugin Manager to add and activate the plugin.
  5. I recommend you place this plugin toward the bottom of your plugin list, so it has high priority.
List of plugin commands available with Tile Control.
Example of how to determine the tile ID code. Use the letter of the tab, and the x and y positions of the tile in the tileset. But caution! Determining the tile ID code this way assumes that you have a full tileset, including all A tab tiles, including A1, A2, A3, A4, and A5!
Set Tile plugin command arguments include: Tile ID, X Y Z Coordinates, and Relativity & Options.
Fill Tiles plugin command accepts filters, in addition to arguments for tile ID, X Y Z Coordinate of origin, and Relativity & Options.
For the Tile ID, you can use the Tx,y ("Tab x comma y") code, or the Tn ("Tab number") code, or the exact tile ID.
The X and Y coordinates determine where on the map will be affected. The Z coordinate is for the layer affected.
Relativity can be set to Absolute, Relative to Event, or Relative to Player. If relative to player, you can select the Party Member. You can also use this in combination with the Follower Control plugin, if so desired. You can also apply an Orientational Shift, so that relative to the player or event, the affected tile will depend on that character's direction. Options include whether to Allow Autotiling, and whether to Clear Upper Layers.
Orientational Shift allows you to select a tile in front, behind, or to the side of any character. The character may be the player, a follower, or an event.
The Fill Tiles plugin command has powerful filters. These allow you to determine which tiles are affected by the Fill Tiles command. For example, you can use the Tile ID(s) Filter to swap tiles by tile ID. Or, you can fill a region, or an area, or a distance from the origin. Or, you can apply multiple filters, so tiles are only changed at locations that pass all the filters. Or, make your fill hollow!
Creep is applied after the Fill space is calculated. Creep extends from the Fill space, and may be the same tile as the Fill, or a different tile. Creep is very useful for creating flowing water, lava, or poison, but any tile can be used for creep.

The full text of the help document is included below, and includes details of many other features and tips for how to use Tile Control!

Tyruswoo Tile Control Plugin for RPG Maker MZ
v1.0, released 8/30/2020

Plugin commands, their arguments, and short explanations:

Set Tile: Modify the tileID at selected location. Arguments include:

  • Tile ID: Use a tile code (see below) or exact ID.
    • X,Y,Z Coordinates: Select the location of the tile to modify.
      • X: On map, X coordinate at which to set tile.
      • Y: On map, Y coordinate at which to set tile.
      • Z: Z layer to affect. z 0-3 for layers 1-4.
    • Relativity & Options: Relative position of coords, and options.
      • Relativity Mode: Absolute, or relative to player or event.
        • Event ID: If relative to event: The event’s ID.
        • Party Member: If relative to player: Leader or follower. (May use with Tyruswoo_FollowerControl plugin.)
        • Orientational Shift: Change loc based on character’s direction.
          • Forward Shift: + to shift forward. – to shift backward.
          • Rightward Shift: + to shift rightward. – to shift leftward.
      • Allow Autotiling: True for autotiling. False for exact.
      • Clear Upper Layers: True to erase upper z layers. False: Keep.

Fill Tiles: Modify multiple tiles. Allows filters. Arguments include:

  • Tile ID: Fill tile code (see below) or exact ID.
  • X,Y,Z Coordinates: Select the fill origin location.
    • X: On map, X coordinate of origin.
    • Y: On map, Y coordinate of origin.
    • Z: Z layer to affect. z 0-3 for layers 1-4.
  • Relativity & Options: Relative position of coords, and options.
    • Relativity Mode: Absolute, or relative to player or event.
      • Event ID: If relative to event: The event’s ID.
      • Party Member: If relative to player: Leader or follower. (May use with Tyruswoo_FollowerControl plugin.)
      • Orientational Shift: Relative shift loc by character’s direction.
        • Forward Shift: + to shift forward. – to shift backward.
        • Rightward Shift: + to shift rightward. – to shift leftward.
    • Allow Autotiling: True for autotiling. False for exact.
    • Clear Upper Layers: True to erase upper z layers. False: Keep.
  • Filters: Only fill tiles that pass all filters.
    • Region(s) Filter: Region(s) allowed for fill.
    • Tile ID(s) Filter: Only allow fill at certain Tile ID(s).
      • Tile ID(s) Recognized: Tile ID(s) at which fill can occur.
      • Z Coord(s) Recognized: Z coords (layers) at which fill can occur.
    • Area Filter: Area to allow fill.
      • X1: X coordinate of first corner of fill area.
      • Y1: Y coordinate of first corner of fill area.
      • X2: X coordinate of other corner of fill area.
      • Y2: Y coordinate of other corner of fill area.
    • Distance Filter: Distance from origin to allow fill.
    • Hollow Filter: True for hollow. False for regular fill.
    • Origin Filter: Never fill origin tile, or always fill.
    • Creep: Append unique tile changes, beyond fill.
      • Creep Distance: Distance creep spreads.
      • Creep Tile ID: Tile code (see below) of creep.
      • Creep Z Coordinate: Z layer to affect with creep.
      • Creep Options: Options for creep.
        • Allow Autotiling: True for autotiling. False: exact.
        • Clear Upper Layers: True to erase upper z layers.
      • Creep Filters: Only creep on tiles passing filters.
        • Creep Region(s) Filter: Region(s) onto which creep can go.
        • Creep TileID(s) Filter: Only allow creep on these tile IDs.
          • Tile ID(s) Recognized: Tile ID(s) onto which creep can go.
          • Z Coord(s) Recognized: Z layers to search for tile ID(s).
        • Creep Area Filter: Area onto which creep can go.
          • X1: X coordinate of 1st corner (creep).
          • Y1: Y coordinate of 1st corner (creep).
          • X2: X coordinate of 2nd corner (creep).
          • Y2: Y coordinate of 2nd corner (creep).
        • Creep Hollow Filter: True: Hollow. False: Regular creep.

Change Animation Frames: During game, change tile animation speed. Has one argument, as follows:

  • Tile Animation Frames: Frames for tile animations. Lower is faster.

Plugin parameters:

Tile Animation Frames: Frames for tile animations of animated tiles. Lower is faster. Higher is slower. Default: 30.

Common Event on OK Press: Common event to begin when player presses the OK button (Enter).

Tile Info on OK Press: True: Output tile info to console window when playtester holds Ctrl then presses Enter (OK). (Tip: When playtesting, press F12 to open the console window.) Default: True.

Script calls (Advanced):

$gameMap.tileCodeAt(x,y,z): Returns the “Tx,y” (“Letter X comma Y” or “Tab X comma Y”) tile code at location (x,y,z) where x is the x coordinate, y is the y coordinate, and z is the z layer (0, 1, 2, or 3). Tile code returns as a string.

  • For example, from the default Overworld tileset, ocean returns the string “A0,0”.
  • This script call is useful in a conditional branch.
  • For example, if the player is in the Overworld and the Overworld is using the default tilset, you can use a conditional branch with the following script to check whether the player is currently in a temperate/deciduous forest tile (at z=1, which is editor layer 2):
    • Example Conditional Branch (Script): $gameMap.tileCodeAt($gamePlayer.x, $gamePlayer.y, 1) == “A4,2”

$gameMap.tileCode(x,y,z): Same as $gameMap.tileCodeAt(x,y,z).

Basics of how to use this plugin:

  1. To change a tile while a player is playing your game, you can create an event that runs the plugin command Set Tile.
  2. In the Set Tile command, type the Tile ID code for your desired tile. Use one of the three types of Tile ID codes (described below).
  3. Choose the coordinates (X, Y, and Z) at which to change the tile. Keep in mind that the coordinates are by default relative to the event that is running this plugin command.
  4. You can modify the settings in Relativity & Options, if you like. If you want absolute coordinates, or coorcinates relative to the player, you can change this here. If you want to keep upper z layers, you can do that, too. (Keep autotiling true unless you need to set an autotile
    to an exact value.)
  5. When you activate the event, the tile at the coordinates you have chosen will change to the Tile ID you chose!

Tile ID Codes:

There are three types of tile ID codes. You can use any of these tile codes for the “Tile ID” of plugin commands.

Tx,y

  • Where T is the tab, x is the x position in the tab’s tileset, and y is the y position in the tab’s tileset. Also known as “Letter X comma Y” or “Tab X comma Y”.
    • This tile code is determined by the Tab (A, B, C, D, or E) and the (x,y) position of the desired tile within the tilset.
    • For example, in tab A, the top left tile is A0,0 (which in the Overworld tileset is ocean).
    • For example, in the default Overworld tileset, use tile code A3,1 for a whirlpool.
    • For example, in the default Overworld tileset, use tile code B2,1 for a pyramid.
    • You can use tile code B0,0 to erase any tile.

Caution! The Tx,y tile ID code assumes that you have a full tileset in Tab A! This includes A1, A2, A3, A4, and A5. If you do not have a full tileset in Tab A, what appears to be the correct tile code may be incorrect! This can result in a crash of the game.

Tn

  • Where T is the tab, and n is the number of the tile when counting tiles from left to right, starting with zero. Also known as “Letter Number” or “Tab Number”.
    • Tip: This numbering scheme is the same as how regions are numbered and displayed in the regions (R) tab, so you can use the regions tab to help with counting tiles.
    • For example, in tab A, the first tile is A0 (which in the Overworld tileset is ocean).
    • For example, in the default Overworld tileset, use tile code A11 for a whirlpool.
    • For example, in the default Overworld tileset, use tile code B10 for a pyramid.
    • You can use tile code B0 to erase any tile.

Caution! The Tn tile ID code assumes that you have a full
tileset in Tab A! This includes A1, A2, A3, A4, and A5. If you
do not have a full tileset in Tab A, what appears to be the
correct tile code may be incorrect! This can result in a crash
of the game.

Exact

  • For this tile code, you must enter the exact tile ID number used in RPG Maker’s inner code.
    • Tip: The exact tile ID code is only needed if you want to set an autotile to an exact shape (ignoring autotiling). Note that to ignore autotiling, the “Allow Autotiling” option must be Off (or false) in the plugin command arguments. (Note: Using exact tile ID for autotiles is similar to using Shift+Click in the editor.)
    • Tip: To find the exact tile ID code, while playtesting, open the console window by pressing F12 on the keyboard. Then, move the party leader character on top of a tile with the exact tile appearance you want. Then, hold Ctrl while you press Enter. The exact tile IDs at that location will be logged to the console.
    • For example, in the default Overworld tileset, use tile code 2048 for ocean.
    • For example, in the default Overworld tileset, use tile code 2576 for a whirlpool.
    • For example, in the default Overworld tileset, use tile code 10 for a pyramid.
    • You can use tile code 0 to erase any tile.

Advanced uses for this plugin:

  • Creep! Creep is calculated after the main fill command has finished. At that time, you can add an “appendage” of any tile ID. Creep will by default be the same tile ID as the fill; however, you can also define a unique tile ID for the creep. The creep can go any distance you like, but by default only goes 1 tile further than the fill. Creep uses the tiles already filled as a large “origin” from which creep can expand.
    • Creep is especially useful if you want to have fluid that spreads, such as flowing water, flowing lava, or flowing poison. However, creep can be used with any tile.
    • Note that creep spreads in cardinal directions (north, south, east, and west), but not in diagonal directions.
  • Exact tiles! To set an exact tile, you must go to the plugin command’s options argument, and change Allow Autotiling to false. Then, if you are making an exact shape of an autotile, you must know the exact tile ID of that shape of the autotile. To find this, create a map with that shape of autotile present, then go into playtesting mode. While standing on the autotile, hold Ctrl and press OK (Enter) to output the info of the tiles at that location to the console window. Press F12 to open the console window to see the output info. Use the exact tile ID in the plugin command. Setting exact tiles is useful when you want a particular shape of an autotile. Note that exact tiles are similar to using Shift+Click in the editor, because autotiling is prevented and any autotile can be placed anywhere.
  • Hollow filter! You can use this to help you achieve interesting and appealing fill shapes! Hollow shapes do respect diagonals. (This is different compared to creep or the distance filter, because both creep and the distance filter only recognize cardinally neigboring tiles.) The hollow filter recognizes neighboring tiles both cardinally and diagonally.
  • Common Event on OK Press! (And the $gameMap.tileCodeAt(x,y,z) script!) You can use this plugin parameter to define a common event that happens when the player presses the OK button (Enter for keyboard users). If you want the OK press to detect a tile, you can have the common event use the $gameMap.tileCodeAt(x,y,z) script call in a conditional branch (see example above), so that you know what tiles are located at the player’s position.
    • If you want to change a tile, it is usually easier to use the Fill plugin command, because it has filters. If you use the Fill plugin command, you often don’t need to use the $gameMap.tileCodeAt(x,y,z) script call, because the Fill command has a Tile ID(s) Filter. However, if you don’t want to change a tile, but just want to know what tile code is present, the $gameMap.tileCodeAt(x,y,z) script call is useful.
    • You could combine the $gameMap.tileCodeAt(x,y,z) plugin command with scripts $gameMap.xWithDirection(x,d) and $gameMap.yWithDirection(y,d) to get the tile code in front of the player, or relative to an event. However, if you want to modify a tile depending on the player’s direction, you could also use the Orientational Shift relativity option to cause a tile to be modified in front of the player.
    • You could also use a conditional branch to check whether the player has a certain item (tool) required to modify a tile.

Reference of how tile information is tracked in RPG Maker:

Exact tile ID reference:

  • Tile ID 0 Beginning of Tab B.
  • Tile ID 256 Beginning of Tab C.
  • Tile ID 512 Beginning of Tab D.
  • Tile ID 768 Beginning of Tab E.
  • Tile ID 1536 Beginning of Tab A portion A5.
  • Tile ID 2048 Beginning of Tab A portion A1. Beginning of autotiles.
  • Tile ID 2816 Beginning of Tab A portion A2.
  • Tile ID 4352 Beginning of Tab A portion A3.
  • Tile ID 5888 Beginning of Tab A portion A4.
  • Tile ID 8192 This is the maximum Tile ID.

z Layers:

  • z=0: Layer 1 in editor.
  • z=1: Layer 2 in editor.
  • z=2: Layer 3 in editor.
  • z=3: Layer 4 in editor.
  • z=4: ShadowBits.
  • z=5: Regions.

Shadow Bits:

  • Bit 1: Northwest (upper left) corner shadow.
  • Bit 2: Northeast (upper right) corner shadow.
  • Bit 3: Southwest (lower left) corner shadow.
  • Bit 4: Southeast (lower right) corner shadow.

Tile Flags:

May be expressed as decimal (base 10); binary (base 2, prefix of 0b, values of 0 or 1); or hexidecimal (base 16, prefix of 0x, values of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, or f).

  • Bit 1: Impassible south side of tile. (Hint: 2 key on Numpad.)
  • Bit 2: Impassible west side of tile. (Hint: 4 key on Numpad.)
  • Bit 3: Impassible east side of tile. (Hint: 6 key on Numpad.)
  • Bit 4: Impassible north side of tile. (Hint: 8 key on Numpad.)
  • Bit 5: This is a star (*) tile, and so does not affect passage.
  • Bit 6: This is a ladder.
  • Bit 7: This is a bush.
  • Bit 8: This is a counter.
  • Bit 9: This is damage floor.
  • Bit 10: Impassible to boats.
  • Bit 11: Impassible to ships.
  • Bit 12: Airships cannot land here (or if bits 1-4 all impassible.)
  • Bit 13: Terrain Tags 1 to 7 (in binary).
  • Bit 14: Terrain Tags 1 to 7 (in binary).
  • Bit 15: Terrain Tags 1 to 7 (in binary).

For more help using the Tile Control plugin, see Tyruswoo.com.

Version History:

v1.0: 8/30/2020

  • Tile Control released for RPG Maker MZ!

Terms of Use:

  1. You joined Tyruswoo.com as a paying member when you downloaded this plugin. You do not have to remain a paying member to use the plugin you downloaded. However, your support is greatly appreciated, and allows me to continue improving and updating plugins.
  2. You agree to not redistribute this plugin. You agree to direct others to Tyruswoo.com if they want the plugin.
  3. You may use this for any game for which you are one of the main developers. This includes any commercial or non-commercial game you are creating.
  4. Adding “Tyruswoo”, “Tyruswoo Studio”, or “Tyruswoo Team” to your game’s credits is greatly appreciated, but not required.
  5. Likewise, listing which Tyruswoo Team plugins you used is appreciated, but not required.
  6. A free copy of your game is awesome, but not required.

Remember, only you can build your dreams!
-Tyruswoo

Enjoy the Tile Control plugin! Only you can build your dreams!

Tyruswoo

Questions or concerns? Check out the forums to ask a question. You may even find an answer there, already!

To view and submit comments on this post, you must be logged in and joined as at least a Warm Fuzzy member. Log In No account, or ready to upgrade your membership? Join the adventure!

Tyruswoo

Indie Game Designer
creating game content!

Latest RPG Maker

Pin It on Pinterest

Shares