ゲームパッド設定のオプションの説明文(RPGアツマール)

つまじ
記事: 9
登録日時: 2020年9月02日(水) 18:02

ゲームパッド設定のオプションの説明文(RPGアツマール)

投稿記事by つまじ » 2020年9月02日(水) 18:24

お世話になります。

スクリプトの知識が全く無いため原因がわからず質問させていただきます。

・やろうとしたこと

しぐれん様の「Mano ゲームパッド設定 - Mano_InputConfig.js」を入れ、
オプションに「ゲームパッドコンフィグ」「キーコンフィグ」を追加
https://plugin.fungamemake.com/archives/1911

【解決済】オプション画面に説明文をつける
viewtopic.php?t=3843
を参考に、上で追加したものも合わせて説明文をつける

コード: 全て選択

//=============================================================================
// OptionsScreen.js
//=============================================================================

/*:
 * @plugindesc Alternative Options screen layout.
 * @author Yoshitaka Kurige
 *
 * @help This plugin does not provide plugin commands.
 */

/*:ja
 * @plugindesc オプション画面のレイアウトを変更します。
 * @author 栗下義孝
 *
 * @param Info_commandRemember
 * @desc 「コマンド記憶」の説明文章です。
 * @default 戦闘のコマンドを記憶します。
 *
 * @param Info_bgmVolume
 * @desc 「BGM 音量」の説明文章です。
 * @default BGMの音量を調節します。
 *
 * @param Info_bgsVolume
 * @desc 「BGS 音量」の説明文章です。
 * @default BGSの音量を調節します。
 *
 * @param Info_meVolume
 * @desc 「ME 音量」の説明文章です。
 * @default MEの音量を調節します。
 *
 * @param Info_seVolume
 * @desc 「SE 音量」の説明文章です。
 * @default SEの音量を調節します。
 *
 * @param Info_GAMEPAD_CONFIG
 * @desc 「ゲームパッドコンフィグ」の説明文章です。
 * @default ゲームパッドの操作方法の設定。
 *
 * @param Info_KEYBOARD_CONFIG
 * @desc 「キーコンフィグ」の説明文章です。
 * @default キーボードの操作方法の設定。
 *
 * @help このプラグインには、プラグインコマンドはありません。
 */

(function() {

   var parameters = PluginManager.parameters('OptionsScreen');
   var Info_Text = {
      'commandRemember': String(parameters['Info_commandRemember'] || '戦闘のコマンドを記憶します。'),
      'bgmVolume': String(parameters['Info_bgmVolume'] || 'BGMの音量を調節します。'),
      'bgsVolume': String(parameters['Info_bgsVolume'] || 'BGSの音量を調節します。'),
      'meVolume': String(parameters['Info_meVolume'] || 'MEの音量を調節します。'),
      'seVolume': String(parameters['Info_seVolume'] || 'SEの音量を調節します。'),
      'GAMEPAD_CONFIG': String(parameters['Info_GAMEPAD_CONFIG'] || 'ゲームパッドの操作方法の設定。'),
      'KEYBOARD_CONFIG': String(parameters['Info_KEYBOARD_CONFIG'] || 'キーボードの操作方法の設定。'),
   }

   // -----------------------------------------------------
   //
   // 新規ウィンドウの作成
   //
   // -----------------------------------------------------

   var _Scene_Options_create = Scene_Options.prototype.create;
   Scene_Options.prototype.create = function() {
      _Scene_Options_create.call(this);
      var width = 600;
      var height = 70;
      var x = (Graphics.boxWidth - width) / 2;
      var y = 35;
      this._InfoWindow = new Window_Info(x, y, width, height);
      this.addWindow(this._InfoWindow);
   };

   var _Scene_Options_update = Scene_Options.prototype.update;
   Scene_Options.prototype.update = function() {
      _Scene_Options_update.call(this);
      //-選択中のコマンドウィンドウのシンボルの値を取得しています。---
      var selectedSymbol = this._optionsWindow.commandSymbol(this._optionsWindow.index());
      this._InfoWindow.setText(Info_Text[selectedSymbol]);
        //--------------------------------------------------------------
   };

   // -----------------------------------------------------
   //
   // 新規ウィンドウの設定
   //
   // -----------------------------------------------------

   function Window_Info() {
      this.initialize.apply(this, arguments);
   };

   Window_Info.prototype = Object.create(Window_Base.prototype);
   Window_Info.prototype.consrructor = Window_Info;

   Window_Info.prototype.initialize = function(x, y, width, height) {
      Window_Base.prototype.initialize.call(this, x, y, width, height);
      this._text = '';
   };

   Window_Info.prototype.setText = function(text) {
      //-前回と描画内容が同じ場合は描画しないことでパフォーマンスの低下を防ぎます。
      if (this._text === text) return;
        //---------------------------------------------------------------------------
      this._text = text;
      this.refresh();
   };

   Window_Info.prototype.clear = function() {
      this.setText('');
   };

   // 新規ウィンドウ内の中身
   Window_Info.prototype.refresh = function() {
      this.contents.clear();
      this.drawIcon(115, 10, 0);
      this.drawText(this._text, 50, 0);
   };

})();



このようにして説明を追加しました。
するとツクールのテストプレイと、デプロイメントしたものではうまく説明が表示されたのですが、
RPGアツマールにアップロードした際に、ゲームパッドコンフィグとキーコンフィグの部分だけ説明が表示されません。

テストプレイではしっかり表示されているので、どこを直していいか私の知識では検討もつかない状態です。
解決策がありましたらよろしくお願いします。

“MV:質問” へ戻る