MPP カーソル操作 - MPP_MiniMap_OP2.js

シェア用テキスト:
▼MPP カーソル操作(木星ペンギン様作) - MPP_MiniMap_OP2.js
https://plugin.fungamemake.com/archives/2236
ミニマップ上にカーソルを表示させ、操作する機能を付けます。

ふりがな:かーそるそうさ

機能概要: ミニマップ上にカーソルを表示させ、操作する機能を付けます。

利用規約(ライセンス): MITライセンス

作者:木星ペンギン

作者サイト:http://woodpenguin.blog.fc2.com/

ダウンロードページ:http://woodpenguin.web.fc2.com/MV_Plugin/minimap_OP2.ht…

ファイル名:MPP_MiniMap_OP2.js

プラグインのヘルプ:

/*:
 * @plugindesc 【ver.2.1】ミニマップ上にカーソルを表示させ、操作する機能を付けます。
 * @author 木星ペンギン
 * 
 * @help プラグインコマンド:
 *   StartMinimapSelect           # ミニマップの操作開始
 *   ResetMinimapPos              # ミニマップの表示位置をプレイヤーに戻す
 * 
 * スクリプト全般:
 *   $gameMinimap.result          # 操作中断時の返り値
 *   $gameMinimap.mapId           # ミニマップに表示中のマップID
 *   $gameMinimap.cursorX         # カーソル位置のマップX座標
 *   $gameMinimap.cursorY         # カーソル位置のマップY座標
 *   $gameMinimap.minimapEv       # カーソル位置のイベントID
 *   $gameMinimap.minimapVh       # カーソル位置の乗り物番号
 * 
 * イベントメモ欄:
 *   <Transfer>                   # マップの切り替え
 * 
 * ================================================================
 * ▼ プラグインコマンド 詳細
 * --------------------------------
 *  〇 StartMinimapSelect
 *   このプラグインコマンドを実行した時点で、ミニマップ上のプレイヤーの位置に
 *   カーソルが表示され、カーソル操作を開始します。
 *   ミニマップ上にプレイヤーがいない場合、ミニマップ中心位置に表示されます。
 *   
 *   操作以外のキーが入力された時点でミニマップの操作を中断します。
 *   中断する際、$gameMinimap.result に入力されたボタンの値が
 *   入れられます。(詳細は後述)
 *   
 * 
 * ================================================================
 * ▼ スクリプト全般 詳細
 * --------------------------------
 *  〇 $gameMinimap.result
 *   カーソル操作を中断した際に、入力されたボタンの値が入れられます。
 *   入れられる値は以下のようになっています。
 *     0 : 決定(ダブルタップ)
 *     1 : キャンセル(二本指タップ / ミニマップの外側をタップ)
 *     2 : シフト
 *     3 : 前ページ / ホイールアップ
 *     4 : 次ページ / ホイールダウン
 * 
 * --------------------------------
 *  〇 $gameMinimap.minimapEv
 *   カーソルをイベントに合わせている際、そのイベントのIDを取得できます。
 *   プレイヤーにカーソルを合わせている場合は0、それ以外の場合は-1となります。
 *  
 * --------------------------------
 *  〇 $gameMinimap.minimapVh
 *   カーソルを乗り物に合わせている際、その乗り物の番号を取得できます。
 *   小型船は0、大型船は1、飛行船は2、それ以外は-1となります。
 *  
 *  
 * ================================================================
 * ▼ スクリプト全般 詳細
 * --------------------------------
 *  〇 <Transfer>
 *   このパラメータが設定されているイベントにカーソルを合わせて決定操作を行うと、
 *   ミニマップ画像が指定したマップに移動し、カーソルは指定した座標に移動します。
 *   移動先のマップと座標は、現在のページの実行内容にある一番最初の[場所移動]の値が
 *   適用されます。
 *   
 *   この機能は現在のマップでなくても有効です。
 *   このパラメータが設定されているイベントは、現在のマップでなくても
 *   マーカーアイコンが表示されるようになります。
 *   現在のマップでないイベントは、一番最初のページの[場所移動]の値が適用されます。
 * 
 * 
 * ================================================================
 * ▼ プラグインパラメータ 詳細
 * --------------------------------
 *  〇 Button Rollover?
 *   ボタン画像をタッチした際のロールオーバーの有効無効を設定します。
 *   
 *   有効にした場合、ボタン画像の画像の上半分がタッチしていない時、
 *   下半分がタッチした時に表示されます。
 *  
 * --------------------------------
 *  〇 Button Params
 *   表示するボタンの画像ファイル名、表示位置、返り値を設定できます。
 *   
 *   ボタンの画像ファイルは、img/system フォルダ内に入れてください。
 *   
 *   ボタンをタッチすると返り値を $gameMinimap.result に入れ、
 *   ミニマップの操作を一時中断します。
 * 
 * 
 * ================================================================
 * ▼ その他仕様について
 * --------------------------------
 *  〇 操作方法
 *   方向キーでカーソル移動とミニマップのスクロール、
 *   シフトキーを押しながらだと移動速度が変更されます。
 *   
 *   タッチ操作の場合、一度タッチするとカーソル移動、
 *   スワイプするとミニマップのスクロールを行います。
 *   
 *   対応したキーが入力されると、操作を一時中断してイベント処理が進行します。
 *  
 * --------------------------------
 *  〇 名前ウィンドウについて
 *   プラグインパラメータの[Event Name Popup?]を有効にすると、
 *   名前ウィンドウが表示されます。
 *   カーソルを合わせたキャラクターの名前が表示されます。
 *   
 *   名前には一部の制御文字が使用可能です。(V,N,P,G,C,\)
 *   名前が空白''またはデフォルトの名前'EV???'(?は数字)の場合は表示されません。
 *  
 * --------------------------------
 *  〇 カーソルの画像について
 *   カーソルの画像ファイルは、img/system フォルダ内に
 *    MinimapCursor.png という名前で入れてください。
 *    
 *   カーソルは画像の高さが幅となり、横に並べた分だけアニメーションを行います。
 *   アニメーションの速さはプラグインパラメータ[Cursor Anime Rate]で
 *   設定できます。
 * 
 * --------------------------------
 *  〇 矢印の画像について
 *   プラグインパラメータ[Scroll Arrow View?]を有効にすると、
 *   スクロール可能な方向に画像が表示されます。
 *   
 *   矢印の画像ファイルは、img/system フォルダ内に入れてください。
 *     下方向の矢印画像ファイル名 : MinimapDownArrow.png
 *     上方向の矢印画像ファイル名 : MinimapUpArrow.png
 *     左方向の矢印画像ファイル名 : MinimapLeftArrow.png
 *     右方向の矢印画像ファイル名 : MinimapRightArrow.png
 * 
 * 
 * ================================
 * 制作 : 木星ペンギン
 * URL : http://woodpenguin.blog.fc2.com/
 * 
 * @param === Basic ===
 * @default === 基本的な設定 ===
 * 
 * @param Cursor Anime Rate
 * @type number
 * @desc カーソルのアニメーション頻度
 * @default 30
 * @parent === Basic ===
 *
 * @param Cursor Speed
 * @type number
 * @desc カーソルの移動速度
 * @default 64
 * @parent === Basic ===
 *
 * @param Shift Dash Rate
 * @desc シフトボタンによる加速度
 * @default 2.0
 * @parent === Basic ===
 * 
 * @param Long Press Time
 * @type number
 * @desc 決定を取り消すまでの長押しの時間
 * @default 12
 * @parent === Basic ===
 * 
 * @param Double Tap Interval
 * @type number
 * @desc ダブルタップの間隔
 * @default 30
 * @parent === Basic ===
 * 
 * @param Scroll Arrow View?
 * @type boolean
 * @desc スクロール矢印を表示するかどうか?
 * @default true
 * @parent === Basic ===
 * 
 * @param Scroll Arrow Padding
 * @type number
 * @min -999
 * @desc スクロール矢印の表示位置補正
 * @default 0
 * @parent === Basic ===
 * 
 * 
 * @param === Name Window ===
 * @default === 名前ウィンドウ ===
 * 
 * @param Player Name
 * @desc プレイヤーにカーソルを合わせた際に標示する名前
 * @default プレイヤー
 * @parent === Name Window ===
 * 
 * @param Vehicle Names
 * @type string[]
 * @desc 乗り物にカーソルを合わせた際に標示する名前の配列
 * @default [”小型船”,”大型船”,”飛行船”]
 * @parent === Name Window ===
 * 
 * @param Event Name Popup?
 * @type boolean
 * @desc イベント名を表示するかどうか?
 * @default true
 * @parent === Name Window ===
 * 
 * @param Window Skin
 * @type file
 * @desc 使用するウィンドウスキン
 * @default Window
 * @require 1
 * @dir img/system/
 * @parent === Name Window ===
 * 
 * @param Window Background Type
 * @type number
 * @max 2
 * @desc ウィンドウの背景
 * (0:通常, 1:暗くする, 2:透明)
 * @default 1
 * @parent === Name Window ===
 * 
 * @param Window Tone
 * @desc ウィンドウカラー
 * @default 0,0,0
 * @parent === Name Window ===
 * 
 * @param Window Pos
 * @type number
 * @max 2
 * @desc ウィンドウの表示位置
 * (0:カーソルの上, 1:ミニマップ上部, 2:ミニマップ下部)
 * @default 0
 * @parent === Name Window ===
 * 
 * @param Window Oy
 * @type number
 * @min -999
 * @desc ウィンドウの表示位置のY軸補正値
 * @default -10
 * @parent === Name Window ===
 * 
 * @param Window Padding
 * @type number
 * @desc ウィンドウの枠と内容の余白
 * @default 8
 * @parent === Name Window ===
 * 
 * @param Default Font Size
 * @type number
 * @desc 文字サイズ
 * @default 20
 * @parent === Name Window ===
 * 
 * @param Default Font Color
 * @desc 文字色
 * @default 255,255,255
 * @parent === Name Window ===
 * 
 * 
 * @param === Button ===
 * @default === ボタン ===
 * 
 * @param Button Rollover?
 * @type boolean
 * @desc ボタンをタッチした際に画像を変えるかどうか?
 * @default false
 * @parent === Button ===
 * 
 * @param Button Params
 * @type struct<Button>[]
 * @desc 表示するボタン画像のパラメータの配列
 * @default []
 * @parent === Button ===
 *
 * 
 * @param === Process ===
 * @default === 簡易操作 ===
 * 
 * @param Install Marker Number
 * @type number
 * @desc 決定操作で設置するマーカーの番号
 * (0で無効化)
 * @default 0
 * @parent === Process ===
 * 
 * @param Install Marker Index
 * @type number
 * @desc 決定操作で設置するマーカーアイコン
 * @default 0
 * @parent Install Marker Number
 * 
 * @param Zoom with Pageup down?
 * @type boolean
 * @desc 前ページ・次ページ操作で拡大率の変更を行うかどうか
 * @default false
 * @parent === Process ===
 * 
 * @param Zoom Max
 * @desc 拡大率の最大値
 * @default 3.0
 * @parent Zoom with Pageup down?
 * 
 * @param Zoom Min
 * @desc 拡大率の最小値
 * @default 1.0
 * @parent Zoom with Pageup down?
 * 
 * 
 *
 *
 * @requiredAssets img/system/MinimapCursor
 * @requiredAssets img/system/MinimapDownArrow
 * @requiredAssets img/system/MinimapUpArrow
 * @requiredAssets img/system/MinimapLeftArrow
 * @requiredAssets img/system/MinimapRightArrow
 * 
 */

/*~struct~Button:
 * @param Name
 * @type file
 * @desc ボタンの画像ファイル名
 * @default 
 * @require 1
 * @dir img/system/
 *
 * @param X
 * @type number
 * @desc ボタンのX座標
 * @default 0
 * 
 * @param Y
 * @type number
 * @desc ボタンの表示位置(x,y)
 * @default 0
 * 
 * @param Result
 * @type number
 * @desc ボタンをタッチした際の返り値
 * @default 0
 * 
 */

/*~struct~SE:
 * @param name
 * @desc ファイル名
 * @default Decision1
 * @require 1
 * @dir audio/se
 * @type file
 *
 * @param volume
 * @type number
 * @max 100
 * @desc 音量
 * @default 90
 *
 * @param pitch
 * @type number
 * @min 50
 * @max 150
 * @desc ピッチ
 * @default 100
 *
 * @param pan
 * @type number
 * @min -100
 * @max 100
 * @desc 位相
 * @default 0
 *
 */

スポンサードリンク

スポンサードリンク

Copyright© #ツクプラ , 2024 All Rights Reserved.