MZ用プラグイン

MPP 選択肢拡張 - MPP_ChoiceEX_Op1.js

シェア用テキスト:
▼MPP 選択肢拡張(木星ペンギン様作) - MPP_ChoiceEX_Op1.js
https://plugin-mz.fungamemake.com/archives/7382
選択肢を追加していき、表示させる機能を追加します。

ふりがな:せんたくしかくちょう

機能概要: 選択肢を追加していき、表示させる機能を追加します。

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

作者:木星ペンギン

作者サイト:https://woodpenguin.web.fc2.com/

解説ページ:https://woodpenguin.web.fc2.com/MV_Plugin/ChoiceEX.html

ファイル名:MPP_ChoiceEX_Op1.js

プラグインのヘルプ:

/*:ja
 * @target MV MZ
 * @plugindesc 選択肢を追加していき、表示させる機能を追加します。
 * @author 木星ペンギン
 * @url 
 * 
 * @base MPP_ChoiceEX
 * @orderAfter MPP_ChoiceEX
 *
 * @help [version 1.0.2]
 * このプラグインはRPGツクールMVおよびMZ用です。
 * 
 * ▼ 概要
 *  - 選択肢の内容を一つずつ追加していき、まとめて表示することができます。
 *  - MPP_ChoiceEX.jsの機能はおおむね使用できます。
 *  - 追加していった選択肢はセーブデータに保存されます。
 * 
 * ▼ プラグインコマンド
 *  - MVでは数値を入力する項目で v[N] と記述することで変数N番を参照します。
 *  - MZでは数値を入力する項目で、テキストを選択して v[N] と記述することで
 *    変数N番を参照します。
 *  - 変数を使用する場合、そのコマンド実行時の値が適用されます。
 *  
 *  〇 MV / MZ
 *  
 *  〇 AddCustomChoice id text value  / 選択肢追加
 *       id    : 追加する配列のID(0以上の整数)
 *       text  : 選択肢テキスト
 *       value : 返り値
 *   - 配列に選択肢を追加します。
 *   - 配列のIDは任意の数値を指定してください。
 *   - 選択肢テキスト(text)には一部の制御文字や、MPP_ChoiceEX.jsの機能である
 *     if(条件) や en(条件) が使用できます。
 *   - 返り値はこの選択肢が選ばれたときに返す数値です。
 *   - MVでは仕様上、選択肢テキストにスペースを使用することはできません。
 *   - MVでテキストにスペースを使いたい場合は、以下のコード編集して
 *     スクリプトで実行してください。
 * ////////////////////////////////////////////////////////////////
 * const id = 0;
 * const choiceParams = {
 *     text: '',
 *     value: 0
 * };
 * $gameSystem.addCustomChoice(id, choiceParams);
 * ////////////////////////////////////////////////////////////////
 * 
 *  〇 ShowCustomChoices id vId back pos def cancel  / 選択肢表示
 *       id     : 表示する配列のID
 *       vId    : 返り値を入れる変数の番号
 *       back   : 背景(0:ウィンドウ, 1:暗くする, 2:透明 / 未設定:0)
 *       pos    : ウィンドウ位置(0:左, 1:中, 2:右 / 未設定:2)
 *       def    : デフォルト(-1:なし / 未設定:0)
 *       cancel : キャンセル(-2:分岐, -1:禁止 / 未設定:-2)
 *   - 選択肢を表示します。
 *   - 選ばれた選択肢の返り値が変数に入れられます。
 *   - 背景・ウィンドウ位置・デフォルト・キャンセルは通常の[選択肢の表示]と
 *     同じです。
 *   - キャンセル:分岐が選ばれた場合の返り値は-2です。
 *   - [文章の表示]の後に実行した場合、デフォルトの[選択肢の表示]と
 *     同じ処理をします。
 * 
 *  〇 DeleteCustomChoice id text  / 選択肢削除
 *       id    : 配列のID
 *       text  : 削除する選択肢テキスト
 *   - 配列からテキストが一致した選択肢を全て削除します。
 * 
 *  〇 ClearCustomChoices id  / 選択肢クリア
 *       id    : 全削除する配列のID
 *   - 配列を削除します。
 * 
 * ================================
 * Mail : wood_penguin@yahoo.co.jp (@は半角)
 * Blog : http://woodpenguin.blog.fc2.com/
 * License : MIT license
 *
 *  @command addCustomChoice
 *      @text 選択肢追加
 *      @desc 
 *      @arg id
 *          @desc 追加する配列のID
 *          表示や削除を行う際に使用します。
 *          @type number
 *              @min 0
 *              @max 99
 *          @default 0
 *      @arg choiceText
 *          @text 選択肢テキスト
 *          @desc 
 *          @default 
 *      @arg returnValue
 *          @text 返り値
 *          @desc この選択肢が選ばれた際に変数に入れる値
 *          @type number
 *              @min -999999
 *              @max 999999
 *          @default 0
 * 
 *  @command showCustomChoices
 *      @text 選択肢表示
 *      @desc 
 *      @arg id
 *          @desc 表示する選択肢のID
 *          @type number
 *              @min 0
 *              @max 99
 *          @default 0
 *      @arg variableId
 *          @text 変数
 *          @desc 返り値を入れる変数
 *          @type variable
 *          @default 0
 *      @arg background
 *          @text 背景
 *          @desc 
 *          @type select
 *              @option ウィンドウ
 *              @value 0
 *              @option 暗くする
 *              @value 1
 *              @option 透明
 *              @value 2
 *          @default 0
 *      @arg positionType
 *          @text ウィンドウ位置
 *          @desc 
 *          @type select
 *              @option 左
 *              @value 0
 *              @option 中
 *              @value 1
 *              @option 右
 *              @value 2
 *          @default 2
 *      @arg defaultType
 *          @text デフォルト
 *          @desc -1:なし
 *          @type number
 *              @min -1
 *              @max 999
 *          @default 0
 *      @arg cancelType
 *          @text キャンセル
 *          @desc -2:分岐, -1:禁止
 *          @type number
 *              @min -2
 *              @max 999
 *          @default -2
 * 
 *  @command deleteCustomChoice
 *      @text 選択肢削除
 *      @desc 配列から指定した選択肢を削除します。
 *      @arg id
 *          @desc 削除する配列のID
 *          @type number
 *              @min 0
 *              @max 99
 *          @default 0
 *      @arg choiceText
 *          @text 選択肢テキスト
 *          @desc 
 *          @default 
 * 
 *  @command clearCustomChoices
 *      @text 選択肢クリア
 *      @desc 選択肢の配列を削除します。
 *      @arg id
 *          @desc 全て削除する配列のID
 *          @type number
 *              @min 0
 *              @max 99
 *          @default 
 * 
 */

スポンサードリンク

スポンサードリンク

-MZ用プラグイン

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