=begin RGSS3 VX風バトルログ+ Ver.1.001 mo-to 2017/07/21 TKOOL COOL http://mototkool.blog.fc2.com/ ★使用法★ スクリプトの▼ 素材 以下 ▼ メイン 以上にこれをコピーして張り付ける。 再定義を多用していますので上部挿入推薦 カスタマイズポインツを弄っていろいろと調整できます。 VXデフォ戦闘のようなシンプルにしたい場合は真偽値をすべてfalseにしてみてください。 ★概要★ 戦闘中のバトルログをVX風に変更します。 ★注意・仕様★ バトルイベントなどで文章表示を中・上に指定しても必ず下に表示される。 同じく文章背景も透明化のみ。 ★更新履歴★ ver.0.01 最低限の機能で公開 ver.1.00 カスタマイズ機能を実装し正式版へ      ソースの見直し修正      戦闘中のゴールドウィンドウ位置の変更       ver.1.001 シンプルステータスの描画方法をMVと同様の仕様に書き直した      高解像度変更に対応した =end #============================================================================== # ★ カスタマイズポインツ #============================================================================== module MOTO SIMPLE_STATUS_WINDOW = true #true:上部に簡易ステータス表示 false:なし #↓上のカスタマイズでtrueを選んだときのみいじること TP_GAGE = true #true:TPゲージを表示 false:なし PARTY_COMMAND_RIGHT = true #true:パーティコマンドを右側に表示 false:デフォ ACTOR_COMMAND_LEFT = false #true:アクターコマンドを左側に表示 false:デフォ end #============================================================================== # ☆ Window_Battle_Message #------------------------------------------------------------------------------ #  戦闘中の文章表示に使う位置固定・透明化されたメッセージウィンドウです。 #============================================================================== class Window_Battle_Message < Window_Message #-------------------------------------------------------------------------- # ☆ オブジェクト初期化 #-------------------------------------------------------------------------- def initialize super self.x = 0 self.y = Graphics.height - height self.z = 210 self.opacity = 0 end #-------------------------------------------------------------------------- # ☆ ウィンドウ背景透明化に固定 #-------------------------------------------------------------------------- def update_background self.opacity = 0 end #-------------------------------------------------------------------------- # ☆ メッセージウィンドウ固定とゴールドウィンドウ位置の変更 #-------------------------------------------------------------------------- def update_placement @gold_window.x = 0 @gold_window.y = (Graphics.height - height) - @gold_window.height end end #============================================================================== # ☆ Window_Simple_Status #============================================================================== #  戦闘中に上部へ表示する簡易式のステータスウィンドウです。 #============================================================================== class Window_Simple_Status < Window_Selectable #-------------------------------------------------------------------------- # ☆ オブジェクト初期化 #-------------------------------------------------------------------------- def initialize width = self.window_width width = 0 if $game_party.members.size == 0 hight = MOTO::TP_GAGE ? fitting_height(4) : fitting_height(3) super(0, 0, width, hight) self.openness = 0 refresh end #-------------------------------------------------------------------------- # ● ウィンドウ幅の取得 #-------------------------------------------------------------------------- def window_width return Graphics.width / 4 * item_max end #-------------------------------------------------------------------------- # ● 桁数の取得 #-------------------------------------------------------------------------- def col_max return 4 end #-------------------------------------------------------------------------- # ● 項目数の取得 #-------------------------------------------------------------------------- def item_max return $game_party.battle_members.size end #-------------------------------------------------------------------------- # ● 項目の描画 #-------------------------------------------------------------------------- def draw_item(index) actor = $game_party.members[index] rect = item_rect(index) x = rect.x y = rect.y width = rect.width - (spacing / 2) if MOTO::TP_GAGE draw_actor_simple_status(actor, x, y, width) else draw_actor_simple_status_notp(actor, x, y, width) end end #-------------------------------------------------------------------------- # ● シンプルなステータスの描画 #-------------------------------------------------------------------------- def draw_actor_simple_status(actor, x, y, width) draw_actor_name(actor, x, y) draw_actor_hp(actor, x, y + line_height * 1, width) draw_actor_mp(actor, x, y + line_height * 2, width) draw_actor_tp(actor, x, y + line_height * 3, width) end #-------------------------------------------------------------------------- # ● シンプルなステータスの描画(TPなし) #-------------------------------------------------------------------------- def draw_actor_simple_status_notp(actor, x, y, width) draw_actor_name(actor, x, y) draw_actor_hp(actor, x, y + line_height * 1, width) draw_actor_mp(actor, x, y + line_height * 2, width) end #-------------------------------------------------------------------------- # ● 項目を描画する矩形の取得 #-------------------------------------------------------------------------- def item_rect(index) rect = Rect.new col_max = item_max rect.width = (window_width / item_max) - ((4 - item_max) * 4) rect.height = item_height rect.x = index % col_max * (rect.width - spacing / 8 ) rect.y = 0 return rect end end class Window_BattleLog < Window_Selectable #-------------------------------------------------------------------------- # ● オブジェクト初期化 ※再定義 #-------------------------------------------------------------------------- def initialize super(0, Graphics.height - window_height, window_width, window_height) self.z = 200 @lines = [] @num_wait = 0 create_back_bitmap create_back_sprite refresh end #-------------------------------------------------------------------------- # ● 最大行数の取得 ※再定義 #-------------------------------------------------------------------------- def max_line_number return 4 end #-------------------------------------------------------------------------- # ● 背景の不透明度を取得 ※再定義 #-------------------------------------------------------------------------- def back_opacity return 0 end #-------------------------------------------------------------------------- # ○ 行の描画 ※エイリアス定義 #-------------------------------------------------------------------------- alias ori_moto_draw_line draw_line def draw_line(line_number) self.open ori_moto_draw_line(line_number) end end class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ○ 全ウィンドウの作成 ※エイリアス定義 #-------------------------------------------------------------------------- alias ori_moto_create_all_windows create_all_windows def create_all_windows ori_moto_create_all_windows create_simple_status_window end #-------------------------------------------------------------------------- # ● メッセージウィンドウの作成 ※再定義 #-------------------------------------------------------------------------- def create_message_window @message_window = Window_Battle_Message.new end #-------------------------------------------------------------------------- # ☆ 簡易ステータスウィンドウの作成  #-------------------------------------------------------------------------- def create_simple_status_window @simple_status_window = Window_Simple_Status.new end #-------------------------------------------------------------------------- # ● フレーム更新 ※再定義 #-------------------------------------------------------------------------- def update super if BattleManager.in_turn? @log_window.open process_event process_action end BattleManager.judge_win_loss end #-------------------------------------------------------------------------- # ○ パーティコマンドウィンドウの作成 ※エイリアス定義 #-------------------------------------------------------------------------- alias oro_moto_create_party_command_window create_party_command_window def create_party_command_window oro_moto_create_party_command_window @party_command_window.x = Graphics.width if MOTO::PARTY_COMMAND_RIGHT end #-------------------------------------------------------------------------- # ○ アクターコマンドウィンドウの作成 ※エイリアス定義 #-------------------------------------------------------------------------- alias oro_moto_create_actor_command_window create_actor_command_window def create_actor_command_window oro_moto_create_actor_command_window @actor_command_window.x -= Graphics.width if MOTO::ACTOR_COMMAND_LEFT end #-------------------------------------------------------------------------- # ● 情報表示ビューポートの更新 ※再定義 #-------------------------------------------------------------------------- def update_info_viewport i = MOTO::PARTY_COMMAND_RIGHT ? 128 : 0 j = MOTO::ACTOR_COMMAND_LEFT ? 0 : 128 move_info_viewport(i) if @party_command_window.active move_info_viewport(j) if @actor_command_window.active move_info_viewport(64) if BattleManager.in_turn? end #-------------------------------------------------------------------------- # ○ ステータスウィンドウの情報を更新 ※エイリアス定義 #-------------------------------------------------------------------------- alias ori_moto_refresh_status refresh_status def refresh_status ori_moto_refresh_status @simple_status_window.refresh end #-------------------------------------------------------------------------- # ○ 戦闘開始 ※エイリアス定義 #-------------------------------------------------------------------------- alias ori_moto_battle_start battle_start def battle_start ori_moto_battle_start @log_window.close end #-------------------------------------------------------------------------- # ○ ターン開始 ※エイリアス定義 #-------------------------------------------------------------------------- alias ori_moto_turn_start turn_start def turn_start @status_window.close @simple_status_window.open if MOTO::SIMPLE_STATUS_WINDOW ori_moto_turn_start end #-------------------------------------------------------------------------- # ● ターン終了 ※再定義 #-------------------------------------------------------------------------- def turn_end all_battle_members.each do |battler| battler.on_turn_end refresh_status @log_window.display_auto_affected_status(battler) @log_window.wait_and_clear end BattleManager.turn_end process_event @log_window.close @simple_status_window.close if MOTO::SIMPLE_STATUS_WINDOW start_party_command_selection end #-------------------------------------------------------------------------- # ● 戦闘行動の処理 ※再定義 #-------------------------------------------------------------------------- def process_action return if scene_changing? if !@subject || !@subject.current_action @subject = BattleManager.next_subject end return turn_end unless @subject if @subject.current_action @subject.current_action.prepare if @subject.current_action.valid? execute_action end @subject.remove_current_action end process_action_end unless @subject.current_action end #-------------------------------------------------------------------------- # ○ コマンド[逃げる] ※エイリアス定義 #-------------------------------------------------------------------------- alias ori_moto_command_escape command_escape def command_escape @log_window.open ori_moto_command_escape end end