public

Rpg Maker Developers Group

Simple enough for a child, powerful enough for a developer

2 Followers

MVCityShrimp's Cover Tiles

BMM Archive · July 15, 2026

Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.

Original Source

  • Original title: CityShrimp's Cover Tiles
  • Original author: cityshrimp
  • Original date: June 11, 2018
  • Source thread: https://forums.rpgmakerweb.com/threads/cityshrimps-cover-tiles.96380/
  • Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMV)

Summary

CS_CoverTiles v1.0.2 CityShrimp Introduction Cover Tiles for RPG Maker MV. Based on Neon Black's Terrain Tags script for Ace VX. Allows setting specific tiles as "covers" where the tile is passable and also drawn above the character. Common use case is to allow events and characters to walk behind walls and roofs.

Archived First Post

CS_CoverTiles v1.0.2
CityShrimp
Introduction

Cover Tiles for RPG Maker MV. Based on Neon Black's Terrain Tags script for Ace VX. Allows setting specific tiles as "covers" where the tile is passable and also drawn above the character. Common use case is to allow events and characters to walk behind walls and roofs.

Free for commercial and non commercial use.

Features
  1. Create cover tiles that are passable and drawn above events.
  2. Create block tiles that are always impassable
Change Log
1.0.2

  • Fixed bug where Tiles B-E do not show up when a tile is marked as a cover tile
  • Added a "Pass" tile. Does not change the appearance of a tile, just allows players to pass through.

1.0.1
  • Fixed bug where cover tiles are not in right layer after loading game.
  • Added support for non-WebGl graphics (never tested!)
How to Use
  • Download CS_CoverTiles.js
  • Place it into your project's Plugin list
  • Check description in file for latest Parameter
Script:

Download v1.0.2

/*=============================================================================
* CityShrimp's Cover Tiles
* CS_CoverTiles.js
* Version: 1.0.2
* Free for commercial and non commercial use.
*=============================================================================*/

/*:
* @plugindesc This plugin provides a way to create "covers".
*
* @author CityShrimp
*
* ===Parameter List===
*
* @param Pass RegionID
* @desc This region ID will cause tile to become passable.
* @Default 18
*
* @param Cover RegionID
* @desc This region ID will cause tile to become a cover (passable + higher than events).
* @Default 19
*
* @param Block RegionID
* @desc This region ID will cause tile to become impassible.
* @Default 20
*
* @Help
* ============================================================================
* Latest Version
* ============================================================================
*
* Get the latest version of this script on
* https://github.com/cityshrimp/rmmv/blob/master/CS_CoverTiles.js
*
*=============================================================================
*/

var Imported = Imported || {};
Imported['CS_CoverTiles'] = "1.0.2";

var CS_CoverTiles = CS_CoverTiles || {};

(function($) {
"use strict";

// Load parameters
$.parameters = PluginManager.parameters("CS_CoverTiles") || {};
$._pass_region_id = Number($.parameters['Pass RegionId'] || 18);
$._cover_region_id = Number($.parameters['Cover RegionId'] || 19);
$._block_region_id = Number($.parameters['Block RegionId'] || 20);
$.tile_flag_set = {};

var old_Game_Map_checkPassage = Game_Map.prototype.checkPassage;
Game_Map.prototype.checkPassage = function(x, y, bit) {
var rid = this.regionId(x, y);
if (rid == $._block_region_id)
return false;
if (rid == $._pass_region_id || rid == $._cover_region_id)
return true;
return old_Game_Map_checkPassage.call(this, x, y, bit);
}

ShaderTilemap.prototype._paintTiles = function(startX, startY, x, y) {
var mx = startX + x;
var my = startY + y;
var dx = x * this._tileWidth, dy = y * this._tileHeight;
var tileId0 = this._readMapData(mx, my, 0);
var tileId1 = this._readMapData(mx, my, 1);
var tileId2 = this._readMapData(mx, my, 2);
var tileId3 = this._readMapData(mx, my, 3);
var shadowBits = this._readMapData(mx, my, 4);
var upperTileId1 = this._readMapData(mx, my - 1, 1);
var lowerLayer = this.lowerLayer.children[0];
var upperLayer = this.upperLayer.children[0];

var rtileId0 = (0 * $dataMap.height + my) * $dataMap.width + mx;
var rtileId1 = (1 * $dataMap.height + my) * $dataMap.width + mx;
var rtileId2 = (2 * $dataMap.height + my) * $dataMap.width + mx;
var rtileId3 = (3 * $dataMap.height + my) * $dataMap.width + mx;

if (this._isHigherTile(tileId0) || $gameMap.regionId(mx, my) == $._cover_region_id) {
this._drawTile(upperLayer, tileId0, dx, dy);
} else {
this._drawTile(lowerLayer, tileId0, dx, dy);
}
if (this._isHigherTile(tileId1) || $gameMap.regionId(mx, my) == $._cover_region_id) {
this._drawTile(upperLayer, tileId1, dx, dy);
} else {
this._drawTile(lowerLayer, tileId1, dx, dy);
}

this._drawShadow(lowerLayer, shadowBits, dx, dy);
if (this._isTableTile(upperTileId1) && !this._isTableTile(tileId1)) {
if (!Tilemap.isShadowingTile(tileId0)) {
this._drawTableEdge(lowerLayer, upperTileId1, dx, dy);
}
}

if (this._isOverpassPosition(mx, my)) {
this._drawTile(upperLayer, tileId2, dx, dy);
this._drawTile(upperLayer, tileId3, dx, dy);
} else {
if (this._isHigherTile(tileId2) || $gameMap.regionId(mx, my) == $._cover_region_id) {
this._drawTile(upperLayer, tileId2, dx, dy);
} else {
this._drawTile(lowerLayer, tileId2, dx, dy);
}

if (this._isHigherTile(tileId3) || $gameMap.regionId(mx, my) == $._cover_region_id) {
this._drawTile(upperLayer, tileId3, dx, dy);
} else {
this._drawTile(lowerLayer, tileId3, dx, dy);
}
}
};

Tilemap.prototype._paintTiles = function(startX, startY, x, y) {
var tableEdgeVirtualId = 10000;
var mx = startX + x;
var my = startY + y;
var dx = (mx * this._tileWidth).mod(this._layerWidth);
var dy = (my * this._tileHeight).mod(this._layerHeight);
var lx = dx / this._tileWidth;
var ly = dy / this._tileHeight;
var tileId0 = this._readMapData(mx, my, 0);
var tileId1 = this._readMapData(mx, my, 1);
var tileId2 = this._readMapData(mx, my, 2);
var tileId3 = this._readMapData(mx, my, 3);
var shadowBits = this._readMapData(mx, my, 4);
var upperTileId1 = this._readMapData(mx, my - 1, 1);
var lowerTiles = [];
var upperTiles = [];

if (this._isHigherTile(tileId0) || $gameMap.regionId(mx, my) == $._cover_region_id) {
upperTiles.push(tileId0);
} else {
lowerTiles.push(tileId0);
}
if (this._isHigherTile(tileId1) || $gameMap.regionId(mx, my) == $._cover_region_id) {
upperTiles.push(tileId1);
} else {
lowerTiles.push(tileId1);
}

lowerTiles.push(-shadowBits);

if (this._isTableTile(upperTileId1) && !this._isTableTile(tileId1)) {
if (!Tilemap.isShadowingTile(tileId0)) {
lowerTiles.push(tableEdgeVirtualId + upperTileId1);
}
}

if (this._isOverpassPosition(mx, my)) {
upperTiles.push(tileId2);
upperTiles.push(tileId3);
} else {
if (this._isHigherTile(tileId2) || $gameMap.regionId(mx, my) == $._cover_region_id) {
upperTiles.push(tileId2);
} else {
lowerTiles.push(tileId2);
}
if (this._isHigherTile(tileId3) || $gameMap.regionId(mx, my) == $._cover_region_id) {
upperTiles.push(tileId3);
} else {
lowerTiles.push(tileId3);
}
}

var lastLowerTiles = this._readLastTiles(0, lx, ly);
if (!lowerTiles.equals(lastLowerTiles) ||
(Tilemap.isTileA1(tileId0) && this._frameUpdated)) {
this._lowerBitmap.clearRect(dx, dy, this._tileWidth, this._tileHeight);
for (var i = 0; i < lowerTiles.length; i++) {
var lowerTileId = lowerTiles;
if (lowerTileId < 0) {
this._drawShadow(this._lowerBitmap, shadowBits, dx, dy);
} else if (lowerTileId >= tableEdgeVirtualId) {
this._drawTableEdge(this._lowerBitmap, upperTileId1, dx, dy);
} else {
this._drawTile(this._lowerBitmap, lowerTileId, dx, dy);
}
}
this._writeLastTiles(0, lx, ly, lowerTiles);
}

var lastUpperTiles = this._readLastTiles(1, lx, ly);
if (!upperTiles.equals(lastUpperTiles)) {
this._upperBitmap.clearRect(dx, dy, this._tileWidth, this._tileHeight);
for (var j = 0; j < upperTiles.length; j++) {
this._drawTile(this._upperBitmap, upperTiles[j], dx, dy);
}
this._writeLastTiles(1, lx, ly, upperTiles);
}
};

// ===End Alias Game_Map===
})(CS_CoverTiles);

Credits

  • CityShrimp
Notes and Limitations
  • Weird stuff happens when you using mouse and character tries to run off screen. This causes the x, y coordinates to screw up and the covers won't work properly anymore.

Features Mentioned

  • Create cover tiles that are passable and drawn above events.
  • Create block tiles that are always impassable
  • Change Log
  • 1.0.2
  • Fixed bug where Tiles B-E do not show up when a tile is marked as a cover tile
  • Added a "Pass" tile. Does not change the appearance of a tile, just allows players to pass through.
  • 1.0.1
  • Fixed bug where cover tiles are not in right layer after loading game.
  • Added support for non-WebGl graphics (never tested!)

Downloads / Referenced Files

Log in to download

Log in, then follow the RPG Maker Developers Group to see these download links.

Log in to download

License / Terms Note

Free for commercial and non commercial use. Features Create cover tiles that are passable and drawn above events. Create block tiles that are always impassable

Creator Claims / Removal

If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.

#039#rmmv#plugin-archive

Replies (0)

No replies yet.

0 replies 1 view

Log in to reply.

User Avatar