当サイトの運営者です。ゲーム制作とプラグイン開発が好きで、コミュニティに貢献したいと考えています。
RPGツクールMZでゲームを制作中です。
※プログラマ・エンジニアではありません。
MPP ミニマップ - MPP_MiniMap.js

▼MPP ミニマップ(木星ペンギン様作) - MPP_MiniMap.js
https://plugin.fungamemake.com/archives/2234
ミニマップを画面に表示します。
ふりがな:みにまっぷひょうじ
機能概要: ミニマップを画面に表示します。
利用規約(ライセンス): MITライセンス
作者:木星ペンギン
作者サイト:https://woodpenguin.web.fc2.com/MV_Plugin/index.html
解説ページ:https://woodpenguin.web.fc2.com/MV_Plugin/MiniMap.html
ファイル名:MPP_MiniMap.js
プラグインのヘルプ:
/*:
* @plugindesc 【ver.3.2】ミニマップを画面に表示させます。
* @author 木星ペンギン
* @help []内は表記しなくても動作します。
* プラグインコマンド:
* MiniMap n # ミニマップの表示
* ChangeMinimap mapId # 指定したマップIDのミニマップに変更
* SetMinimapZoom zoom # ミニマップの拡大率のみ変更
* SetMinimapFrame n # ミニマップの上にフレーム画像を表示
*
* Marking n mapId Ev id Cir r c # イベントを中心に円形のマーキング
* Marking n mapId Pos x y Cir r c # 座標を中心に円形のマーキングを表示
* Marking n mapId Pos x y Rec w h c # 四角形のマーキングを表示
* Marking n mapId Ev id Ico m # イベントの位置にマーカーアイコンを表示
* Marking n mapId Pos x y Ico m # 座標(x,y)にマーカーアイコンを表示
* DeleteMarking n # マーキング番号 n を削除
*
* HighlightMarking n[ bool] # マーキング番号 n を強調表示
* HighlightEvMarker id[ bool] # イベントのマーカーアイコンを強調表示
*
* マップのメモ:
* <Minimap:name> # このマップのミニマップ画像のファイル名
* <MinimapZoom:n> # このマップのミニマップ拡大率
*
* イベントのメモ:
* <Marker:n> # このイベントのマーカーアイコン番号
*
* ================================================================
* ▼ プラグインコマンド 詳細
* --------------------------------
* 〇 プラグインコマンド全般
* 指定する値には変数が使用できます。
* v[n] と記述することでn番の変数の値を参照します。
*
* ※ マーキング番号
* マーキング番号は任意の数値を指定してください。
* ピクチャの番号と同じで、同じ番号を使うと上書きされます。
*
* ※ 色番号
* 色番号はプラグインパラメータ[Marking Colors]で設定した色の番号を
* 指定してください。
*
* --------------------------------
* 〇 MiniMap n
* n : 呼び出すデータの番号
*
* ミニマップの表示位置や表示内容を変更します。
* プラグインパラメータ[Minimap Data]にてあらかじめ設定しておいたデータを
* 呼び出します。
* 0 を指定した場合、非表示となります。
*
* --------------------------------
* 〇 ChangeMinimap mapId
* mapId : 表示するマップID
*
* ミニマップを指定したマップのものに切り替えます。
* mapId に 0 を指定した場合、現在プレイヤーのいるマップとなります。
*
* 現在のマップとは違うマップを表示した場合、マーキングは表示されますが、
* イベントのマーカーアイコンは表示されません。
* 乗り物のマーカーアイコンは表示されます。
*
* --------------------------------
* 〇 SetMinimapFrame n
* n : フレーム画像の番号
*
* ミニマップの上に画像を重ねて表示する機能です。
* ミニマップのサイズに合わせてサイズを変更する機能はありません。
* 使用する画像は img/pictures フォルダ内に入れてください。
*
* ここで使用する画像はプラグインパラメータ[Frame Images]に設定し、
* その番号を指定することで画像を表示させることができます。
* 0 を指定した場合、非表示となります。
*
* --------------------------------
* 〇 Marking n mapId Ev id Cir r c1
* n : マーキング番号 (任意の数値)
* mapId : マーキングするマップID (0で現在のマップ)
* id : イベントID
* r : 半径 (タイル)
* c : 色番号
*
* 指定したイベントを中心とした円形のマーキングをミニマップ上に表示します。
* Ev と Cir は変更する必要ありません。
*
* 例: Marking 1 0 Ev 5 Cir 3 1
* マーキング番号 : 1
* マップID : 現在のマップ
* イベントID : 5
* 半径 : 3タイル
* 色番号 : 1
*
* --------------------------------
* 〇 Marking n mapId Pos x y Cir r c
* n : マーキング番号 (任意の数値)
* mapId : マーキングするマップID (0で現在のマップ)
* x,y : 中心となる座標(x,y)
* r : 半径 (タイル)
* c : 色番号
*
* 指定した座標(x,y)を中心とした円形のマーキングをミニマップ上に表示します。
* Pos と Cir は変更する必要ありません。
*
* 例: Marking 1 0 Pos 13 9 Cir 3 1
* マーキング番号 : 1
* マップID : 現在のマップ
* 中心座標 : X 13, Y 9
* 半径 : 3タイル
* 色番号 : 1
*
* --------------------------------
* 〇 Marking n mapId Pos x y Rec w h c
* n : マーキング番号 (任意の数値)
* mapId : マーキングするマップID (0で現在のマップ)
* x,y,w,h : 表示する座標(x,y)とサイズ(幅,高さ)
* c : 色番号
*
* 指定した四角形(x,y,w,h)のマーキングをミニマップ上に表示します。
* Pos と Rec は変更する必要ありません。
*
* --------------------------------
* 〇 Marking n mapId Ev id Ico m
* n : マーキング番号 (任意の数値)
* mapId : マーキングするマップID (0で現在のマップ)
* id : イベントID
* m : マーカーアイコン番号
*
* ミニマップ上の指定したイベントの位置にマーカーアイコンを表示します。
* Ev と Ico は変更する必要ありません。
*
* マーカーアイコン番号については後述。
*
* 例: Marking 1 0 Ev 5 Ico 4
* マーキング番号 : 1
* マップID : 現在のマップ
* イベントID : 5
* アイコン番号 : 4
*
* --------------------------------
* 〇 Marking n mapId Pos x y Ico m
* n : マーキング番号 (任意の数値)
* mapId : マーキングするマップID (0で現在のマップ)
* x,y : 表示する座標(x,y)
* m : マーカーアイコン番号
*
* ミニマップ上の指定した座標(x,y)にマーカーアイコンを表示します。
* Pos と Ico は変更する必要ありません
*
* マーカーアイコン番号については後述。
*
* --------------------------------
* 〇 HighlightMarking n[ bool]
* n : マーキング番号
* bool : 強調表示するかどうか(true/false/未設定はtrue)
*
* ミニマップの表示範囲に入っていなくても、ミニマップの隅にマーカーアイコンが
* 表示されるようになります。
* 強調表示できるのはマーカーアイコンのみです。
*
* bool に true を入れると強調表示され、falseを入れると強調表示が解除されます。
* 未設定の場合は true となります。
*
* --------------------------------
* 〇 HighlightEvMarker id[ bool]
* id : イベントID
* bool : 強調表示するかどうか(true/false/未設定はtrue)
*
* 同上。
* 現在のマップのイベントのみに対応しています。
*
* イベントコマンドの[場所移動]でマップを切り替えると
* 強調表示の有効フラグはリセットされます。
*
*
* ================================================================
* ▼ マップのメモ 詳細
* --------------------------------
* 〇 <Minimap:name>
* このマップのミニマップ画像を指定したファイル名の画像にします。
* 未設定の場合は自動生成されます。
*
* ミニマップ画像は img/system フォルダ内に入れてください。
*
*
* ================================================================
* ▼ イベントのメモ 詳細
* --------------------------------
* 〇 <Marker:n>
* このイベントの位置にマーカーアイコンを表示します。
* nでマーカーアイコン番号を指定します。
*
* マーカーアイコン番号については後述。
*
* このマーカーアイコンは以下の条件のうちどれか一つでも満たしている場合
* 表示されません。
* ・イベントの[出現条件]が満たされていない場合
* ・[イベントの一時消去]によって消去されている場合
* ・透明化がONになっている場合
*
*
* ================================================================
* ▼ プラグインパラメータ 詳細
* --------------------------------
* 〇 範囲指定について
* プラグインパラメータ[Map IDs][Wall Region IDs][Floor Region IDs]では
* 範囲指定が使用できます。
*
* n-m と表記することで、nからmまでの数値を指定できます。
* (例 : 1-4,8,10-12 => 1,2,3,4,8,10,11,12)
*
* --------------------------------
* 〇 Minimap Z
* ミニマップのZ座標を設定できます。
*
* 0 : キャラクターや天候、画面の色調変更より上、ピクチャより下
* 1 : ピクチャより上、タイマーより下
* 2 : タイマーより上、画面暗転より下
* 3 : 画面のフラッシュより上
* 4 : 全スプライトより上
*
* --------------------------------
* 〇 Player Highlight?
* プレイヤーのマーカーアイコンを強調表示するかどうかを設定します。
* [強調表示したマーカーアイコンの拡大率]は適用されません。
*
* 基本的にプレイヤーがミニマップの外に出ることはありませんが、
* 画面のスクロールやオプション2を使用した場合に効果があります。
*
* --------------------------------
* 〇 Vehicle Highlight?
* 乗り物のマーカーアイコンを強調表示するかどうかを設定します。
* [強調表示したマーカーアイコンの拡大率]は適用されません。
*
* --------------------------------
* 〇 Plugin Commands / Map Metadata / Event Metadata
*
* プラグインコマンド名やメモ欄で使用するコマンド名を変更できます。
* コマンドを短くしたり日本語化等が可能です。
*
* プラグインコマンドのみ、コマンド名を変更しても
* デフォルトのコマンドは使用できます。
*
*
* ================================================================
* ▼ その他
* --------------------------------
* 〇 マーカーアイコン
* マーカーアイコンを表示するにはマーカーアイコン画像が必要です。
* MinimapMarkerSet という画像ファイルを img/system フォルダ内に
* 入れてください。
*
* マーカーアイコン画像は横方向に8個並べたものを1ブロックとし、
* そのブロックを必要なだけ縦に長くしたものです。
* 画像の幅を8で割ったものが、マーカーアイコン1個の幅と高さになります。
*
* サンプル画像(フリー素材)はダウンロードページにあります。
*
* マーカーアイコン番号は通常のアイコンと同じで、
* 一番左上を0とし右に向かって 1,2,3... となります。
*
* --------------------------------
* 〇 イベントコマンド[タイルセットの変更]
* 本プラグインはイベントコマンドの[タイルセットの変更]には対応していません。
* マップ画像はシーン切り替え時に生成され、途中で変更されることはありません。
*
* ================================
* 制作 : 木星ペンギン
* URL : http://woodpenguin.blog.fc2.com/
*
* @param === Basic ===
* @default === 基本的な設定 ===
*
* @param Map IDs
* @desc ミニマップを表示するマップIDの配列
* (範囲指定可)
* @default 1-5
* @parent === Basic ===
*
* @param Minimap Data
* @type struct<MinimapData>[]
* @desc ミニマップ表示位置の配列
* @default [”{”x”:”32”,”y”:”32”,”width”:”160”,”height”:”128”,”type”:”1”,”opacity”:”192”,”zoom”:”1.0”}”,”{”x”:”0”,”y”:”0”,”width”:”816”,”height”:”624”,”type”:”0”,”opacity”:”192”,”zoom”:”1.0”}”,”{”x”:”32”,”y”:”32”,”width”:”160”,”height”:”128”,”type”:”0”,”opacity”:”192”,”zoom”:”1.0”}”]
* @parent === Basic ===
*
* @param Default Data Index
* @type number
* @desc ミニマップ表示位置のデフォルト値
* @default 1
* @parent === Basic ===
*
* @param Minimap Z
* @type number
* @max 4
* @desc ミニマップのZ座標(詳細はヘルプ参照)
* @default 0
* @parent === Basic ===
*
* @param Frame Images
* @type file[]
* @desc フレーム画像
* @default []
* @require 1
* @dir img/pictures/
* @parent === Basic ===
*
* @param Default Frame Index
* @type number
* @desc フレーム画像番号のデフォルト値
* @default 0
* @parent === Basic ===
*
*
* @param === Advanced ===
* @default === 細かな設定 ===
*
* @param Update Count
* @type number
* @desc 更新頻度
* @default 80
* @parent === Advanced ===
*
* @param Blink Duration
* @type number
* @desc 点滅時間
* (0で点滅なし)
* @default 80
* @parent === Advanced ===
*
* @param Scroll Map Link?
* @type boolean
* @desc [マップのスクロール]を実行した際、ミニマップもスクロールさせるかどうか
* @default false
* @parent === Advanced ===
*
*
* @param === Marker ===
* @default === マーカー/マーキング ===
*
* @param Player Marker _v3
* @type struct<Marker>
* @desc プレイヤーのマーカーアイコン
* @default {”Icon Index”:”1”,”oy”:”0.5”,”turn?”:”false”}
* @parent === Marker ===
*
* @param Vehicle On Marker _v3
* @type struct<Marker>
* @desc 乗り物搭乗時のマーカーアイコン
* @default {”Icon Index”:”7”,”oy”:”0.5”,”turn?”:”true”}
* @parent === Marker ===
*
* @param Player Highlight?
* @type boolean
* @desc プレイヤーのマーカーアイコンを強調表示するかどうか
* @default true
* @parent === Marker ===
*
* @param Vehicle Off Markers _v3
* @type struct<Vehicle>
* @desc 非搭乗時の乗り物のマーカーアイコン番号
* @default {”boat”:”2”,”ship”:”2”,”airship”:”2”}
* @parent === Marker ===
*
* @param Marking Colors
* @type string[]
* @desc マーキングの色番号の配列
* @default [”255,255,255,1.0”,”32,160,214,1.0”,”32,160,214,1.0”,”255,120,76,1.0”,”102,204,64,1.0”,”153,204,255,1.0”,”204,192,255,1.0”,”255,255,160,1.0”,”128,128,128,1.0”]
* @parent === Marker ===
*
* @param Highlight Marker Blink?
* @type boolean
* @desc 強調表示したマーカーアイコンを点滅させるかどうか
* @default false
* @parent === Marker ===
*
* @param Highlight Marker Scale
* @desc 強調表示したマーカーアイコンの拡大率
* @default 1.5
* @parent === Marker ===
*
*
* @param === Auto Generate ===
* @default === マップの自動生成 ===
*
* @param Tile Size
* @type number
* @desc 1タイルの大きさ
* @default 4
* @parent === Auto Generate ===
*
* @param Blur Intensity
* @type number
* @desc ぼかし処理の強さ
* @default 2
* @parent === Auto Generate ===
*
*
* @param ▽ Field Type ▽
* @default ▽ モード:フィールドタイプ ▽
* @parent === Auto Generate ===
*
* @param Land Color
* @desc 陸地の色
* @default 224,224,224,1.0
* @parent ▽ Field Type ▽
*
* @param Sea Color
* @desc 深海の色
* @default 0,0,0,0.5
* @parent ▽ Field Type ▽
*
* @param Ford Color
* @desc 浅瀬・沼の色
* @default 64,64,64,0.75
* @parent ▽ Field Type ▽
*
* @param Mountain Color
* @desc 山の色
* @default 128,128,128,1.0
* @parent ▽ Field Type ▽
*
* @param Hill Color
* @desc 丘の色
* @default 160,160,160,1.0
* @parent ▽ Field Type ▽
*
* @param Forest Color
* @desc 森の色
* @default 192,192,192,1.0
* @parent ▽ Field Type ▽
*
*
* @param ▽ Area Type ▽
* @default ▽ モード:エリアタイプ ▽
* @parent === Auto Generate ===
*
* @param River Color
* @desc 水辺(通行不可)の色
* @default 128,128,128,0.5
* @parent ▽ Area Type ▽
*
* @param Shallow Color
* @desc 水辺(通行可能)の色
* @default 160,160,160,0.75
* @parent ▽ Area Type ▽
*
* @param Ladder Color
* @desc 梯子の色
* @default 160,160,160,1.0
* @parent ▽ Area Type ▽
*
* @param Bush Color
* @desc 茂みの色
* @default 192,192,192,1.0
* @parent ▽ Area Type ▽
*
* @param Counter Color
* @desc カウンターの色
* @default 160,160,160,0.5
* @parent ▽ Area Type ▽
*
* @param Wall Color
* @desc 通行不可タイルの色
* @default 64,64,64,0.25
* @parent ▽ Area Type ▽
*
* @param Floor Color
* @desc 通行可能タイルの色
* @default 224,224,224,1.0
* @parent ▽ Area Type ▽
*
* @param Wall Region IDs
* @desc 通行不可として表示するリージョンIDの配列
* (範囲指定可)
* @default 63
* @parent ▽ Area Type ▽
*
* @param Floor Region IDs
* @desc 通行可能として表示するリージョンIDの配列
* (範囲指定可)
* @default
* @parent ▽ Area Type ▽
*
* @param Dir4 Wall Width
* @type number
* @desc 通行(4方向)の壁の幅
* @default 2
* @parent ▽ Area Type ▽
*
*
* @param === Command ===
* @default === コマンド関連 ===
*
* @param Plugin Commands
* @type struct<Plugin>
* @desc プラグインコマンド名
* @default {”MiniMap”:”MiniMap”,”ChangeMinimap”:”ChangeMinimap”,”SetMinimapZoom”:”SetMinimapZoom”,”SetMinimapFrame”:”SetMinimapFrame”,”Marking”:”Marking”,”DeleteMarking”:”DeleteMarking”,”HighlightMarking”:”HighlightMarking”,”HighlightEvMarker”:”HighlightEvMarker”}
* @parent === Command ===
*
* @param Map Metadata
* @type struct<MapMeta>
* @desc マップメモ欄のデータ名
* @default {”MiniMap”:”MiniMap”,”MinimapZoom”:”MinimapZoom”}
* @parent === Command ===
*
* @param Event Metadata
* @type struct<EventMeta>
* @desc イベントメモ欄のデータ名
* @default {”Marker”:”Marker”}
* @parent === Command ===
*
*
* @requiredAssets img/system/MinimapMarkerSet
*
* @noteParam Minimap
* @noteRequire 1
* @noteDir img/system/
* @noteType file
* @noteData maps
*
*/
/*~struct~MinimapData:
* @param x
* @type number
* @desc X座標
* @default 32
*
* @param y
* @type number
* @desc Y座標
* @default 32
*
* @param width
* @type number
* @min 1
* @desc 幅
* @default 160
*
* @param height
* @type number
* @min 1
* @desc 高さ
* @default 128
*
* @param type
* @type number
* @max 2
* @desc 表示タイプ
* 0:全体, 1:周辺(ループ適用), 2:周辺(ループなし)
* @default 1
*
* @param opacity
* @type number
* @max 255
* @desc 不透明度
* @default 192
*
* @param zoom
* @desc 拡大率
* @default 1.0
*
*/
/*~struct~Marker:
* @param Icon Index
* @type number
* @desc アイコン番号
* @default 1
*
* @param oy
* @desc Y軸の原点座標
* @default 0.5
*
* @param turn?
* @type boolean
* @desc 向きに合わせて画像を回転させるかどうか
* @default false
*
*/
/*~struct~Vehicle:
* @param boat
* @type number
* @desc 小型船
* @default 2
*
* @param ship
* @type number
* @desc 大型船
* @default 2
*
* @param airship
* @type number
* @desc 飛行船
* @default 2
*
*/
/*~struct~Plugin:
* @param MiniMap
* @desc ミニマップの表示
* @default MiniMap
*
* @param ChangeMinimap
* @desc 指定したマップIDのミニマップに変更
* @default ChangeMinimap
*
* @param SetMinimapZoom
* @desc ミニマップの拡大率のみ変更
* @default SetMinimapZoom
*
* @param SetMinimapFrame
* @desc ミニマップの上にフレーム画像を表示
* @default SetMinimapFrame
*
*
* @param Marking
* @desc マーキングを表示
* @default Marking
*
* @param DeleteMarking
* @desc マーキング番号 n を削除
* @default DeleteMarking
*
*
* @param HighlightMarking
* @desc マーキング番号 n を強調表示
* @default HighlightMarking
*
* @param HighlightEvMarker
* @desc イベントのマーカーアイコンを強調表示
* @default HighlightEvMarker
*
*/
/*~struct~MapMeta:
* @param MiniMap
* @desc このマップのミニマップ画像のファイル名
* @default MiniMap
*
* @param MinimapZoom
* @desc このマップのミニマップ拡大率
* @default MinimapZoom
*
*/
/*~struct~EventMeta:
* @param Marker
* @desc ミニマップに表示するこのイベントのマーカー番号
* @default Marker
*/