#============================================================================== # ■ 三人パーティ用メニュー変更 ver 1.03 #------------------------------------------------------------------------------ #  配布元: # 白の魔 http://izumiwhite.web.fc2.com/ # #  利用規約: # RPGツクールVXの正規の登録者のみご利用になれます。 # 利用報告・著作権表示とかは必要ありません。 # 改造もご自由にどうぞ。 # 何か問題が発生しても責任は持ちません。 #============================================================================== #-------------------------------------------------------------------------- # ★ 初期設定。 # 立ち絵の表示優先度と位置をズラします。 # このままでも大抵は問題無いハズ…。 # ここをいじっても駄目な場合は画像グラフィックそのものを加工しましょう。 # ゴールドウィンドウが邪魔な場合は、Gold_y=40くらいにするとよいかも。 #-------------------------------------------------------------------------- module WD_3actormenu_ini Main_priority = 0 #メインメニューの立ち絵の表示優先度 #0: 1人目>2人目>3人目 #1: 2人目>1人目>3人目 #2: 3人目>2人目>1人目 Main_picture_x1 = 0 #メインメニューの1人目の立ち絵のx座標のバイアス Main_picture_y1 = 0 #メインメニューの1人目の立ち絵のy座標のバイアス Main_picture_x2 = 0 #メインメニューの2人目の立ち絵のx座標のバイアス Main_picture_y2 = 0 #メインメニューの2人目の立ち絵のy座標のバイアス Main_picture_x3 = 0 #メインメニューの3人目の立ち絵のx座標のバイアス Main_picture_y3 = 0 #メインメニューの3人目の立ち絵のy座標のバイアス Status_picture_x1 = 0 #ステータス画面の立ち絵のx座標のバイアス Status_picture_y1 = 0 #ステータス画面の立ち絵のy座標のバイアス Gold_x = 384 #ゴールドウィンドウのx座標 Gold_y = 232 #ゴールドウィンドウのy座標 end #-------------------------------------------------------------------------- # ★ 初期設定おわり #-------------------------------------------------------------------------- class Scene_Menu < Scene_Base #-------------------------------------------------------------------------- # ● 開始処理 #-------------------------------------------------------------------------- def start super create_menu_background @face_window = Window_BackPicture.new(-16, -16) @face_window.opacity = 0 create_command_window @gold_window = Window_Gold.new(WD_3actormenu_ini::Gold_x, WD_3actormenu_ini::Gold_y) @status_window = Window_MenuStatus.new(0, 416-128) end #-------------------------------------------------------------------------- # ● 終了処理 #-------------------------------------------------------------------------- def terminate super dispose_menu_background @command_window.dispose @gold_window.dispose @face_window.dispose @status_window.dispose end #-------------------------------------------------------------------------- # ● フレーム更新 #-------------------------------------------------------------------------- def update super update_menu_background @command_window.update @gold_window.update @face_window.update @status_window.update if @command_window.active update_command_selection elsif @status_window.active update_actor_selection end end #-------------------------------------------------------------------------- # ● コマンドウィンドウの作成 #-------------------------------------------------------------------------- def create_command_window s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = Vocab::save s6 = Vocab::game_end @command_window = Window_Command.new(544, [s1, s2, s3, s4, s5, s6], 4) @command_window.index = @menu_index if $game_party.members.size == 0 # パーティ人数が 0 人の場合 @command_window.draw_item(0, false) # アイテムを無効化 @command_window.draw_item(1, false) # スキルを無効化 @command_window.draw_item(2, false) # 装備を無効化 @command_window.draw_item(3, false) # ステータスを無効化 end if $game_system.save_disabled # セーブ禁止の場合 @command_window.draw_item(4, false) # セーブを無効化 end end end class Scene_Skill < Scene_Base #-------------------------------------------------------------------------- # ● 開始処理 #-------------------------------------------------------------------------- def start super create_menu_background @actor = $game_party.members[@actor_index] @viewport = Viewport.new(0, 0, 544, 416) @target_window = Window_MenuStatus.new(0, 416 -128) @help_window = Window_Help.new @help_window.viewport = @viewport @status_window = Window_SkillStatus.new(0, 56, @actor) @status_window.viewport = @viewport @skill_window = Window_Skill.new(0, 112, 544, 304, @actor) @skill_window.viewport = @viewport @skill_window.help_window = @help_window hide_target_window end #-------------------------------------------------------------------------- # ● ターゲットウィンドウの表示 # ※右寄せとかしません #-------------------------------------------------------------------------- def show_target_window(right) @skill_window.active = false @target_window.visible = true @target_window.active = true end end class Scene_Item < Scene_Base #-------------------------------------------------------------------------- # ● 開始処理 #-------------------------------------------------------------------------- def start super create_menu_background @viewport = Viewport.new(0, 0, 544, 416) @target_window = Window_MenuStatus.new(0, 416 -128) @help_window = Window_Help.new @help_window.viewport = @viewport @item_window = Window_Item.new(0, 56, 544, 360) @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.active = false hide_target_window end #-------------------------------------------------------------------------- # ● ターゲットウィンドウの表示 # ※右寄せとかしません #-------------------------------------------------------------------------- def show_target_window(right) @item_window.active = false @target_window.visible = true @target_window.active = true end end #============================================================================== # ■ Window_BackPicture #------------------------------------------------------------------------------ #  立ち絵をバッググラウンドに表示するウィンドウです。 #============================================================================== class Window_BackPicture < Window_Base #-------------------------------------------------------------------------- # ● オブジェクト初期化 # x : ウィンドウの X 座標 # y : ウィンドウの Y 座標 #-------------------------------------------------------------------------- def initialize(x, y) super(x, y, 600, 500) refresh end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.members.size bitmap = [] rect = [] x = [] y = [] i = 0 for actor in $game_party.members bitmap[i] = Cache.picture(actor.face_name) rect[i] = Rect.new(0, 0, bitmap[i].width, bitmap[i].height) x[i]=170*i+544/6-(bitmap[i].width)/2 y[i]=416-bitmap[i].height i += 1 end x[0] += WD_3actormenu_ini::Main_picture_x1 x[1] += WD_3actormenu_ini::Main_picture_x2 if $game_party.members.size > 1 x[2] += WD_3actormenu_ini::Main_picture_x3 if $game_party.members.size > 2 y[0] += WD_3actormenu_ini::Main_picture_y1 y[1] += WD_3actormenu_ini::Main_picture_y2 if $game_party.members.size > 1 y[2] += WD_3actormenu_ini::Main_picture_y3 if $game_party.members.size > 2 if WD_3actormenu_ini::Main_priority == 0 self.contents.blt(x[2], y[2], bitmap[2], rect[2]) if $game_party.members.size > 2 self.contents.blt(x[1], y[1], bitmap[1], rect[1]) if $game_party.members.size > 1 self.contents.blt(x[0], y[0], bitmap[0], rect[0]) elsif WD_3actormenu_ini::Main_priority == 1 self.contents.blt(x[2], y[2], bitmap[2], rect[2]) if $game_party.members.size > 2 self.contents.blt(x[0], y[0], bitmap[0], rect[0]) self.contents.blt(x[1], y[1], bitmap[1], rect[1]) if $game_party.members.size > 1 elsif WD_3actormenu_ini::Main_priority == 2 self.contents.blt(x[0], y[0], bitmap[0], rect[0]) self.contents.blt(x[1], y[1], bitmap[1], rect[1]) if $game_party.members.size > 1 self.contents.blt(x[2], y[2], bitmap[2], rect[2]) if $game_party.members.size > 2 end end end class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # ● オブジェクト初期化 # x : ウィンドウの X 座標 # y : ウィンドウの Y 座標 #-------------------------------------------------------------------------- def initialize(x, y) super(x, y, 544, 128) @column_max=3 refresh self.active = false self.index = -1 end #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.members.size for actor in $game_party.members x = actor.index * contents.width/3 + 20 y = 0 draw_actor_name(actor, x-16, y) draw_actor_level(actor, x + 88, y ) draw_actor_state(actor, x, y + WLH * 3) draw_actor_hp(actor, x + 12, y + WLH*1) draw_actor_mp(actor, x + 12, y + WLH*2) end end #-------------------------------------------------------------------------- # ● カーソルの更新 #-------------------------------------------------------------------------- def update_cursor if @index < 0 # カーソルなし self.cursor_rect.empty elsif @index < @item_max # 通常 self.cursor_rect.set(@index * contents.width/3, 0, contents.width/3, 96) elsif @index >= 100 # 自分 self.cursor_rect.set((@index - 100) * contents.width/3, 0, contents.width/3, 96) else # 全体 self.cursor_rect.set(0, 0, contents.width, 96) end end #-------------------------------------------------------------------------- # ● 名前の描画 # actor : アクター # x : 描画先 X 座標 # y : 描画先 Y 座標 #-------------------------------------------------------------------------- def draw_actor_name(actor, x, y) self.contents.font.color = hp_color(actor) self.contents.draw_text(x, y, 98, WLH, actor.name) end end class Window_Status < Window_Base #-------------------------------------------------------------------------- # ● リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_picture draw_actor_name(@actor, 4, 0) draw_actor_class(@actor, 128, 0) draw_basic_info(32, 32) draw_parameters(32, 136) draw_exp_info(288, 0) draw_equipments(32, 236) end #-------------------------------------------------------------------------- # ● 立ち絵の表示 # x : 描画先 X 座標 # y : 描画先 Y 座標 #-------------------------------------------------------------------------- def draw_actor_picture bitmap1 = Cache.picture(@actor.face_name) rect1 = Rect.new(0, 0, bitmap1.width, bitmap1.height) x = 360-bitmap1.width/2 + WD_3actormenu_ini::Status_picture_x1 y = 384-bitmap1.height + WD_3actormenu_ini::Status_picture_y1 self.contents.blt(x, y, bitmap1, rect1) end end