Inputextra
//=============================================================================
// InputExtra.js
//=============================================================================

/*:
 * @plugindesc Extend Input with the full keyboard.
 * @author taroxd
 *
 * @help
 *
 * API:
 *   InputExtra.isPressed(keyCode)
 *   InputExtra.isTriggered(keyCode)
 *   InputExtra.isRepeated(keyCode)
 *   InputExtra.isLongPressed(keyCode)
 *
 *   `InputExtra' is basically the same as `Input'
 *   except that it accepts the keyCode as a parameter.
 */

window.InputExtra = function() {

    var states = {};

    function appendToInput(name, func) {
        var old = Input[name];
        Input[name] = function() {
            old.apply(Input, arguments);
            func.apply(null, arguments);
        }
    }

    function onKeyDown(event) {
        var keyCode = event.keyCode;
        if(!states[keyCode]) {
            states[keyCode] = 0;
        }
    }

    function onKeyUp(event) {
        var keyCode = event.keyCode;
        if (keyCode) {
            delete states[keyCode];
        }
    }

    function clear() {
        states = {};
    }

    function update() {
        for (var code in states) {
            ++states[code];
        }
    }

    appendToInput('_onKeyDown', onKeyDown);
    appendToInput('_onKeyUp', onKeyUp);
    appendToInput('_onLostFocus', clear);

    appendToInput('update', update);
    appendToInput('clear', clear);

    return {
        isPressed: function(keyCode) {
            return states[keyCode] != null;
        },

        isTriggered: function(keyCode) {
            return states[keyCode] === 1;
        },

        isRepeated: function(keyCode) {
            var state = states[keyCode];
            return (state === 1 ||
                (state >= Input.keyRepeatWait &&
                state % Input.keyRepeatInterval === 0));
        },

        isLongPressed: function(keyCode) {
            return states[keyCode] >= Input.keyRepeatWait;
        }
    };

}();

Displaypassage
//=============================================================================
// PassageExtra.js
//=============================================================================

/*:
 * @plugindesc Display passage information in playtest.
 * @author taroxd
 *
 * @param Opacity
 * @desc No description.
 * @type number
 * @max 255
 * @min 0
 * @default 150
 *
 * @param NG Color
 * @desc The color displayed above inpassable tiles.
 * @default #ff0000
 *
 * @param OK Color
 * @desc The color displayed above passable tiles.
 * @default #0000ff
 *
 * @param NG Width
 * @desc No description.
 * @type number
 * @max 24
 * @min 0
 * @default 4
 *
 * @param Only Test
 * @desc Enable only in playtest.
 * @type Boolean
 * @default true
 *
 * @help This plugin does not provide plugin commands.
 *
 * Press Ctrl Key to display passage information.
 */

void function() {

    var parameters = PluginManager.parameters('DisplayPassage');

    var TEST_ONLY = parameters['Test Only'] !== 'false';
    var enable = !TEST_ONLY || location.search === '?test';

    if (!enable) return;

    var OPACITY = parseInt(parameters['Opacity']);
    var NG_COLOR = parameters['NG Color'];
    var OK_COLOR = parameters['OK Color'];
    var NG_WIDTH = parseInt(parameters['NG Width']);

    // Advanced options:
    // Never change it unless you know what you are doing.

    var Z = 20;

    function shouldChangeVisibility() {
        return Input.isTriggered('control');
    }

    function PassageSprite() {
        TilingSprite.call(this);
        this.visible = false;
        this.move(0, 0, Graphics.width, Graphics.height);
        this.z = Z;
        this.opacity = OPACITY;
        this.refresh();
    }

    PassageSprite.prototype = Object.create(TilingSprite.prototype);
    PassageSprite.prototype.constructor = PassageSprite;

    PassageSprite.prototype.update = function() {
        if (shouldChangeVisibility()) {
            this.visible = !this.visible;
        }

        this.origin.x = $gameMap.displayX() * $gameMap.tileWidth();
        this.origin.y = $gameMap.displayY() * $gameMap.tileHeight();
    };

    PassageSprite.prototype.refresh = function() {
        var w = $gameMap.width();
        var h = $gameMap.height();
        this.bitmap = new Bitmap(
            w * $gameMap.tileWidth(),
            h * $gameMap.tileHeight());

        for (var x = 0; x < w; ++x) {
            for (var y = 0; y < h; ++y) {
                this.drawPoint(x, y);
            }
        }
    };

    PassageSprite.prototype.drawPoint = function(x, y) {
        var ngDirs = [2, 4, 6, 8].filter(function(d) {
            return !$gameMap.isPassable(x, y, d);
        });

        var bitmap = this.bitmap;
        var tw = $gameMap.tileWidth();
        var th = $gameMap.tileHeight();

        if (ngDirs.length === 4) {
            bitmap.fillRect(x * tw, y * th, tw, th, NG_COLOR);
            return;
        }

        bitmap.fillRect(x * tw, y * th, tw, th, OK_COLOR);

        ngDirs.forEach(function(d) {
            var dx = d === 6 ? tw - NG_WIDTH : 0;
            var dy = d === 2 ? th - NG_WIDTH : 0;
            var w, h;
            if (d === 2 || d === 8) {
                w = tw;
                h = NG_WIDTH;
            } else {
                w = NG_WIDTH;
                h = tw;
            }
            bitmap.fillRect(x * tw + dx, y * th + dy, w, h, NG_COLOR);
        });
    };

    var ct = Spriteset_Map.prototype.createTilemap;
    Spriteset_Map.prototype.createTilemap = function() {
        ct.call(this);
        this._tilemap.addChild(new PassageSprite);
    };
}();

固定远景
# @taroxd metadata 1.0
# @require taroxd_core
# @display 固定远景
# @id zero_parallax
module Taroxd
  # 判断是否固定远景图
  ZeroParallax =
    proc { true }                          # 永远固定
    # -> name { name.start_with? '!' }     # 文件名以 ! 开头时固定
end

class Game_Map

  def_chain :parallax_ox do |old, bitmap|
    @parallax_zero ? @parallax_x * 32 : old.call(bitmap)
  end

  def_chain :parallax_oy do |old, bitmap|
    @parallax_zero ? @parallax_y * 32 : old.call(bitmap)
  end

  def update_parallax_zero(*)
    @parallax_zero = Taroxd::ZeroParallax.call(@parallax_name)
  end

  def_after :change_parallax, :update_parallax_zero
  def_after :setup_parallax, :update_parallax_zero
end