0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【RPGツクールMV/RPGツクールMZ】マップのメモ欄を使った判定

Posted at

RPGツクールMVではmeta."文字列"で判定可能。
私がプラグイン改造で実装した例を掲載します。

GALV_BasicEventShadows.js
https://galvs-scripts.com/2016/04/07/mv-basic-event-shadows/

例.マップのメモ欄にを含む場合にプレイヤーの影を生成しない
$dataMap.meta.文字列で判定

  Spriteset_Map.prototype.doActorShadows = function () {
    if ($gameSystem._playerShadow) {
      // add
      var fols = $gamePlayer.followers()._data;
      for (var i = 0; i < fols.length; i++) {
        fols[i]._shadow = true;
        this.createBShadow("f" + i + 1, fols[i]);
      }
      $gamePlayer._shadow = true;
      //マップメモ欄に<noShadow>が含まれている場合プレイヤーの影を消す(returnで処理を中断し生成しない)
      if ($dataMap.meta.noShadow) {
        return;
      }
      this.createBShadow("f0", $gamePlayer);
    } else {
      // Remove
      var fols = $gamePlayer.followers()._data;
      for (var i = 0; i < fols.length; i++) {
        fols[i]._shadow = false;
        this.destroyBShadow("f" + i + 1, fols[i]);
      }
      $gamePlayer._shadow = false;
      this.destroyBShadow("f0", $gamePlayer);
    }
  };

BattleVoice.js
https://plugin.fungamemake.com/archives/2606

例.戦闘中かつメモ欄にが含まれるスキルを使用した場合、ボイスSEを演奏しない。
BattleManager._action.item().meta文字列で判定


  var playActorVoice = function (actor, type) {
    if (!canPlayActorVoice()) {
      return;
    }
    //改変箇所。戦闘中かつメモ欄に<invalidVoice>が含まれるスキルを使用した場合、演奏しない。
    if (BattleManager._action.item().meta.invalidVoice) {
      return;
    }

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?