Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Change Equipment in-Battle from RGSS Wiki

Note: This script is posted to RGSS Wiki(http://tkool.web-ghost.net/wiki/wiki.cgi) by anonymous Japanese scipter. So do not credit me.
Original Script Page Link: http://tkool.web-ghost.net/wiki/wik...%EF%C6%AE%C3%E6%A4%CB%C1%F5%C8%F7%CA%D1%B9%B9

There are two scripts posted on above page.

1. You can equip your equipments to select any equipment in battle command 'Item' menu.
Code:
=begin
戦闘中に装備を変更できるようにするスクリプト


戦闘中に装備を変えることができるようになります。
それぞれの敵に合った属性を持った武器で攻撃したい場合などに使えます。



■ Window_BattleItem ページを作成(Window_Itemページよりも後ろに)

★ページの中身
=end

class Window_BattleItem < Window_Item
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super
    @column_max = 2
    @actor = nil
    refresh
  end
  #--------------------------------------------------------------------------
  # ● アクティブのアクターを取得
  #--------------------------------------------------------------------------
  def actor
    return @actor
  end
  #--------------------------------------------------------------------------
  # ● アクティブのアクターを設定
  #--------------------------------------------------------------------------
  def actor=(actor)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # ● アイテム・装備品が使用(装備)可能かどうか
  #--------------------------------------------------------------------------
  def usable?(item)
    return false if @actor == nil
    item_usable = item.is_a?(RPG::Item) && $game_party.item_can_use?(item.id)
    weapon_usable = item.is_a?(RPG::Weapon) && !@actor.equip_fix?(0) && @actor.equippable?(item)
    armor_usable = item.is_a?(RPG::Armor) && !@actor.equip_fix?(item.kind + 1) && @actor.equippable?(item)
    return item_usable || weapon_usable || armor_usable
  end
  
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # アイテムを追加
    for i in 1...$data_items.size
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
    if @actor != nil
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 and @actor.equippable?($data_weapons[i])
          @data.push($data_weapons[i])
        end
      end
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 and @actor.equippable?($data_armors[i])
          @data.push($data_armors[i])
        end
      end
    end
    # 項目数が 0 でなければビットマップを作成し、全項目を描画
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 項目の描画
  #     index : 項目番号
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if usable?(item)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
end


#■ Window_BattleEquip ページを作成(Window_EquipLeftページよりも後ろに)

#★ページの中身

class Window_BattleEquip < Window_EquipLeft
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(actor)
    self.y = 480 - self.height
    self.z = 110
  end

  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_item_name(@item, 4, 0)
    draw_actor_level(@actor, 4, 32)
    draw_actor_parameter(@actor, 4, 64, 0)
    draw_actor_parameter(@actor, 4, 96, 1)
    draw_actor_parameter(@actor, 4, 128, 2)
    draw_actor_parameter(@actor, 124, 32, 3) 
    draw_actor_parameter(@actor, 124, 64, 4) 
    draw_actor_parameter(@actor, 124, 96, 5) 
    draw_actor_parameter(@actor, 124, 128, 6) 
  end

  #--------------------------------------------------------------------------
  # ● ウィンドウを適切な位置に移動
  #--------------------------------------------------------------------------
  def move_auto(item_window, min_y)
    self.x = item_window.index % 2 == 0 ? 640 - self.width : 0
    self.y = item_window.cursor_rect.y + item_window.y > 480 / 2 ? min_y : 480 - self.height
  end

  #--------------------------------------------------------------------------
  # ● 指定したアイテムと同じ部位にアクターが装備しているアイテムを取得
  #--------------------------------------------------------------------------
  def set_same_kind(item)
    if item.is_a?(RPG::Weapon)
      @item = $data_weapons[@actor.weapon_id]
    elsif item.is_a?(RPG::Armor)
      armor_ids = [@actor.armor1_id, @actor.armor2_id, @actor.armor3_id, @actor.armor4_id]
      @item = $data_armors[armor_ids[item.kind]]
    else
      @item = nil
    end
    refresh
  end

  #--------------------------------------------------------------------------
  # ● 装備変更後のパラメータ設定(ステータス全部表示できる版)
  #--------------------------------------------------------------------------
  def set_new_parameters(new_atk, new_pdef, new_mdef, new_str = nil, new_dex = nil, new_agi = nil, new_int = nil)
    if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int
      @new_atk = new_atk
      @new_pdef = new_pdef
      @new_mdef = new_mdef
      @new_str = new_str
      @new_dex = new_dex
      @new_agi = new_agi
      @new_int = new_int
      refresh
    end
  end

  #--------------------------------------------------------------------------
  # ● 表示パラメータの数を増やすためにオーバーライド
  #--------------------------------------------------------------------------
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      parameter_name = $data_system.words.atk
      parameter_value = @new_atk == nil ? actor.atk : @new_atk
      color = get_color(actor.atk, @new_atk)
    when 1
      parameter_name = $data_system.words.pdef
      parameter_value = @new_pdef == nil ? actor.pdef : @new_pdef
      color = get_color(actor.pdef, @new_pdef)
    when 2
      parameter_name = $data_system.words.mdef
      parameter_value = @new_mdef == nil ? actor.mdef : @new_mdef
      color = get_color(actor.mdef, @new_mdef)
    when 3
      parameter_name = $data_system.words.str
      parameter_value = @new_str == nil ? actor.str : @new_str
      color = get_color(actor.str, @new_str)
    when 4
      parameter_name = $data_system.words.dex
      parameter_value = @new_dex == nil ? actor.dex : @new_dex
      color = get_color(actor.dex, @new_dex)
    when 5
      parameter_name = $data_system.words.agi
      parameter_value = @new_agi == nil ? actor.agi : @new_agi
      color = get_color(actor.agi, @new_agi)
    when 6
      parameter_name = $data_system.words.int
      parameter_value = @new_int == nil ? actor.int : @new_int
      color = get_color(actor.int, @new_int)
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 72, 32, parameter_name)
    self.contents.font.color = color
    self.contents.draw_text(x + 72, y, 36, 32, parameter_value.to_s, 2)
    self.contents.font.color = normal_color
  end 

  #--------------------------------------------------------------------------
  # ● 装備後のパラメータの増減を表す色を取得
  #--------------------------------------------------------------------------
  def get_color(param, new_param)
    if param == nil or new_param == nil
      return normal_color
    elsif param > new_param
      # 装備後にパラメータが減る場合
      return Color.new(192, 192, 192, 255)
    elsif param < new_param
      # 装備後にパラメータが増える場合
      return Color.new(255, 255, 0, 255)
    else
      # 装備後にパラメータが変わらない場合
      return normal_color
    end
  end
end



#â–  Scene_Battle 3

#★以下のメソッドを変更

  #--------------------------------------------------------------------------
  # ● フレーム更新 (アクターコマンドフェーズ : アイテム選択)
  #--------------------------------------------------------------------------
  def update_phase3_item_select
    # アイテムウィンドウを可視状態にする
    @item_window.visible = true
    # アイテムウィンドウを更新
    @item_window.update
    # --- ここから変更部分 ---
    @equip_window.update
    # 選択アイテムが変わっている場合
    if @item != @item_window.item
      # 選択アイテムの更新
      @item = @item_window.item
      # 装備ウィンドウの可視状態・位置変更
      @equip_window.visible = equip_window_button == nil && (@item.is_a?(RPG::Weapon) || @item.is_a?(RPG::Armor))
      @equip_window.move_auto(@item_window, @help_window.height)
      @equip_window.set_same_kind(@item)
      if @item.is_a?(RPG::Weapon) or @item.is_a?(RPG::Armor)
        # 現在選択中のアイテムを取得
        # 装備を変更
        last_hp = @active_battler.hp
        last_sp = @active_battler.sp
        equips = [@active_battler.weapon_id, @active_battler.armor1_id, @active_battler.armor2_id, @active_battler.armor3_id, @active_battler.armor4_id]
        equip_type = @item.is_a?(RPG::Weapon) ? 0 : @item.kind + 1
        @active_battler.equip(equip_type, @item == nil ? 0 : @item.id)
        # 装備変更後のパラメータを取得
        new_atk = @active_battler.atk
        new_pdef = @active_battler.pdef
        new_mdef = @active_battler.mdef
        new_str = @active_battler.str
        new_dex = @active_battler.dex
        new_agi = @active_battler.agi
        new_int = @active_battler.int
        # 装備を戻す
        for i in 0...equips.size
          @active_battler.equip(i, equips[i])
        end
        @active_battler.hp = last_hp
        @active_battler.sp = last_sp
        # 装備ウィンドウに描画
        @equip_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
      end
      return
    end
    # 装備ウィンドウ表示ボタンが押された場合(use_a_button? がtrueを返す場合のみ使用)
    if equip_window_button != nil
      if Input.trigger?(equip_window_button) and (@item.is_a?(RPG::Weapon) or @item.is_a?(RPG::Armor))
        # 装備ウィンドウを隠す・表示する
        @equip_window.visible = !@equip_window.visible
      end
    end
    # --- 変更部分終わり ---
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # アイテムの選択を終了
      end_item_select
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アイテムウィンドウで現在選択されているデータを取得
      @item = @item_window.item
      # --- ここから変更部分 ---
      # 使用できない場合
      unless @item_window.usable?(@item)
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 使用したのがアイテムの場合
      if @item.is_a?(RPG::Item)
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # アクションを設定
        @active_battler.current_action.item_id = @item.id
        # アイテムウィンドウを不可視状態にする
        @item_window.visible = false
        # 効果範囲が敵単体の場合
        if @item.scope == 1
          # エネミーの選択を開始
          start_enemy_select
        # 効果範囲が味方単体の場合
        elsif @item.scope == 3 or @item.scope == 5
          # アクターの選択を開始
          start_actor_select
        # 効果範囲が単体ではない場合
        else
          # アイテムの選択を終了
          end_item_select
          # 次のアクターのコマンド入力へ
          phase3_next_actor
        end
      # 使用したのが装備品の場合
      else
        # 装備 SE を演奏
        $game_system.se_play($data_system.equip_se)
        # 装備する
        equip_type = @item.is_a?(RPG::Weapon) ? 0 : @item.kind + 1
        @active_battler.equip(equip_type, @item.id)
        @item_window.refresh
        @equip_window.refresh
      end
      # --- 変更部分終わり ---
      return
    end
  end

  #--------------------------------------------------------------------------
  # ● アイテム選択開始
  #--------------------------------------------------------------------------
  def start_item_select
    # --- ここから変更部分 ---
    # アイテムウィンドウを作成
    @item_window = Window_BattleItem.new
    @item_window.actor = @active_battler
    # 装備用のパラメータウィンドウを作成
    @equip_window = Window_BattleEquip.new(@active_battler)
    @equip_window.active = false
    @equip_window.visible = false
    # 選択アイテムの初期化
    @item = nil
    # --- 変更部分終わり ---
    # ヘルプウィンドウを関連付け
    @item_window.help_window = @help_window
    # アクターコマンドウィンドウを無効化
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end

  #--------------------------------------------------------------------------
  # ● アイテム選択終了
  #--------------------------------------------------------------------------
  def end_item_select
    # アイテムウィンドウを解放
    @item_window.dispose
    @item_window = nil
    # --- ここから変更部分 ---
    @equip_window.dispose
    @equip_window = nil
    # --- 変更部分終わり ---
    # ヘルプウィンドウを隠す
    @help_window.visible = false
    # アクターコマンドウィンドウを有効化
    @actor_command_window.active = true
    @actor_command_window.visible = true
  end


#★以下のメソッドを追加

  #--------------------------------------------------------------------------
  # ● 装備ウィンドウを表示するためのボタン
  #  (return nil にするとボタンを押さなくても常に表示)
  #--------------------------------------------------------------------------
  def equip_window_button
    # 「return Input::A」にすると A ボタンを押した時にウィンドウ表示
    return nil
  end
end


=begin
以上



Scene_Battle 3 の中に追加した equip_window_button メソッドの中を変えると
特定のボタンを押したときに装備&ステータスウィンドウを表示するようになります。

Window_BattleItem と Window_BattleEquip をいじると
アイテムウィンドウや装備ウィンドウの見栄えを変えることができます。
お好みの表示方法に改造してください。
既に Window_EquipLeft を改造していて、その表示を使いたい方は
Window_BattleEquip から、このスクリプトに必須のメソッドである
initialize、move_auto、set_same_kind、set_new_parameters
以外のメソッドを削除するとうまくいく可能性が高いです。
=end

2. Add 'Equip' command on battle command window.
Code:
#		「戦闘中に装備」スクリプト Ver1.00
#
#
#戦闘中に装備が出来るようになります。以下のスクリプトをmainの上にでも挿入
#して下さい。アクターコマンドの一番下に装備コマンドが出ると思います。
#
#なお、このスクリプトは通常時の装備画面を直接呼び出しておりますので、
#画面のデザインは考慮しておりません。レイアウトの変更は各自でお願い致します。
#つまり、装備画面の変更が大前提となります。一応、そのままでも動作は問題あり
#ませんが・・・。
#なお、呼び出している画面は「装備中のアイテム欄」と
#「装備できるアイテム欄」です。
#
#
#画面レイアウトの変更はRGSSの初歩の技術ですので、
#それが出来ない方は、親切な方に教えて頂くか諦めて下さい(ぇ
#勉強と思ってがんばりましょう(^^;)
#※ヒント
#●Window_EquipLeft
#●Window_EquipRight
#●Window_EquipItem
#が変更場所です・・・・・。



#==============================================================================
# ■ Scene_Battle (分割定義 3)
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================
class Scene_Battle
  #--------------------------------------------------------------------------
  # ● メイン処理
  #--------------------------------------------------------------------------
  def main
    # 戦闘用の各種一時データを初期化
    $game_temp.in_battle = true
    $game_temp.battle_turn = 0
    $game_temp.battle_event_flags.clear
    $game_temp.battle_abort = false
    $game_temp.battle_main_phase = false
    $game_temp.battleback_name = $game_map.battleback_name
    $game_temp.forcing_battler = nil
    # バトルイベント用インタプリタを初期化
    $game_system.battle_interpreter.setup(nil, 0)
    # トループを準備
    @troop_id = $game_temp.battle_troop_id
    $game_troop.setup(@troop_id)
    # アクターコマンドウィンドウを作成
    s1 = $data_system.words.attack
    s2 = $data_system.words.skill
    s3 = $data_system.words.guard
    s4 = $data_system.words.item
    s5 = $data_system.words.equip #ーーー●●装備
    @actor_command_window = Window_Command.new(128, [s1, s2, s3, s4, s5])
    #@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
    @actor_command_window.y = 128 #160

    @actor_command_window.back_opacity = 160
    @actor_command_window.active = false
    @actor_command_window.visible = false
    # その他のウィンドウを作成
    @party_command_window = Window_PartyCommand.new
    @help_window = Window_Help.new
    @help_window.back_opacity = 160
    @help_window.visible = false
    @status_window = Window_BattleStatus.new
    @message_window = Window_Message.new
    # スプライトセットを作成
    @spriteset = Spriteset_Battle.new
    # ウェイトカウントを初期化
    @wait_count = 0
    # トランジション実行
    if $data_system.battle_transition == ""
      Graphics.transition(20)
    else
      Graphics.transition(40, "Graphics/Transitions/" +
        $data_system.battle_transition)
    end
    # プレバトルフェーズ開始
    start_phase1
    # メインループ
    loop do
      # ゲーム画面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレーム更新
      update
      # 画面が切り替わったらループを中断
      if $scene != self
        break
      end
    end
    # マップをリフレッシュ
    $game_map.refresh
    # トランジション準備
    Graphics.freeze
    # ウィンドウを解放
    @actor_command_window.dispose
    @party_command_window.dispose
    @help_window.dispose
    @status_window.dispose
    @message_window.dispose
    if @skill_window != nil
      @skill_window.dispose
    end
    if @item_window != nil
      @item_window.dispose
    end
    if @result_window != nil
      @result_window.dispose
    end
    # スプライトセットを解放
    @spriteset.dispose
    # タイトル画面に切り替え中の場合
    if $scene.is_a?(Scene_Title)
      # 画面をフェードアウト
      Graphics.transition
      Graphics.freeze
    end
    # 戦闘テストからゲームオーバー画面以外に切り替え中の場合
    if $BTEST and not $scene.is_a?(Scene_Gameover)
      $scene = nil
    end
  end



  #--------------------------------------------------------------------------
  # ● フレーム更新 (アクターコマンドフェーズ)
  #--------------------------------------------------------------------------
  def update_phase3
    # エネミーアローが有効の場合
    if @enemy_arrow != nil
      update_phase3_enemy_select
    # アクターアローが有効の場合
    elsif @actor_arrow != nil
      update_phase3_actor_select
    # スキルウィンドウが有効の場合
    elsif @skill_window != nil
      update_phase3_skill_select
    # アイテムウィンドウが有効の場合
    elsif @item_window != nil
      update_phase3_item_select
    # ★追加 装備変更ウィンドウが有効の場合
    elsif @right_window != nil
         update_phase3_equip_select
    # アクターコマンドウィンドウが有効の場合
    elsif @actor_command_window.active
      update_phase3_basic_command
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (アクターコマンドフェーズ : 基本コマンド)
  #--------------------------------------------------------------------------
  def update_phase3_basic_command
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # 前のアクターのコマンド入力へ
      phase3_prior_actor
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アクターコマンドウィンドウのカーソル位置で分岐
      case @actor_command_window.index
      when 0  # 攻撃
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # アクションを設定
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 0
        # エネミーの選択を開始
        start_enemy_select
      when 1  # スキル
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # アクションを設定
        @active_battler.current_action.kind = 1
        # スキルの選択を開始
        start_skill_select
      when 2  # 防御
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # アクションを設定
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 1
        # 次のアクターのコマンド入力へ
        phase3_next_actor
      when 3  # アイテム
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # アクションを設定
        @active_battler.current_action.kind = 2
        # アイテムの選択を開始
        start_item_select
      when 4  #   装備
        # 決定 SE を演奏
        $game_system.se_play($data_system.decision_se)
        # アクションを設定
        #@active_battler.current_action.kind = 0
        # アイテムの選択を開始
        start_equip_select
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # ★● 追加 フレーム更新 (アクターコマンドフェーズ : 変更装備選択)
  #--------------------------------------------------------------------------
  def update_phase3_equip_select
    # スキルウィンドウを可視状態にする
    @right_window.visible = true

    # ウィンドウを更新
    @right_window.update
    if @right_window.index != @now_right_window
      @now_right_window =@right_window.index
      if @equip_item_window.index == -1
        @equip_item_window.index = 0
        @equip_item_window.refresh
        @equip_item_window.index = -1
      end 
    end
    # ウィンドウを更新
    @equip_item_window.update
    equip_item_window_select      
    
    # アイテムウィンドウがアクティブの場合 
    if @equip_item_window.active
      update_phase3_equip_i_select
      return
    end
    
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # 装備選択を終了
      end_equip_select
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # 装備固定の場合
      if @active_battler.equip_fix?(@right_window.index)
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # アイテムウィンドウをアクティブ化
      @right_window.active = false
      @equip_item_window.active = true
      @equip_item_window.index = 0
      @now_right_window = -1
      return
    end
  end
  #--------------------------------------------------------------------------
  # ★● 追加 フレーム更新 (アクターコマンドフェーズ : 装備アイテム選択)
  #--------------------------------------------------------------------------
  def update_phase3_equip_i_select
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)      
      # 装備アイテム選択を終了
      @now_item_window = -1
      
      @right_window.active = true
      @equip_item_window.active = false
      @equip_item_window.index = -1
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.equip_se)
      # アイテムウィンドウで現在選択されているデータを取得
      item = @equip_item_window.item
      # 装備を変更
      @active_battler.equip(@right_window.index, item == nil ? 0 : item.id)
      # ライトウィンドウをアクティブ化
      @right_window.active = true
      @equip_item_window.active = false
      @equip_item_window.index = -1
      # ライトウィンドウ、アイテムウィンドウの内容を再作成
      @right_window.refresh
      @equip_item_window.refresh
      return
    end
  end
  #--------------------------------------------------------------------------
  # ★● 追加 装備選択開始
  #--------------------------------------------------------------------------
  def start_equip_select
    # 装備ウィンドウを作成
    #パラメータを呼び出したい時は注釈消す
    #@left_window = Window_EquipLeft.new(@active_battler)
    @right_window = Window_EquipRight.new(@active_battler)
    @item_window1 = Window_EquipItem.new(@active_battler, 0)
    @item_window2 = Window_EquipItem.new(@active_battler, 1)
    @item_window3 = Window_EquipItem.new(@active_battler, 2)
    @item_window4 = Window_EquipItem.new(@active_battler, 3)
    @item_window5 = Window_EquipItem.new(@active_battler, 4)  
    # ヘルプウィンドウを関連付け
    @right_window.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    
    @now_right_window = -1
    @right_window.index = 0
    equip_item_window_select
    # アクターコマンドウィンドウを無効化
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
  #--------------------------------------------------------------------------
  # ★● 追加 装備選択終了
  #--------------------------------------------------------------------------
  def end_equip_select
    # アイテムウィンドウを解放
    #パラメータを呼び出したい時は注釈消す
    #@left_window.dispose
    @right_window.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose 
    @right_window= nil
    @item_window1= nil
    @item_window2= nil
    @item_window3= nil
    @item_window4= nil
    @item_window5= nil
    # ヘルプウィンドウを隠す
    @help_window.visible = false
    # アクターコマンドウィンドウを有効化
    @actor_command_window.active = true
    @actor_command_window.visible = true
  end
  #--------------------------------------------------------------------------
  # ★● 追加 装備アイテムウインドウのチェック
  #--------------------------------------------------------------------------
  def equip_item_window_select  
      # アイテムウィンドウの可視状態設定
    @item_window1.visible = (@right_window.index == 0)
    @item_window2.visible = (@right_window.index == 1)
    @item_window3.visible = (@right_window.index == 2)
    @item_window4.visible = (@right_window.index == 3)
    @item_window5.visible = (@right_window.index == 4)
    # ーーー★追加(注釈消すとアクセサリ1つ増加)
    #@item_window5.visible = (@right_window.index == 4) || (@right_window.index == 5)
    # ーーー終わり
    # 現在のアイテムウィンドウを @item_window に設定
    case @right_window.index
    when 0
      @equip_item_window = @item_window1
    when 1
      @equip_item_window = @item_window2
    when 2
      @equip_item_window = @item_window3
    when 3
      @equip_item_window = @item_window4
    when 4
      @equip_item_window = @item_window5
    # ーーー★追加(注釈消すとアクセサリ1つ増加)
    #when 5
    #  @equip_item_window = @item_window5
    end
  end
end


Compatability Issue?: While you use either of these scripts and any of 'Equip-Extend script', the game will crash when you select 'extended-equipment'. To prevent this, you have to edit above script to ignore extended equipments, or make them to work with your equipments...
 
Now THESE are handy scripts.

If a ghost is immune to a weapon, switch to a SILVER weapon during combat. Great to have. Grabbing now!

And you DO get credit, if merely for finding them... :D
 
Well.... Since they post their script on RGSS wiki anonymously, you cannot tell the author's name(in most(or all of) case).
 
Landarma said:
Since they post their script on RGSS wiki anonymously, you cannot tell the author's name(in most(or all of) case)
Are you sure they don't just take scripts from other sites for it?

I noticed a couple of Rpg Advocate's were on there when doing a quick skim
 
Heh, take it from me. An RTAB user (even before I translated the comments).

You should have no problem unless certain strings (like "equipment") that are supposed to show in the menu are still in japanese. Even then, it'll still work (just that the japanese heading'll probably show up blank).

Even so, it should be no problem FINDING the japanese string and replacing it altogether.

But... all this is assuming that there IS a heading or two in japanese.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top